/* Cleaned style.css
   NOTE: This is a starter cleaned version preserving the main structure.
   Key fixes:
   - Removed duplicate header rules
   - Fixed missing media-query brace
   - Announcement images keep aspect ratio
*/

*{margin:0;padding:0;box-sizing:border-box;}

body{
  font-family:Georgia,serif;
  max-width:1200px;
  margin:auto;
  padding:20px;
}

header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:sticky;
  top:0;
  z-index:1000;
  background:#fff;
  padding:15px 25px;
  margin-bottom:30px;
  border-bottom:1px solid #ddd;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
  font-family:"Roboto",sans-serif;
}

header h1{white-space:nowrap;font-size:clamp(1rem,2vw,2rem);}
nav{display:flex;gap:20px;}
nav a{text-decoration:none;color:#222;}
nav a:hover{text-decoration:underline;}

.page-layout{display:flex;max-width:1400px;margin:0 auto;}

aside{
  flex:0 0 250px;
  padding:25px;
  background:#f5f5f2;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
  font-family:"Roboto",sans-serif;
  align-self:flex-start;
}

aside h3{margin-bottom:20px;transform:rotate(-1deg);}

.announcement{
  background:#fff;
  padding:15px;
  border-radius:8px;
  margin-bottom:20px;
  transition:.2s;
}

.announcement:hover{
  background:#ddd8d0;
  transform:translateY(-2px);
}

aside .announcement img{
  display:block;
  width:100%;
  height:auto;
  margin:10px 0;
  border-radius:4px;
}

main{flex:1;padding:0px 30px 30px;}

article{
  max-width:750px;
  background:#fff8c9;
  background-image:linear-gradient(#fff8c9 95%,#e8dfa5 100%);
  background-size:100% 30px;
  border:.5px solid #e2e2e2;
  border-radius:6px;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
  padding:35px;
  margin-bottom:25px;
  font-family:"Roboto",sans-serif;
}

.article-image{margin:25px 0;text-align:center;}
.article-image img{max-width:100%;height:auto;border-radius:4px;cursor:pointer;}
.article-image figcaption{font-size:.85rem;color:#666;margin-top:8px;}

.gallery{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:30px;
align-items:start;
}

.gallery-item{
display:flex;
flex-direction:column;
align-items:center;
text-align:center;
}

.gallery-item img{
display:block;
width:85%;
height:auto;
max-height:350px;
object-fit:contain;
cursor:pointer;
transition:transform .2s ease;
margin:0 auto;
}

.gallery-item img:hover{
transform:translateY(-4px);
}

.gallery-item figcaption{
margin-top:12px;
font-size:.9rem;
line-height:1.4;
text-align:center;
width:85%;
}

@media (min-width:701px){
  aside{position:sticky;top:90px;}
}

@media (max-width: 700px){
  .page-layout {
    flex-direction: column;
  }
  
  /* The Sidebar becomes the outer wrapper */
  aside {
    position: static;
    display: block;        /* Changed from flex to block to act as a proper box */
    padding: 15px;
    background: #f5f5f2;   /* Restored background color for mobile */
    box-shadow: none;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 20px;
  }
  
  /* Keeps the title visible on mobile, positioned nicely above the scroll */
  aside h3 {
    display: block; 
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  /* The actual scrolling window container */
  .fridge-scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;      /* Enables the horizontal scrolling */
    overflow-y: hidden;    /* Blocks accidental vertical shifting */
    width: 100%;
    padding-bottom: 10px;  /* Leaves space for the scroll track */
    -webkit-overflow-scrolling: touch; /* Smooth momentum scroll for iOS */
  }

  /* Individual announcement cards */
  .announcement {
    position: relative;
    flex: 0 0 200px;       /* CRITICAL: Prevents cards from shrinking. Locked at 200px wide. */
    padding: 12px;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    background: #fff;      /* Clean background for cards */
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
  }

  .announcement h4 {
    font-size: .9rem;
    line-height: 1.2;
    margin-bottom: 8px;
    text-align: center;
  }

  aside .announcement img {
    width: 100%;
    height: 120px;         /* Forces a standard uniform height for images */
    object-fit: cover;     /* Crops image neatly without squeezing it */
    border-radius: 4px;
    margin: 0 0 8px 0;
  }

  /* Restored paragraph text on mobile with smaller, clean typography */
  .announcement p {
    display: block;        
    font-size: 0.8rem;
    color: #444;
    line-height: 1.3;
  }

  /* Rest of your global mobile overrides */
  .gallery {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .gallery-item img {
    height: auto;
  }
  
  header {
    gap: 15px;
  }
  
  header h1 {
    font-size: 1.2rem;
  }
  
  nav {
    gap: 10px;
    font-size: .9rem;
  }
}

/* Styling for your about page headshot */
.about-photo {
  display: block;          /* Forces text to wrap cleanly underneath the image */
  width: 100%;             /* Allows the image to scale down fully on mobile screens */
  max-width: 350px;        /* Prevents the image from expanding past 350px on desktop */
  height: auto;            /* Keeps the original proportions without distorting */
  margin: 0 0 25px 0;      /* Adds a clean space below the photo before the heading */
  border-radius: 8px;      /* Optional: matches the 8px rounded corners of your site style */
}

/* Aligns text on both sides and indents the first line */
main p {
  text-align: left;
  text-indent: 30px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ==========================================================================
   LIGHTBOX FUNCTIONALITY
   ========================================================================== */

/* The main fullscreen dark wrapper */
#lightbox {
  display: none;             /* Hidden entirely until activated by JS */
  position: fixed;           /* Locks it tightly over the screen viewport */
  z-index: 9999;             /* Forces it over your sticky headers/sidebars */
  top: 0;
  left: 0;
  width: 100vw;              /* Spans full window width */
  height: 100vh;             /* Spans full window height */
  background-color: rgba(0, 0, 0, 0.9); /* 90% dark overlay */
  justify-content: center;   /* Centers contents horizontally */
  align-items: center;       /* Centers contents vertically */
  cursor: pointer;           /* Clicking anywhere closes the modal */
}

/* Added by JavaScript when an image is clicked */
#lightbox.active {
  display: flex;
}

/* Internal box grouping image and text safely */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;            /* Guarantees minor margins on thin mobile displays */
  max-height: 90%;
}

/* The actual blown-up view image */
.lightbox-content img {
  max-width: 100%;           /* Will scale down if the window shrinks narrow */
  max-height: 80vh;          /* Capped at 80% window height to make room for captions */
  width: auto;               /* Allows proportional calculation */
  height: auto;              /* Prevents squishing and overrides your 300px default */
  object-fit: contain;       /* Keeps complete image visible without cropping it */
  border-radius: 4px;
  box-shadow: 0 4px 25px rgba(0,0,0,0.6);
}

/* Captions beneath the lightbox preview image */
#lightbox-caption {
  color: #fff;
  font-family: "Roboto", sans-serif;
  margin-top: 15px;
  font-size: 1.05rem;
  text-align: center;
  line-height: 1.4;
  text-indent: 0;            /* Overrides your global paragraph indent rule */
}

/* LIGHTBOX CLOSE BUTTON (X) */
.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 40px;
  font-weight: bold;
  transition: 0.2s;
  cursor: pointer;
  user-select: none;
  z-index: 10000;            /* Keeps it above the image content box */
}

