body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    background-color: #f4f4f9;
}

.book-flip-wrapper {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  /* No special overflow here */
}

.book-section {
  position: absolute;
  width: 100%;
  height: 100vh !important; /* Fixed height for all sections */
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.2s linear;
  overflow: hidden;
}

.book-section.active {
  opacity: 1;
  z-index: 10;
  pointer-events: auto;
}

.flip-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.70s cubic-bezier(.7,0,.3,1);
  transform-origin: top center;
  background: transparent;
  will-change: transform;
  position: absolute;
  left: 0; top: 0;
}

/* Flip up when leaving */
.book-section.flipping-out .flip-inner {
  transform: rotateX(-90deg);
}

.book-section.active .flip-inner {
  transform: rotateX(0deg);
}

.book-section:not(.active):not(.flipping-out) .flip-inner {
  transform: rotateX(-90deg);
}

/* For the last section, allow scrolling to reach the footer! */
.book-section .contact-box{
  max-height:100vh;
  overflow-y:auto;
  overscroll-behavior:contain;
}

body, .book-flip-wrapper {
  overflow-x: hidden !important;
}

.scroll-gallery {
  position: relative;
  min-height: 400vh;
  overflow: visible;

}

/* Blue bubble shapes */
.gallery-shape {
  position: absolute;
  opacity: 0.13;
  z-index: 1;
  pointer-events: none;
  /* Animate using floatY */
}

.shape--circle.gallery-shape {
  width: 350px;
  height: 350px;
  background: #02258e;
  border-radius: 50%;
  top: 0;
  left: -90px;
  animation: floatY 7s ease-in-out infinite;
}

.shape--square.gallery-shape {
  width: 200px;
  height: 200px;
  background: #0642f6;
  transform: rotate(45deg);
  bottom: 20px;
  right: -80px;
  animation: floatY 6s ease-in-out reverse infinite;
}

@keyframes floatY {
  0%,100% { transform: translateY(0) scale(1);}
  50%     { transform: translateY(22px) scale(1.01);}
}

/* Gallery Slides */
/* ==== GALLERY PINTEREST/MASONRY ==== */
.modern-gallery {
  padding: 70px 0 50px 0;
  background: #f4f6fb;
}
.gallery-title {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 700;
  color: #1336c1;
  margin-bottom: 32px;
  background: #fff;
  border-radius: 32px;
  padding: 16px 38px 14px 38px;
  box-shadow: none;
  width: auto;                /* Allow auto width */
  max-width: 90vw;            /* Responsive: never overflow screen */
  margin-left: auto;
  margin-right: auto;
  display: block;
  white-space: nowrap;        /* Prevent line breaks */
  overflow-x: auto;           /* Allow scrolling if needed on tiny screens */
}

/* --- Masonry Layout --- */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 220px 220px;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.gallery-masonry-item {
  background: #f7f9fa;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: none;
  border: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s cubic-bezier(0.77,0,0.175,1);
  height: 220px;
}
.gallery-masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%; /* Try this lower value to show more face */
  border-radius: 32px;
  background: #f7f9fa;
  display: block;
  transition: transform 0.32s cubic-bezier(0.77,0,0.175,1);
}


.gallery-masonry-item--large {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  height: 472px;
}

/* DARK OVERLAY ON HOVER */
.gallery-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(22, 24, 36, 0); /* transparent initially */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 
    background 0.33s cubic-bezier(0.77,0,0.175,1),
    opacity 0.33s cubic-bezier(0.77,0,0.175,1);
  pointer-events: none;
}
.gallery-masonry-item:hover .gallery-overlay,
.gallery-masonry-item:focus .gallery-overlay {
  background: rgba(22, 24, 36, 0.78); /* deep black overlay */
  opacity: 1;
  pointer-events: auto;
}

