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;
}

/* Responsive: stack to 2 columns/tablet, 1 column/mobile */
@media (max-width: 900px) {
 
}
@media (max-width: 600px) {
  
}

/* 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-compressed.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);
}



.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;
    }

   

    /* 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/Website\ Mobile\ Version.png'); /* 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;
    }

  

    /* 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;
    }

  

   

    /* 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;
}

/* === Achievement Gallery Section === */
.achievement-gallery-section {
  --card-width: 320px;
  --card-gap: 1.4rem;
  --transition: .55s cubic-bezier(.65,.05,.25,1);
  --accent: #02258e;
  --accent-grad: linear-gradient(135deg,#02258e,#0642f6);
  position: relative;
  width: 100%;
  min-height: 100vh;                 /* keep full-screen feel */
  padding: clamp(2rem,4vw,3rem) clamp(1.2rem,4vw,3rem) 2.4rem; /* bottom 4rem → 2.4rem */
  display: flex;
  flex-direction: column;
  justify-content: center;           /* vertically center heading + cards */
  background: radial-gradient(circle at 70% 20%, #e9f1ff 0%, #f6f9ff 60%, #ffffff 100%);
  overflow: hidden;
}


.achievement-gallery-section::before,
.achievement-gallery-section::after {
  content:"";
  position:absolute;
  width:520px;
  height:520px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #b4ecff 0%, #d7e7ff 60%, rgba(255,255,255,0) 75%);
  filter:blur(40px);
  opacity:.55;
  pointer-events:none;
  mix-blend-mode:screen;
}
.achievement-gallery-section::before { top:-180px; left:-160px; }
.achievement-gallery-section::after { bottom:-220px; right:-180px; }

.achievement-gallery-section h2 {
  font-size: clamp(1.9rem,4vw,2.7rem);
  font-weight: 700;
  letter-spacing: .5px;
  margin: 0 0 2rem;
  color: var(--accent);
  position: relative;
  display: block;          /* full row */
  text-align: center;      /* center text */
}

.achievement-gallery-section h2::after {
  content:"";
  position:absolute;
  left:50%;                /* start from middle */
  bottom:-10px;
  width:110px;
  height:4px;
  background: var(--accent-grad);
  border-radius:2px;
  transform:translateX(-50%); /* center the bar */
}


.gallery-header {
  position: relative;
  z-index: 2;
}

.gallery-controls {
  display:flex;
  align-items:center;
  gap:1rem;
  margin-bottom:1rem; /* was 1.5rem */
  width:100%;
  justify-content:center; /* center under heading */
}


.gallery-viewport {
  position:relative;
  flex:1 1 auto;
  overflow:hidden;
  padding: 2.4rem 0;   /* ↑ gives an extra ~1.4 rem above & below cards */
}

.gallery-track {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:var(--card-gap);
  transition: transform var(--transition);
  will-change: transform;
}

.gallery-card {
  position:relative;
  flex:0 0 var(--card-width);
  width:var(--card-width);
  background:#f0f8ff;
  border-radius:20px;
  box-shadow:0 10px 32px rgba(30,40,90,0.15), 0 2px 6px rgba(50,70,120,0.12);
  overflow:hidden;
  cursor:pointer;
  transform: translateY(16px) scale(.85);
  transition:
    transform var(--transition),
    box-shadow .5s, 
    filter .5s, 
    opacity .5s;
  opacity:.85;
}
.gallery-card figure {
  margin:0;
  position:relative;
  height:100%;
  display:flex;
  flex-direction:column;
}
.gallery-card img {
  display:block;
  width:100%;
  aspect-ratio: 1/1;
  object-fit:cover;
  background:#fff;
  user-select:none;
  pointer-events:none;
  transition: transform 0.8s ease;
}


.gallery-card.active {
  transform: translateY(0) scale(1.12);
  box-shadow:0 18px 48px rgba(20,50,120,0.30), 0 4px 14px rgba(30,50,120,0.25);
  z-index:2;
  opacity:1;
  filter:none;
}
.gallery-card.active img {
  transform:scale(1.06);
}

.gallery-card:not(.active) {
   filter:none;
  opacity:.65;
}

.gallery-nav {
  flex:0 0 54px;
  width:54px;
  height:54px;
  border:none;
  border-radius:16px;
  background:linear-gradient(135deg,#02258e,#0642f6);
  color:#fff;
  font-size:1.6rem;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,0.18);
  transition: background .5s, transform .4s;
}
.gallery-nav:disabled {
  opacity:.35;
  cursor:not-allowed;
  filter:grayscale(30%);
}
.gallery-nav:hover:not(:disabled) {
  transform:translateY(-4px);
}

.gallery-card figcaption {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:.85rem .5rem 1rem;
  text-align:center;
  gap:.45rem;              /* slightly larger for two text lines */
  font-size:.9rem;
  position:relative;
  color:#222;
}

.gallery-card figcaption strong {
  font-size:1rem;
  font-weight:600;
  color:#022058;
  letter-spacing:.3px;
  line-height:1.15;
}

/* NEW: Profession */
.gallery-card figcaption em {
  font-style:normal;
  font-size:.78rem;
  font-weight:500;
  color:#555;
  background:#fff;
  padding:.38rem .75rem;
  border-radius:30px;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
  line-height:1;
  letter-spacing:.25px;
}

/* Remove old span pill (or leave absent in markup) */
.gallery-card figcaption span { display:none; }


.gallery-progress {
  position: static;
  width: 240px;
  height: 5px;
  margin: 1.4rem auto 0;  /* space above bar, centered */
  background: rgba(0,0,0,.08);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.12) inset;
}

.gallery-progress-bar {
  width:0%;
  height:100%;
  background:var(--accent-grad);
  transition:width .6s ease;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .achievement-gallery-section { --card-width: 220px; }
}
@media (max-width: 900px) {
  .achievement-gallery-section { --card-width: 200px; }
}
@media (max-width: 700px) {
  .achievement-gallery-section {
    padding: 2rem 1.2rem 2.4rem;
  }
  .achievement-gallery-section h2 { margin-bottom: 1rem; }
  .gallery-controls { gap:.6rem; }
  .gallery-nav {
    width:46px; height:46px; font-size:1.35rem; border-radius:14px;
  }
  .achievement-gallery-section { --card-width: 170px; }
  .gallery-card { border-radius:16px; }
  .gallery-card.active { transform:translateY(0) scale(1.04); }
}
@media (max-width: 520px) {
  .achievement-gallery-section { --card-width: 150px; }
  .gallery-card figcaption strong { font-size:.92rem; }
}
@media (max-width: 430px) {
  .achievement-gallery-section { --card-width: 135px; }
  .gallery-nav { width:40px; height:40px; font-size:1.2rem; }
  .gallery-card { transform: translateY(10px) scale(.84); }
  .gallery-card.active { transform:translateY(0) scale(1.03); }
}

