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

body {
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background-color: #fff;
  
}


/* ====== Header Styles ====== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #c1a164;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: clamp(70px, 8vw, 100px);
    padding: 0 clamp(15px, 2vw, 30px);
    transition: height 0.3s ease;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 20px;
}

/* ====== Branding Styles ====== */
.branding {
    display: flex;
    align-items: center;
    height: 100%;
    position: absolute;
    left: 5px;
    transition: all 0.3s ease;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.church-logo {
    height: 5vw;
    width: 5vw;
    min-height: 50px;
    min-width: 50px;
    border-radius: 50%;
    border: 0.15vw solid rgb(36, 84, 218);
    cursor: pointer;
    animation: border-color-animation 3s infinite;
    margin-right: 1.5vw;
    object-fit: cover;
    transition: all 0.3s ease;
}

.church-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.church-name h1 {
    margin: 0;
    line-height: 1.2;
    font-size: clamp(18px, 2vw, 24px);
    white-space: nowrap;
    transition: all 0.3s ease;
    margin-left: -15px;
}

.church-name h1 a {
    color: #111;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    transition: all 0.3s ease;
    font-weight: 700;
    display: block;
}

.church-name p {
    margin: 0.2vw 0 0 0;
    font-size: clamp(10px, 1vw, 14px);
    white-space: nowrap;
    transition: all 0.3s ease;
    margin-left: -15px;
}

.church-name p a {
    color: #111;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    transition: all 0.3s ease;
}

.church-name p a:hover {
    color: #444;
}

/* ====== Navigation Styles ====== */
.main-navigation {
    position: absolute;
    left: 66%;
    transform: translateX(-50%);
    width: auto;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
    gap: 1.8vw;
}

.nav-menu > li {
    position: relative;
    padding: 0.7vw 0;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-menu > li:hover {
    transform: translateY(-2px);
}

.nav-menu > li > a {
    text-decoration: none;
    color: #111;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(12px, 1vw, 16px);
    text-transform: uppercase;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Main Navigation Link Animation */
.nav-menu > li > a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.3vw;
    width: 0;
    height: 0.2vw;
    background-color: #fff;
    transform: translateX(-50%);
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-menu > li > a:hover::after {
    width: 50%;
}

/* ====== Submenu Styles ====== */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #c1a164;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border-radius: 0 0 5px 5px;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.submenu li {
    padding: 0.7vw 1vw;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.has-submenu:hover .submenu li {
    opacity: 1;
    transform: translateY(0);
}

/* Submenu Link Animation */
.submenu li a {
    color: #111;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.9em;
    white-space: nowrap;
    display: block;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5vw 0;
}

.submenu li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: all 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.submenu li a:hover::after {
    width: 100%;
}

.submenu li:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Staggered Submenu Animations */
.submenu li:nth-child(1) { transition-delay: 0.1s; }
.submenu li:nth-child(2) { transition-delay: 0.2s; }
.submenu li:nth-child(3) { transition-delay: 0.3s; }
.submenu li:nth-child(4) { transition-delay: 0.4s; }
.submenu li:nth-child(5) { transition-delay: 0.5s; }

.arrow {
    display: inline-block;
    margin-left: 5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.8em;
}

.has-submenu:hover .arrow {
    transform: rotate(180deg) scale(1.2);
}

/* ====== IELC Logo Styles ====== */
.denomination-logo {
    position: absolute;
    right: 5px;
    transition: all 0.3s ease;
}

.lutheran-logo {
    height: 5vw;
    width: 5vw;
    min-height: 50px;
    min-width: 50px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
    transition: all 0.3s ease;
}

.lutheran-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* ====== Hamburger Menu Styles ====== */
.hamburger-menu {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 101;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #111;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hamburger-menu:hover span {
    background-color: #444;
    transform: scaleX(1.1);
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* ====== Mobile Menu Styles ====== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c1a164;
    z-index: 99;
    padding-top: 120px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu .nav-menu {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.mobile-menu .nav-menu > li {
    padding: 0;
    height: auto;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.mobile-menu .has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 20px;
}

.mobile-menu .has-submenu > a::after {
    content: "+";
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.mobile-menu .has-submenu.active > a::after {
    content: "-";
}

.mobile-menu .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    padding-left: 15px;
    background-color: rgba(0,0,0,0.05);
    margin: 5px -10px 0 -10px;
    border-radius: 5px;
    box-shadow: none;
}

.mobile-menu .has-submenu.active .submenu {
    max-height: 1000px;
    padding: 10px 15px;
}

.mobile-menu .submenu li {
    padding: 8px 0;
    opacity: 1 !important;
    transform: none !important;
}

.mobile-menu .submenu li a {
    display: block;
    padding: 8px 0;
    font-size: 16px;
    color: #111;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu .nav-menu > li:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu .nav-menu > li:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu .nav-menu > li:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu .nav-menu > li:nth-child(4) { animation-delay: 0.4s; }
.mobile-menu .nav-menu > li:nth-child(5) { animation-delay: 0.5s; }

/* ====== Animations ====== */
@keyframes border-color-animation {
    0% { border-color: rgb(36, 84, 218); }
    33% { border-color: rgb(255, 0, 0); }
    66% { border-color: rgb(0, 255, 0); }
    100% { border-color: rgb(36, 84, 218); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


@media (max-width: 992px) {
    body.menu-open {
        overflow: hidden;
    }

    header {
        height: 100px;
        padding: 15px 20px;
    }
    
    .header-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        height: 100%;
    }
    
    .branding {
        position: static;
        margin: 0;
        flex-direction: row;
        align-items: center;
        text-align: left;
        width: auto;
        height: auto;
    }
    
    .logo-link {
        flex-direction: row;
        height: auto;
    }
    
    .church-logo {
        height: 60px;
        width: 60px;
        margin-right: 15px;
    }
    
    .church-name {
        align-items: flex-start;
    }
    
    .church-name h1 {
        white-space: normal;
        line-height: 1.2;
        font-size: 20px;
    }
    
    .church-name p {
        margin-top: 5px;
        text-align: left;
        font-size: 14px;
    }
    
    .main-navigation {
        display: none;
    }
    
    .denomination-logo {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
        position: static;
        transform: none;
        width: 35px;
        height: 28px;
    }
    
    .hamburger-menu span {
        height: 4px;
    }
    
    .mobile-menu {
        display: block;
    }
}

@media (max-width: 768px) {
    header {
        height: 90px;
    }
    
    .church-logo {
        height: 50px;
        width: 50px;
    }
    
    .church-name h1 {
        font-size: 18px;
         
    }
    
    .church-name p {
        font-size: 13px;
    }
    
    .hamburger-menu {
        width: 32px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 100px;
    }
    
    header {
        height: 100px;
        padding: 15px;
    }
    
    .church-logo {
        height: 60px;
        width: 60px;
        margin-right: 15px;
    }
    
    .church-name h1 {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .church-name p {
        font-size: 14px;
        margin-top: 5px;
    }
    
    .hamburger-menu {
        width: 36px;
        height: 28px;
        right: 15px;
    }
    
    .hamburger-menu span {
        height: 4px;
    }
    
    .mobile-menu {
        padding-top: 120px;
    }
    
    .mobile-menu .nav-menu > li > a {
        font-size: 16px;
        padding: 10px 0;
    }
    
    .mobile-menu .submenu li a {
        font-size: 14px;
    }
}

@media (min-width: 990px) and (max-width: 1350px) {
  /* Adjust header height for mid-sized screens */
  header {
    height: clamp(80px, 7vw, 90px);
  }

  /* Center-align navigation with reduced gap */
  .main-navigation {
    left: 68%; /* Pull nav slightly left */
    transform: translateX(-50%);
  }

  /* Reduce gaps between nav items */
  .nav-menu {
    gap: 1.2vw;
  }

  /* Scale down logos */
  .church-logo,
  .lutheran-logo {
    height: 4.5vw;
    width: 4.5vw;
    min-height: 45px;
    min-width: 45px;
  }

  /* Adjust church name sizing */
  .church-name h1 {
    font-size: clamp(16px, 1.8vw, 22px);
  }

  .church-name p {
    font-size: clamp(9px, 0.9vw, 13px);
  }

  /* Compress submenu widths */
  .submenu {
    min-width: 160px;
  }

  /* Reduce padding in submenu items */
  .submenu li {
    padding: 0.5vw 0.8vw;
  }
}



h1 {
  text-align: center;
  margin-top: 10vw;
  font-family: Cinzel;
}

.gallery {
  display: grid;
  gap: 20px;
  margin: 30px auto 0;
  width: 90%;
  max-width: 1200px;
  padding: 0 20px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.gallery img,
.gallery .folder {
  width: 100%;
  aspect-ratio: 4 / 3; /* Maintain good image proportion */
  object-fit: contain; /* ✅ Show full image, no cropping */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  color: #333;
  text-align: center;
  font-size: 20px;
  font-family: 'Cinzel', serif;
  font-weight: 500;
  padding: 10px;
  box-sizing: border-box;
}


.gallery .folder {
  background-color: #f8f8f8;
  border: 2px solid #c1a164;
  flex-direction: column;
}

.gallery .folder::before {
  content: "📁";
  font-size: 40px;
  margin-bottom: 15px;
}

.gallery img:hover,
.gallery .folder:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}
.modal-content {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  touch-action: pinch-zoom;
}
#modal-content-container {
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
}


.close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.loading {
  color: white;
  font-size: 24px;
}

.breadcrumb {
  margin: 10px 0;
  font-size: 14px;
  color: #4285F4;
  cursor: pointer;
}


/* Media Queries for Better Responsiveness */

@media (min-width: 600px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}




/* Base Footer Styles */
footer {
    background-color: #c1a164;
    color: white;
    padding: 2vw 2vw;
    font-family: 'Cinzel', serif;
    margin-top: 5vw;
  }
  
  .footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  
  .footer-content a {
    color: #fff;
    text-decoration: none;
  }
  
  .footer-content div {
    width: 30%;
    padding: 10px;
    box-sizing: border-box;
  }
  
  .footer-content .contactus-info p {
    margin: 8px 0;
  }
  
  .footer-content .quick-links ul,
  .footer-content .legal ul {
    list-style-type: none;
    padding-left: 0;
  }
  
  .footer-content .quick-links li,
  .footer-content .legal li {
    margin: 8px 0;
  }
  
  .footer-content .quick-links a,
  .footer-content .legal a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
  }
  
  .footer-content .quick-links a:hover,
  .footer-content .legal a:hover {
    color: #444;
  }
  
  .footer-bottom {
    text-align: center;
    border-top: 1px solid #fff;
    padding-top: 10px;
  }
  
  .footer-bottom p {
    margin: 0;
    font-size: 14px;
    line-height: 1vw;
  }

  i {
    margin-right: 8px;
    color: #fff; /* optional: change icon color */
  }
  
  /* Media Queries for All Ratios */
  
  /* Ultra-wide screens (21:9 and wider) */
  @media (min-aspect-ratio: 21/9) {
    footer {
      padding: 1.5vw 4vw;
    }
    .footer-content div {
      width: 28%;
    }
  }
  
  /* Standard desktop (16:9) - base styles apply */
  
  /* Large tablets & small desktops (4:3) */
  @media (max-width: 1199px) {
    .footer-content {
      gap: 1rem;
    }
    .footer-content div {
      width: 30%;
      padding: 8px;
    }
  }
  
  /* Tablets (3:4) */
  @media (max-width: 991px) {
    .footer-content div {
      width: 45%;
      margin-bottom: 1rem;
    }
    .footer-bottom p {
      font-size: 13px;
    }
  }
  
  /* Large phones (9:16) */
  @media (max-width: 767px) {
    footer {
      padding: 3vw 4vw;
    }
    .footer-content {
      flex-direction: column;
    }
    .footer-content div {
      width: 100%;
      padding: 10px 0;
    }
    .footer-bottom p {
      font-size: 12px;
      line-height: 1.5;
    }
  }
  
  /* Small phones (narrow) */
  @media (max-width: 575px) {
    footer {
      padding: 4vw 5vw;
    }
    .footer-content a {
      font-size: 13px;
    }
    .footer-bottom {
      padding-top: 15px;
    }
  }
  
  /* Portrait orientation adjustments */
  @media (orientation: portrait) {
    /* Tablet portrait */
    @media (min-width: 768px) and (max-width: 991px) {
      .footer-content div {
        width: 48%;
      }
    }
    
    /* Phone portrait */
    @media (max-width: 575px) {
      .footer-content div {
        padding: 8px 0;
      }
    }
  }
  
  /* Landscape orientation adjustments */
  @media (orientation: landscape) {
    /* Tablet landscape */
    @media (max-width: 991px) {
      .footer-content div {
        width: 48%;
      }
    }
    
    /* Phone landscape */
    @media (max-width: 767px) {
      .footer-content div {
        width: 30%;
      }
    }
  }
  
  /* Square aspect ratio (1:1) */
  @media (max-aspect-ratio: 1/1) {
    .footer-content {
      flex-direction: column;
    }
    .footer-content div {
      width: 100%;
    }
  }
  
  /* Very small screens */
  @media (max-width: 399px) {
    footer {
      padding: 5vw;
    }
    .footer-content a,
    .footer-bottom p {
      font-size: 12px;
    }
  }
  
  /* High density displays */
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .footer-content a {
      font-weight: 500;
    }
  }