/* =========================================
   P-BYRNE-ARTICLES.CSS
   Self-contained version with copied main/article styles
   ========================================= */

/* --- 0. COPIED FROM GLOBAL STYLE.CSS --- */

/* Main content box for Byrne pages */
main {
    max-width: 1100px;      /* narrower for better readability */
    margin: 3px auto 10px auto;     /* centers and keeps a small visible top gap */
    background: rgb(185, 237, 237);
    padding: 5px 15px 15px 15px;  /* top, right, bottom, left - more comfortable inner spacing */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    flex: 1;
}

/* Byrne article styling */
article {
    font-family:'Georgia', serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    color: black;
    margin: 3px auto 20px auto;          /* small top gap, keep existing bottom spacing */
    max-width: 1100px;            /* match main width */
    width: 90%;                  /* responsive */
    background-color: rgb(171, 175, 203);
    padding: 20px 25px 25px 25px;  /* match main padding */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Article images */
.article-image {
  width: auto;
  flex-shrink: 0; 
}
.article-image img {
  width: 600px !important;
  height: auto;
  display: block;
}
.article-text {
  width: 70%;
}
/* Article title */
.article-title {
    font-family: 'Georgia', serif; 
    font-size: 1.75rem;
    font-weight: bold;
    color: #040a10;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 1.0rem;
    line-height: 1.2;
}

/* Article subtitle */
.article-subtitle {
    font-family: 'Georgia', serif; 
    font-size: 1.65rem;
    font-weight: bold;
    color: #123353;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 1.0rem;
    line-height: 1.2;
}

/* Accreditation / captions */
.accreditation {
    font-size: 0.9rem;
    color: #141313;
    text-align: center;
    margin-top: 20px;
    font-style: italic;
}

/* =========================================
   ORIGINAL P-BYRNE STYLES
   ========================================= */

/* --- 1. HEADER SETUP --- */
.P_Byrne header::after {
  display: none;
}

.P_Byrne header {
    background: url('images/lecce-night.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: repeat;
    filter: brightness(1.2);
}

/* --- 2. THE GRID LAYOUT --- */
body.P_Byrne .articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0px 0 0 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

/* --- 3. ARTICLE CARD STYLING --- */
.P_Byrne .article-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background-color: #92d298;
  outline: 2px solid #3c3b3b;
  margin: 0; /* Safer for Safari */
  box-sizing: border-box;
}
.article-card-image {
  width: 120px;
  flex-shrink: 0;
}
.article-card-image img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 2px;
  display: block;
}

/* --- 4. IMAGE SIZING & CROP --- */
.P_Byrne .article-image {
  width: 200px;
  flex-shrink: 0;
}

.P_Byrne .article-image img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: 50% 20%; /* Standard crop for most photos */
  border-radius: 2px;
  display: block;
}

/* --- 5. THE BECKETT FACE FIX --- */
body.P_Byrne .article-card.beckett-fix .article-image img {
  object-position: 50% 85%;
}

.section-divider {
    text-align: center; /* Center the divider asterisks */
}

/* --- 6. TEXT & LINK FORMATTING --- */
.P_Byrne .article-info h3 {
  margin: 0 0 6px 0;
  font-size: 1.3rem;
}

.P_Byrne .article-info p {
  margin: 3px 0;
  font-size: 0.9rem;
  color: #161616;
}

.P_Byrne .article-info a {
  text-decoration: none;
  color: #0f141a;
}

.P_Byrne .article-info a:hover {
  text-decoration: underline;
}

/* --- 7. ARTICLE QUOTE INDENTATION --- */
.article-quote {
    margin-left: 20px;
    margin-right: 80px;  
    text-align: justify;
}

/* Only dialogue-style articles */
body.P_Byrne article.dialogue > p {
    margin: 0.15em 0;
    line-height: 1.35;
}
article.dialogue p.accreditation {
    text-align: left;
}

/* Keep Atwood 3 to the left of the paragraph beginning "The intent..." */
.intent-with-image {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin: 20px 0;
}

.intent-with-image .atwood3-intent-image {
  max-width: 42%;
  margin: 0;
  transform: translateY(5px);
}

.intent-with-image .intent-text {
  flex: 1;
}

.intent-with-image .intent-paragraph {
  margin: 0;
}

.intent-with-image .intent-text p:last-of-type {
  margin-bottom: 0;
}

/* Keep the Atwood image alongside the closing poem on larger screens. */
.poem-with-image {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  margin: 20px 0;
}

.poem-with-image .atwood4-poem-image {
  max-width: 45%;
  margin: 0;
}

.poem-with-image .atwood-poem {
  flex: 1;
  max-width: 460px;
  text-align: left;
  margin: 0;
  min-height: 0;
}

.atwood-poem {
  margin: 0;
  white-space: pre-line;
}

/* Allow other poems to overflow on mobiles but maintain spacing as in HTML */
.poem {
    font-family: 'Georgia', serif;
    white-space: pre-line;
}
/* ==========================================================
   IMAGE + TEXT SECTIONS (side by side) copied from about.css
   The order: image first or text first is controlled simply
   by the order they appear in the html.
   ========================================================== */