.close-lightbox:hover {
  color: #fff;               /* Brightens to full white on hover */
  transform: scale(1.1);     /* Subtle grow effect */
}

/* Shrink close button slightly on small phone screens so it doesn't crowd out the art */
@media (max-width: 600px) {
  .close-lightbox {
    top: 10px;
    right: 20px;
    font-size: 35px;
  }
}
/* Fullscreen Dark Lightbox Overlay */
#lightbox {
  display: none;             /* Hidden by default */
  position: fixed;           /* Pins it over everything on screen */
  z-index: 9999;             /* Forces it to the top layer */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95); /* Deep dark backdrop */
  justify-content: center;
  align-items: center;
}

/* Activated by JavaScript */
#lightbox.active {
  display: flex;
}

/* Safe wrapper container */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90%;
}

/* The actual image container dimensions */
.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;       /* Scales proportionally */
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.7);
}

/* Image captions centered */
#lightbox-caption {
  color: #fff;
  font-family: "Roboto", sans-serif;
  margin-top: 15px;
  font-size: 1.1rem;
  text-align: center;
  text-indent: 0;            /* Keeps text perfectly centered */
}

#lightbox{
display:none;
position:fixed;
inset:0;
background:rgba(0,0,0,.88);
justify-content:center;
align-items:center;
z-index:9999;
}