/* Center the info in the middle for a more bold effect */
.gallery-info {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.36s cubic-bezier(0.77,0,0.175,1), transform 0.42s cubic-bezier(0.77,0,0.175,1);
  pointer-events: none;
}
.gallery-masonry-item:hover .gallery-info,
.gallery-masonry-item:focus .gallery-info {
  opacity: 1;
  transform: translateY(0);
}
.gallery-info h3 {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 1px 2px 6px rgba(10,16,40,0.26);
}
.gallery-info p {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.12px;
  color: #e5e9fc;
  margin-bottom: 0;
}

/* Responsive: stack to 2 columns/tablet, 1 column/mobile */
@media (max-width: 900px) {
  .gallery-masonry {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 180px 180px;
    gap: 20px;
  }
  .gallery-masonry-item--large {
    grid-column: 1 / 3;
    grid-row: 2 / 4;
    height: 380px;
  }
  .gallery-masonry-item {
    height: 180px;
  }
}
@media (max-width: 600px) {
  .gallery-title {
    font-size: 1.15rem;
    padding: 10px 10px;
    width: 98vw;
  }
  .gallery-masonry {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 18px;
  }
  .gallery-masonry-item,
  .gallery-masonry-item--large {
    grid-column: auto !important;
    grid-row: auto !important;
    height: 160px !important;
  }
  .gallery-title {
    font-size: 1.15rem;
    padding: 10px 10px;
  }
}

/* New Header Styling */
/* Sticky header that slides away on scroll-up and back in on scroll-down */
.custom-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 999;
  transition: transform 0.3s ease, background-color 0.3s;
  will-change: transform;
}

/* Applied when the user scrolls up */
.custom-header.hidden {
  transform: translateY(-110%);   /* 2) push it a bit further up */
  box-shadow: none !important;     /* kill any lingering shadow */
}

/* (Optional) keeps your existing white-bg-on-scroll */
.custom-header.scrolled {
  background-color: white !important;
}

/* Logo */
.header-logo {
    height: 70px;
    transition: transform 0.3s ease;
}
.header-logo:hover {
    transform: scale(1.05);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* First bg image section styles */
.hero {
    background-image: url('../img/home-page-1.png'); /* Replace with your background image URL */
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeIn 2s ease-in;
}

.hero h1 {
    color: rgb(255, 255, 255);
    font-size: 60px;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    margin-top: 300px;
}

.hero p {
    color: white;
    font-size: 18px;
}

.professional-about {
  position: relative;
  background: #fff;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  animation: sectionFadeIn 1.4s cubic-bezier(0.77, 0, 0.175, 1);
  opacity: 0;
  transition: opacity 0.7s;
}
.professional-about.about-fadein { opacity: 1; }

.shape {
  position: absolute;
  opacity: 0.13;
  animation: floatY 2.7s ease-in-out infinite alternate;
  z-index: 1;
  pointer-events: none;
}
.shape--circle {
  width: 340px; height: 340px;
  background: #02258e;
  border-radius: 50%;
  top: -35px; left: -70px;
}
.shape--square {
  width: 180px; height: 180px;
  background: linear-gradient(135deg, #0642f6 75%, #1336c1 100%);
  border-radius: 22px;
  transform: rotate(38deg);
  bottom: 48px; right: -40px;
}
@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(38px); }
}
@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(30px);}
  to   { opacity: 1; transform: translateY(0);}
}

.prof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 6vw;
  box-sizing: border-box;
  gap: 2.5rem;
}

/* TEXT COLUMN */
.prof-text {
  position: relative;
  padding: 2.5rem 2rem 2.5rem 2rem;
  background: #f0f8ff;
  border-radius: 18px;
  z-index: 3;
  box-shadow: 0 6px 30px rgba(30,50,120,0.04);
  max-width: 95vw;
}
.text-backdrop {
  position: absolute;
  top: 0; left: -15%;
  width: 130%; height: 100%;
  background: #f5f5f5;
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
  z-index: 1;
}
.prof-text h2 {
  font-size: 2.5rem;
  color: #02258e;
  font-weight: 700;
  margin-bottom: 1.1rem;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
  transition: color 0.2s;
}
.prof-text h2::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0;
  width: 64px; height: 4px;
  background: linear-gradient(90deg,#02258e,#0642f6);
  border-radius: 2px;
  opacity: 0.85;
  transition: width 0.5s;
}
.prof-text h2:hover,
.prof-text h2.visible {
  color: #1336c1;
}
.prof-text h2:hover::after,
.prof-text h2.visible::after {
  width: 94px;
}
.prof-text p {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #444;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  font-weight: 400;
}