.story-row {
    display: flex;
    align-items: center;
    gap: 0.2rem; /*controls gap between picture and text */
    margin: -1.5rem 0;  /*controls gap between story row sections */
}

.about-main .article-title + .story-row {
    margin-top: 0;
}

.story-text {
    flex: 1;
    /* font-size: 18px; */
   /* line-height: 1.5; */
}

/* Ensures proper alignment of the first paragraph */
.story-text p {
    margin-top: 0; /* removes the extra space above the first paragraph in each section */
}

.story-text p:last-child {
    margin-bottom: 0;
}

.story-text p:first-of-type {
    margin-top: 0;
}

.author-signature {
    text-align: right !important;  /* Override the justify */
    padding-right: 3rem;
    margin-top: 1rem;  /* Add some space above */
    font-size: 16px;  /* or 14px, 18px - adjust as needed */
}

/* Dedication */
.dedication {
    text-align: center;
    font-style: italic;
    font-size: 0.90em;
    color: #1a1919;
    margin-bottom: 0.5em;
}

/* Image rows for multiple images in a row */
.image-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: flex-start;
}
.image-row img {
  max-width: 32%;
  height: auto;
}

/* Make superscripts in first paragraph of "small-first" article smaller */
article.small-first > p:first-of-type sup {
    font-size: 1.0em; 
}

/* Remove focus outline from footnote links for mouse users */
article sup a:focus:not(:focus-visible) {
    outline: none;
}

/* Lower all superscripts closer to the baseline and make them slightly bigger */
article sup {
    vertical-align: baseline;
    position: relative;
    top: 0.2em;   
    font-size: 1.0em; 
}

/* --- ADD ANIMATED SKY TO ARTICLES PAGE --- */
body.P_Byrne {
    position: relative;
}

body.P_Byrne::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/sky-background.jpg');
    background-size: cover;
    background-repeat: repeat-y;
    background-position: center 0%;
    animation: sky-move 150s linear infinite;
    filter: brightness(1.1);
    z-index: -1;
}

/* Default footnotes font size for all screens */
.footnotes {
  font-size: 0.9em;
}

/* ================================================================
   MEDIA OVERRIDES — ordered largest to smallest breakpoint
================================================================== */

@media (max-width: 768px) {
  body.P_Byrne main {
    margin: 3px auto 15px auto;
  }

  .story-row,
  .story-row.reverse {
    flex-direction: column !important;
  }

  .intent-with-image {
    flex-direction: column;
    align-items: center;
  }

  .intent-with-image .atwood3-intent-image {
    max-width: 80%;
    transform: none;
  }

  .intent-with-image .intent-paragraph {
    max-width: 100%;
  }

  .intent-with-image .intent-text {
    max-width: 100%;
  }

.poem-with-image {
  flex-direction: column;
  align-items: flex-start;
}

.poem-with-image .atwood4-poem-image {
  max-width: 80%;
  height: auto;
}

.poem-with-image .atwood-poem {
  max-width: 100%;
  margin: 0;
  min-height: 0;
  display: block;
}

}

@media (max-width: 600px) {
  body.P_Byrne main {
    margin: 3px 18px 18px 18px;
  }

  body.P_Byrne article {
    font-size: 17px;
    padding: 12px 18px 20px 18px;
  }

  body.P_Byrne .article-title {
    font-size: 1.35rem;
    margin-top: 0;
    margin-bottom: 0;
  }

  body.P_Byrne article > img {
    margin: 12px auto;
    margin-left: auto;
    margin-right: auto;
  }

  body.P_Byrne .image-and-quotes img {
    margin: 6px auto 2px auto;
    margin-left: auto;
    margin-right: auto;
  }

  body.P_Byrne .image-and-quotes {
    gap: 0.35rem;
  }

  body.P_Byrne .image-and-quotes .quotes {
    margin-top: 0;
  }

  body.P_Byrne .image-and-quotes .article-quote {
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 0;
  }

  .image-row {
    flex-direction: column;
    align-items: center;
  }

  .image-row img {
    max-width: 90%;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  body.P_Byrne main {
    margin: 3px auto 10px auto;
  }

  body.P_Byrne article {
    font-size: 16px;
    padding: 10px 14px 16px 14px;
  }

  body.P_Byrne .article-title {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 0;
  }

  body.P_Byrne article > img {
    margin: 10px auto;
    margin-left: auto;
    margin-right: auto;
  }

  body.P_Byrne .image-and-quotes img {
    margin: 4px auto 1px auto;
    margin-left: auto;
    margin-right: auto;
  }

  body.P_Byrne .image-and-quotes {
    gap: 0.25rem;
  }

  body.P_Byrne .image-and-quotes .quotes {
    margin-top: 0;
  }

  body.P_Byrne .image-and-quotes .article-quote {
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0;
  }

  .footnotes {
    font-size: 0.8em;
  }
}

@media (min-width: 769px) {
  body.P_Byrne .image-and-quotes {
    margin-top: 0.5rem;
  }
}