.lightbox-content{
position:relative;
text-align:center;
max-width:90vw;
max-height:90vh;
}

#lightbox img{
max-width:90vw;
max-height:80vh;
}

#lightbox-close{
position:absolute;
top:15px;
right:15px;
width:42px;
height:42px;
border:none;
border-radius:50%;
background:rgba(255,255,255,.65);
color:#222;
font-size:1.8rem;
line-height:42px;
cursor:pointer;
box-shadow:0 3px 10px rgba(0,0,0,.25);
transition:.2s;
z-index:10000;
}

#lightbox-close:hover{
transform:scale(1.1);
background:#fff;
}

.about-page{
max-width:850px;
margin:0 auto;
}

.about-photo{
display:block;
width:220px;
height:auto;
margin:10px auto 35px;
padding:10px;
background:#fff;
border:1px solid #ddd;
border-radius:8px;
box-shadow:0 6px 18px rgba(0,0,0,.18);
transform:rotate(-1.5deg);
}

.about-page h2{
font-size:2rem;
margin-bottom:18px;
text-align:center;
font-family:"Roboto",sans-serif;
}

.about-page p{
font-size:1.05rem;
line-height:1.9;
max-width:720px;
margin:0 auto 28px;
text-align:justify;
text-indent:2em;
}


.contact-page h2{
font-size:2rem;
margin-bottom:18px;
text-align:left;
font-family:"Roboto",sans-serif;
}

.contact-page p{
font-size:1.05rem;
line-height:1.9;
max-width:720px;
margin:0 auto 28px;
text-align:left;
text-indent:2em;
}

/* CONTACT PAGE */

.contact-page{
max-width:700px;
margin:0 auto;
padding:20px;
font-family:"Roboto",sans-serif;
}

.contact-page h2{
font-size:2.2rem;
text-align:center;
margin-bottom:15px;
}

.contact-page>p:first-of-type{
text-align:center;
font-size:1.05rem;
line-height:1.8;
margin-bottom:40px;
color:#444;
}

.contact-page h3{
margin-top:35px;
margin-bottom:12px;
font-size:1.3rem;
border-bottom:2px dashed #d8d1b0;
padding-bottom:6px;
}

.contact-page a{
color:#2d5a87;
text-decoration:none;
transition:.2s;
}

.contact-page a:hover{
color:#111;
text-decoration:underline;
}

.social-links{
list-style:none;
padding:0;
margin-top:10px;
}

.social-links li{
display:flex;
align-items:center;
gap:15px;
background:#fff;
padding:16px 20px;
margin-bottom:15px;
border-radius:10px;
box-shadow:0 3px 10px rgba(0,0,0,.08);
transition:.2s;
}

.social-links li:hover{
transform:translateY(-3px);
box-shadow:0 8px 18px rgba(0,0,0,.15);
}

.social-links i{
width:42px;
height:42px;
display:flex;
justify-content:center;
align-items:center;
font-size:1.4rem;
background:#f5f5f2;
border-radius:50%;
color:#555;
transition:.2s;
}

.social-links li:hover i{
background:#fff8c9;
color:#222;
}

.contact-page p:last-of-type{
font-size:1.1rem;
}

/* PORTFOLIO PAGE */

.portfolio-page{
display:flex;
justify-content:center;
padding:30px 0;
}

.portfolio-page article{
width:100%;
max-width:1100px;
margin:0 auto;
}

.portfolio-intro{
max-width:850px;
margin:0 auto 45px;
text-align:center;
font-family:"Roboto",sans-serif;
}

.portfolio-intro h1{
font-size:2.5rem;
margin-bottom:12px;
}

.portfolio-intro .subtitle{
font-size:1.2rem;
font-style:italic;
color:#666;
margin-bottom:25px;
text-indent:0;
}

.portfolio-intro{
max-width:850px;
margin:0 auto;
padding:45px 0;
text-align:center;
font-family:"Roboto",sans-serif;
}


