#header {
    position: relative;
    height: 0px;
}

#header .logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

#header .logo img {
    height: 80px;
    width: auto;
    max-width: 100%;
    margin-left: 35px;
}

/* Tablet */
@media (max-width: 768px) {
    #header .logo img {
        height: 34px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    #header {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #header .logo {
        width: 100%;
        text-align: center;
    }

    #header .logo a {
        justify-content: center;
    }

    #header .logo img {
        height: 73px;
        margin-left: -50px; /* remove left margin */
    }
}

/* GALLERY SECTION */
.gallery-section {
    position: relative;
    padding: 90px 20px;
    min-height: 400px;
    background-image: url("../../images/gallerybg.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.gallery-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

.gallery-section .container {
    position: relative;
    z-index: 2;
}

/* Heading */
.gallery-section h2 {
    color: #B22222;
    margin-bottom: 10px;
    text-align: center;
}

.gallery-sub {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 50px;
    text-align: center;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
}

.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}


/* Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-overlay span {
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: 1px;
    border: 2px solid #fff;
    padding: 10px 20px;
    border-radius: 30px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Caption */
.gallery-caption {
    text-align: center;
    padding: 14px;
    background: #111;
    color: #fff;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-item img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        padding: 70px 15px;
    }

    .gallery-item img {
        height: 200px;
    }

    .gallery-overlay span {
        font-size: 1rem;
        padding: 8px 16px;
    }
}
/******************************************************************/
/* ===============================
   RESPONSIVE FIXES – SAFE PATCH
   =============================== */

/* Ensure images scale properly */
img,
.img-fluid {
   max-width: 100%;
   height: auto;
   display: block;
}

/* Gallery Grid Fix */
.gallery-section .row {
   display: flex;
   flex-wrap: wrap;
   gap: 24px;
}

.gallery-section [class*="3u"] {
   flex: 0 0 23%;
}

/* Tablet */
@media screen and (max-width: 980px) {
   .gallery-section [class*="3u"] {
      flex: 0 0 48%;
   }

   .gallery-section {
      padding: 60px 20px;
   }

   .gallery-caption {
      font-size: 14px;
      text-align: center;
   }
}

/* Mobile */
@media screen and (max-width: 736px) {

   /* Stack everything */
   .gallery-section .row {
      flex-direction: column;
   }

   .gallery-section [class*="3u"] {
      flex: 0 0 100%;
   }

   /* Reduce hero text */
   #banner h1 {
      font-size: 2rem;
   }

   #banner p {
      font-size: 1rem;
   }

   /* Section padding fix */
   section.wrapper {
      padding: 50px 20px;
   }

   /* Gallery overlay fix */
   .gallery-overlay span {
      font-size: 14px;
      padding: 10px 18px;
   }
}

/* Extra Small Phones */
@media screen and (max-width: 480px) {

   #banner h1 {
      font-size: 1.6rem;
   }

   .gallery-caption {
      font-size: 13px;
   }

   footer form .field.half {
      width: 100%;
   }
}