/* IMAGE COLUMN (no blue outline/frame, just shadow & glow) */
.prof-media {
  position: relative;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 560px;
  z-index: 3;
  width: 100%;
  margin-left: 60px;
}
.media-glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 560px; height: 560px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    #b4ecff 0%,
    #d7e7ff 65%,
    #fff 100%);
  filter: blur(42px);
  z-index: 1;
  opacity: 0.66;
  pointer-events: none;
}
.media-imgframe {
  position: relative;
  display: inline-block;
  z-index: 2;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  background: transparent;
  padding: 0;
  animation: none;
}
.media-imgframe img {
  display: block;
  max-width: 530px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  background: #fff;
  transition: transform 0.38s, box-shadow 0.38s;
}
.media-imgframe img:hover {
  transform: scale(1.04);
  box-shadow: 0 24px 76px rgba(0,0,0,0.17);
}

/* Reveal helper */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s cubic-bezier(0.77,0,0.175,1), transform 0.65s cubic-bezier(0.77,0,0.175,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* WAVE: gradient color matching the shapes */
.wave-outer {
  position: absolute;
  bottom: -26px;
  left: 0;
  width: 100%;
  height: 110px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.wave {
  width: 100%;
  height: 110px;
  display: block;
}

/* Service Box Styles */
.service-box {
    background-color: rgba(249, 249, 249, 0.8) !important;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.service-list-container {
    background-color: rgba(231, 240, 250, 0.8);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.service-details {
    background-color: rgba(231, 240, 250, 0.8);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Gallery Box Styles */
.gallery-box {
    background-color: rgba(249, 249, 249, 0.8) !important;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.gallery-info-box {
    background-color: rgba(231, 240, 250, 0.8);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.slider-container {
    background-color: rgba(231, 240, 250, 0.8);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Contact us section */
.contact-box {
    background-color: rgba(249, 249, 249, 0.8) !important;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(30, 40, 90, 0.18), 0 1.5px 6px rgba(100, 120, 160, 0.12);
}

.row.align-items-stretch {
    align-items: stretch !important;
    display: flex;
}

.contact-img-side,
.contact-form-box {
    height: 100%;
    min-height: 100%;
}

.contact-img-side img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Footer Styles */
.footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer p {
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
}

.footer-nav a:hover {
    color: white;
}

/* Button Styles */
.btn-professional {
    width: auto !important;
    height: auto !important;
    border-radius: 30em;
    font-size: auto !important;
    font-family: inherit;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2), -3px -3px 7px #fff !important;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    color: #000; /* Default text color */
    background-color: rgb(255, 191, 0);
    padding: 10px 24px; /* Adjust padding as needed */
}

.btn-professional::before {
    content: '';
    width: 0;
    height: 3em;
    border-radius: 30em;
    position: absolute;
    top: 0;
    left: 0;
    background-image: linear-gradient(to right, #02258e 0%, #0642f6 100%);
    transition: .7s ease;
    display: block;
    z-index: -1;
}

.btn-professional:hover::before {
    width: 100% !important; /* Ensure the pseudo-element covers the entire button width */
}

.btn-professional:hover {
    color: #fff; /* Change text color to white on hover */
}

/* Media Queries */
/* Media Queries for Complete Responsiveness */

/* Extra Large Devices (≥1400px) */
@media (min-width: 1400px) {
    .header {
        width: 90%;
        margin: auto;
    }

    .hero h1 {
        font-size: 70px;
    }

    .prof-text h2 {
        font-size: 3rem;
    }

    .prof-text p {
        font-size: 1.25rem;
    }
}

/* Large Devices (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .header {
        width: 90%;
        margin: auto;
    }

    .hero h1 {
        font-size: 60px;
    }

    .btn-professional {
        font-size: 15px;
    }

    .prof-text h2 {
        font-size: 2.5rem;
    }

    .prof-text p {
        font-size: 1.15rem;
    }
}

/* Medium-Large Devices (992px - 1199px) */
@media (max-width: 1199.98px) {
    .header {
        width: 95%;
    }

    .hero h1 {
        font-size: 48px;
    }

    .btn-professional {
        font-size: 14px;
        padding: 10px 20px;
    }

    .prof-grid {
        gap: 2rem;
        padding: 0 4vw;
    }

    .prof-text h2 {
        font-size: 2.2rem;
    }

    .prof-text p {
        font-size: 1.1rem;
    }

    .media-imgframe img {
        max-width: 450px;
    }

    .services-title {
        font-size: 2.5rem;
    }
}

/* Medium Devices (768px - 991px) */
@media (max-width: 991.98px) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 10px 20px;
    }

    .header img {
        max-width: 60px;
        height: auto;
    }

    .hero {
        padding: 0 20px;
        text-align: center;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 16px;
    }

    .btn-professional {
        height: 2.8em;
        font-size: 13.5px;
        padding: 8px 18px;
    }

    /* About Section - Stack vertically */
    .prof-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 5vw;
        text-align: center;
    }

    .prof-text {
        order: 1;
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    .prof-media {
        order: 2;
        margin-left: 0;
        justify-content: center;
        min-height: 400px;
    }

    .prof-text h2 {
        font-size: 2rem;
        text-align: center;
    }

    .prof-text p {
        font-size: 1rem;
        text-align: center;
    }

    .media-imgframe img {
        max-width: 400px;
    }

    .media-glow {
        width: 450px;
        height: 450px;
    }

    /* Services Section */
    .services-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .expanding-services {
        flex-direction: column;
        gap: 1rem;
    }

    .expanding-card {
        width: 100% !important;
        height: 200px;
    }

    .expanding-card.expanded {
        height: 250px;
    }

    .expanding-card h3 {
        font-size: 1.3rem;
    }

    /* Gallery Section */
    .gallery-info-box,
    .slider-container {
        padding: 25px;
    }

    .gallery-info-box h3 {
        font-size: 1.5rem;
    }

    /* Contact Section */
    .contact-form-box {
        padding: 25px;
    }

    .footer {
        font-size: 14px;
        padding: 15px 0;
    }
}

/* Small Devices (576px - 767px) */
@media (max-width: 767.98px) {

    .header {
        padding: 10px 16px;
    }

    .header img {
        max-width: 55px;
    }

    .hero {
        background-image: url('../img/mobile-wallpaper.jpg'); /* Put your mobile bg image path here */
    }

    .hero h1 {
        font-size: 30px;
        margin-top: 200px;
    }

    .hero p {
        font-size: 14px;
    }

    .btn-professional {
        height: 2.5em;
        font-size: 13px;
        padding: 7px 16px;
    }

    /* About Section */
    .professional-about {
        min-height: 100vh !important;
        height: 100vh !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: visible;            /* allow anything (like the wave) to bleed out */
        padding-bottom: 80px;     
    }
    .prof-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;          /* center children (.prof-text & .prof-media) horizontally */
        gap: 0;                       
        padding: 0 4vw;
    }

    /* (Optional) center the text inside the text‐column */
    .prof-text {
        text-align: center;           /* center the heading/paragraph text itself */
        margin: 0 auto;               /* make sure it can shrink/grow and stay centered */
    }
    .prof-media {
        margin-left: 0 !important;    /* override any desktop “margin-left” */
        justify-content: center;      /* ensure the image block sits in the center */
    }
    
    .prof-media {
        top: 40px;
        order: 1 !important;
        width: 100%;
        justify-content: center;
        align-items: flex-start;
        margin-left: 0 !important;
        min-height: 300px !important;
        padding-top: 40px;
        padding-bottom: 0;
    }
    .prof-text {
        order: 2 !important;
        width: 100%;
        max-width: 100vw;
        padding: 1.5rem 1.25rem 2rem 1.25rem;
        box-shadow: none;
        background: #f0f8ff;
    }
    .wave-outer {
        display: none;                    /* move the top of the wave flush to the section’s bottom */
    }

    /* (Optional) If you want a little extra breathing room: */
    .wave-outer svg {
        transform: translateY(10px);  /* nudge it up if needed */
    }

    .media-imgframe img {
        margin: 0 auto;
        max-width: 260px;
    }

    .media-glow {
        width: 350px;
        height: 350px;
    }

    /* Hide decorative shapes on smaller screens */
    .shape {
        display: none;
    }

    /* Services Section */
    .services-title {
        font-size: 1.5rem !important;
        margin-top: 40px !important;
        margin-bottom: 1.5rem;
    }

    .modern-services-section {
        min-height: 100vh !important;
        height: 100vh !important;
    }

    /* ─────────── COLLAPSED STRIPS (45px tall) ─────────── */
    .expanding-card:not(.expanded) {
        height: 45px !important;           /* collapsed height */
        margin-bottom: 0.5rem !important;  /* gap between strips */
        overflow: hidden !important;
        padding: 0 !important;
    }
    /* hide image + details when collapsed */
    .expanding-card:not(.expanded) .expanding-card-content img {
        display: none !important;
    }
    .expanding-card:not(.expanded) .expanding-card-details {
        display: none !important;
    }
    /* center the <h3> vertically in a 45px strip */
    .expanding-card:not(.expanded) .expanding-card-content {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
        padding: 0 1rem !important;       /* side padding for text */
    }
    .expanding-card:not(.expanded) .expanding-card-content h3 {
        margin: 0 !important;
        font-size: 0.9rem !important;     /* small, tight text */
        line-height: 1.1 !important;
    }

    /* ─────────── EXPANDED STRIP (restore full height) ─────────── */
    .expanding-card.expanded {
        height: 220px !important;         /* original expanded height */
        margin-bottom: 0.5rem !important;
        padding: 0 !important;
    }
    .expanding-card.expanded .expanding-card-content img {
        display: block !important;        /* show image again */
    }
    .expanding-card.expanded .expanding-card-details {
        display: block !important;        /* show details text */
    }

    /* ─────────── FONT SIZES (mobile tweaks) ─────────── */
    .expanding-card h3 {
        font-size: 0.9rem !important;      /* ensure h3 stays small */
        line-height: 1.2 !important;
    }
    .expanding-card-details h4 {
        font-size: 0.8rem !important;
    }
    .expanding-card-details p {
        font-size: 0.7rem !important;
    }

    /* Gallery Section */
    .gallery-info-box,
    .slider-container {
        padding: 20px;
        margin-bottom: 2rem;
    }

    .gallery-info-box h3 {
        font-size: 1.3rem;
    }

    .gallery-info-box p,
    .gallery-info-box li {
        font-size: 0.9rem;
    }

    /* Contact Section */
    .contact-form-box {
        padding: 20px;
    }

    .contact-img-side {
        display: none !important;
    }

    .contact-box {
        /* Example: make it 80% of the viewport instead of full height */
        height: 80vh !important;
        /* If you just want to remove extra padding/margins, you can also do: */
        margin-top: 60px !important;
    }

    /* If the form itself is scrollable and you want it shorter, limit its max‐height: */
    .contact-box .contact-form-box {
        max-height: 90vh;
        overflow-y: auto;
    }

    .footer {
        font-size: 13px;
        padding: 12px 0;
    }

    .footer-nav {
        margin-top: 10px;
    }
}

/* Extra Small Devices (400px - 575px) */
@media (max-width: 575.98px) {
    .header {
        padding: 10px 12px;
    }

    .header-logo {
        height: 55px;
    }

    .hero {
        padding: 0 10px;
        text-align: center;
    }

    .hero h1 {
        font-size: 24px;
        margin-top: 150px;
    }

    .hero p {
        font-size: 12px;
    }

    .btn-professional {
        width: 100%;
        height: 2.5em;
        font-size: 12px !important;
        padding: 6px 12px;
    }

    /* About Section */
    .professional-about {
        padding: 3rem 0;
    }

    .prof-grid {
        gap: 2rem;
        padding: 0 3vw;
    }

    .prof-text {
        padding: 1.25rem 1rem;
    }

    .prof-text h2 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .prof-text p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .prof-media {
        min-height: 250px;
    }

    .media-imgframe img {
        max-width: 280px;
    }

    .media-glow {
        width: 300px;
        height: 300px;
    }

    /* Services Section */
    .modern-services-section {
        padding: 3rem 0;
    }

    .services-section-container {
        padding: 0 1rem;
    }

    .services-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .expanding-card {
        height: 160px;
        margin-bottom: 0.8rem;
    }

    .expanding-card.expanded {
        height: 200px;
    }

    .expanding-card h3 {
        font-size: 1.1rem;
    }

    .expanding-card-details h4 {
        font-size: 0.95rem;
    }

    .expanding-card-details p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Gallery Section */
    .gallery-box {
        padding: 2rem 1rem !important;
    }

    .gallery-box h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .gallery-info-box,
    .slider-container {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .gallery-info-box h3 {
        font-size: 1.2rem;
    }

    .gallery-info-box p,
    .gallery-info-box li {
        font-size: 0.85rem;
    }

    /* Contact Section */
    .contact-box {
        padding: 2rem 1rem !important;
    }

    .contact-box h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .contact-form-box {
        padding: 1.5rem;
    }

    .form-control {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }

    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .footer {
        font-size: 12px;
        padding: 10px 0;
    }

    .footer-nav {
        margin-top: 8px;
        font-size: 11px;
    }
}

/* Ultra Small Devices (<400px) */
@media (max-width: 399.98px) {

    .header-logo {
        height: 50px;
    }

    .hero h1 {
        font-size: 20px;
        margin-top: 120px;
    }

    .hero p {
        font-size: 11px;
    }

    .btn-professional {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* About Section */
    .prof-text h2 {
        font-size: 1.3rem;
    }

    .prof-text p {
        font-size: 0.85rem;
    }

    .media-imgframe img {
        max-width: 250px;
    }

    .media-glow {
        width: 280px;
        height: 280px;
    }

    /* Services Section */
    .services-title {
        font-size: 1.4rem;
    }

    .expanding-card {
        height: 140px;
    }

    .expanding-card.expanded {
        height: 180px;
    }

    .expanding-card h3 {
        font-size: 1rem;
    }

    .expanding-card-details h4 {
        font-size: 0.9rem;
    }

    .expanding-card-details p {
        font-size: 0.8rem;
    }

    /* Gallery & Contact adjustments */
    .gallery-box,
    .contact-box {
        padding: 1.5rem 0.8rem !important;
    }

    .gallery-info-box,
    .slider-container,
    .contact-form-box {
        padding: 1.2rem;
    }

    .footer {
        font-size: 11px;
        padding: 8px 0;
    }

    .footer-nav {
        font-size: 10px;
    }
}

/* Landscape orientation adjustments for mobile devices */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }

    .hero h1 {
        margin-top: 100px;
    }

    .professional-about {
        min-height: auto;
        height: auto;
    }

    .prof-media {
        min-height: 200px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .media-imgframe img,
    .header-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .btn-professional {
        display: none;
    }

    .parallax {
        background-attachment: scroll;
    }

    .professional-about,
    .gallery-box,
    .contact-box {
        background: white !important;
        box-shadow: none !important;
    }
}

/* iOS-specific adjustments */
.ios-device .parallax {
    background-attachment: scroll !important;
}

.ios-device .hero {
    background-attachment: scroll !important;
}


/* === FIX: stop gallery images being cut on mobile === */
@media (max-width: 600px) {

    /* Let every masonry card grow to fit its image */
    .gallery-masonry-item,
    .gallery-masonry-item--large {
      height: auto !important;          /* remove the 160 px lock */
    }
  
    /* Show the whole image and keep it centred */
    .gallery-masonry-item img {
      width: 100%;
      height: auto !important;          /* unfix the height */
      object-fit: contain !important;   /* show full picture */
      object-position: center center !important;
    }
  }