/* ================================================================
   FFSS Website — Main Stylesheet
   Extracted from index.html inline <style> block
   ================================================================ */

:root {
    --bg-color: #f8f9fa;
    --surface-color: rgba(255, 255, 255, 0.85);
    --surface-border: rgba(0, 0, 0, 0.08);
    --primary-accent: #e62020;
    --secondary-accent: #006dd2;
    --text-main: #2b303a;
    --text-muted: #5a6473;
    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-height: 80px;
    --mobile-nav-height: 70px;
    --blur: blur(12px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Background Orbs */
.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #ffffff 0%, #eef1f6 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-accent);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-accent);
    bottom: -200px;
    right: -100px;
    animation-duration: 25s;
    animation-direction: alternate-reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #ffaa00;
    top: 40%;
    left: 60%;
    animation-duration: 30s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.2);
    }
}

/* Reusable UI Components */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #111, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-accent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(230, 32, 32, 0.4);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

/* --- DESKTOP HEADER --- */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 40%, rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-sub {
    font-size: 0.65rem;
    color: var(--primary-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.desktop-nav {
    display: flex;
    gap: 2rem;
}

.desktop-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-accent);
    transition: width 0.3s ease;
}

.desktop-nav a:hover {
    color: var(--primary-accent);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    margin-top: 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #000;
}

.hero-bg picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: heroSlideFade 18s infinite linear;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1);
    animation: heroZoom 18s infinite linear;
}

.hero-bg picture:nth-child(1),
.hero-bg picture:nth-child(1) img {
    animation-delay: 0s;
}

.hero-bg picture:nth-child(2),
.hero-bg picture:nth-child(2) img {
    animation-delay: 6s;
}

.hero-bg picture:nth-child(3),
.hero-bg picture:nth-child(3) img {
    animation-delay: 12s;
}

@keyframes heroSlideFade {
    0% { opacity: 0; }
    5% { opacity: 1; }
    33.33% { opacity: 1; }
    38.33% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: absolute;
    bottom: 3rem;
    left: 2rem;
    z-index: 10;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* Circular consultant icon button on hero */
.btn-consult-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-accent), #c11);
    color: #fff;
    text-decoration: none;
    font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(230, 32, 32, 0.45), 0 0 0 6px rgba(230, 32, 32, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.btn-consult-circle::after {
    content: 'Get a Consultation';
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-consult-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(230, 32, 32, 0.55), 0 0 0 8px rgba(230, 32, 32, 0.12);
}

.btn-consult-circle:hover::after {
    opacity: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(230, 32, 32, 0.08);
    border: 1px solid rgba(230, 32, 32, 0.2);
    border-radius: 30px;
    color: var(--primary-accent);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    background: linear-gradient(to right, #111, #555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    color: var(--primary-accent);
    background: none;
    -webkit-text-fill-color: var(--primary-accent);
    text-shadow: 0 0 20px rgba(230, 32, 32, 0.15);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--primary-accent), #c11);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(230, 32, 32, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:Hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(230, 32, 32, 0.3);
    color: #fff;
}

/* --- ABOUT SECTION --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-text p strong {
    color: #111;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: rgba(0, 0, 0, 0.02);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--surface-border);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.stat-card h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--secondary-accent);
}

.stat-card p {
    font-size: 0.9rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-main);
}

.cert-logos {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.cert-tag {
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    font-family: var(--font-display);
    font-weight: 600;
    color: #111;
    font-size: 0.9rem;
}

/* --- SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.services-toggle-container {
    display: none;
    justify-content: center;
    margin-top: 3rem;
}

@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-grid.collapsed .service-card:nth-child(n+7) {
        display: none;
    }

    .services-toggle-container {
        display: flex;
    }

    .services-grid:not(.collapsed) .service-card:nth-child(8) {
        grid-column: span 2;
    }

    .services-grid:not(.collapsed) .service-card:nth-child(8) .service-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 2rem;
    }
}

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: 0;
    background: #fff;
    cursor: pointer;
}

.service-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--surface-border);
    transition: transform 0.5s ease;
}

.service-card:hover .service-img {
    transform: scale(1.05);
}

.service-content {
    padding: 2rem;
    flex-grow: 1;
}

.service-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #111;
}

.service-list {
    list-style: none;
}

.service-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service-list li::before {
    content: '\f101';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary-accent);
    font-size: 0.8rem;
}

/* --- CLIENTS SECTION --- */
.clients-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
    cursor: grab;
    touch-action: pan-y;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.clients-marquee:active {
    cursor: grabbing;
}

.marquee-content {
    display: flex;
    width: fit-content;
    will-change: transform;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.marquee-content.is-dragging {
    cursor: grabbing;
}

.client-logo {
    height: 80px;
    margin: 0 2rem;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.3s ease;
    object-fit: contain;
    width: 150px;
    mix-blend-mode: multiply;
    user-select: none;
    -webkit-user-drag: none;
}

.client-logo:hover {
    filter: grayscale(0%) opacity(1);
}

/* --- CONTACT SECTION --- */
.contact-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--primary-accent);
}

.map-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-location {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--surface-border);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-location:hover,
.btn-location.active {
    background: var(--primary-accent);
    color: #fff;
    border-color: var(--primary-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(230, 32, 32, 0.15);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(230, 32, 32, 0.08);
    border: 1px solid rgba(230, 32, 32, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #111;
    margin-bottom: 0.2rem;
}

.info-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: #111;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 10px rgba(230, 32, 32, 0.1);
    background: #fff;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

#form-message {
    margin-top: 1rem;
    font-weight: 600;
    display: none;
}

.msg-success { color: #00aa55; }
.msg-error   { color: #e62020; }

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--surface-border);
    padding: 3rem 2rem;
    text-align: center;
    background: #eef1f6;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.social-links a:hover {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: #fff;
    transform: translateY(-3px);
}

.social-links a img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0) opacity(0.65);
}

.social-links a:hover img {
    transform: scale(1.1);
    filter: brightness(0) invert(1);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- MOBILE APP SHELL UI --- */
.mobile-nav {
    display: none;
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 991px) {
    .hero h1 { font-size: 4rem; }

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .top-header { padding: 0 2rem; }
}

@media (max-width: 768px) {
    .hero-content { display: none; }

    body {
        padding-bottom: var(--mobile-nav-height);
    }

    .container { padding: 4rem 1rem; }
    .glass-panel { padding: 1.5rem 1rem; }
    .info-item { gap: 1rem; }

    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .info-text p {
        word-break: break-word;
        font-size: 0.85rem;
    }

    .desktop-nav { display: none; }

    .top-header {
        height: 60px;
        padding: 0 1rem;
        justify-content: center;
    }

    .logo-img { height: 35px; }
    .brand-sub { font-size: 0.55rem; }

    .hero { padding-top: 60px; }
    .hero h1 { font-size: 2.8rem; }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    /* Bottom Navigation Bar for Mobile */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: var(--mobile-nav-height);
        background: linear-gradient(to top, rgba(255, 255, 255, 1) 40%, rgba(255, 255, 255, 0.4) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 2000;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    }

    .mobile-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        text-decoration: none;
        flex: 1;
        height: 100%;
        transition: color 0.3s;
        position: relative;
    }

    .mobile-tab i {
        font-size: 1.2rem;
        margin-bottom: 3px;
        transition: transform 0.3s;
    }

    .mobile-tab span {
        font-size: 0.65rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .mobile-tab.active { color: var(--primary-accent); }

    .mobile-tab.active i { transform: translateY(-2px); }

    .mobile-tab.active::after {
        content: '';
        position: absolute;
        top: 4px;
        width: 4px;
        height: 4px;
        background: var(--primary-accent);
        border-radius: 50%;
        box-shadow: 0 0 5px rgba(230, 32, 32, 0.4);
    }

    footer {
        padding-bottom: calc(3rem + var(--mobile-nav-height));
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- SUCCESS/ERROR MODAL OVERLAY --- */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.success-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.success-modal-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.success-card-container {
    perspective: 1000px;
    width: 380px;
    max-width: 90%;
}

.success-card {
    width: 100%;
    height: 280px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-card.flipped { transform: rotateY(180deg); }

.success-card-side {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.success-card-front {
    background: rgba(255, 255, 255, 0.7);
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.success-card-front .logo-wrapper {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: pulse 1.5s infinite ease-in-out;
}

.success-card-front .logo-wrapper img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.success-card-back {
    background: rgba(255, 255, 255, 0.7);
    transform: rotateY(180deg);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.success-card-back .icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
}

.success-card.flipped .success-card-back .icon-wrapper { transform: scale(1); }

.success-card-back.state-success {
    background: rgba(240, 253, 244, 0.75);
    color: #166534;
    border: 1px solid rgba(22, 101, 52, 0.15);
}

.success-card-back.state-success h3 { color: #10b981; }

.success-card-back.state-success .icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.2);
}

.success-card-back.state-error {
    background: rgba(254, 242, 242, 0.75);
    color: #991b1b;
    border: 1px solid rgba(153, 27, 27, 0.15);
}

.success-card-back.state-error h3 { color: #ef4444; }

.success-card-back.state-error .icon-wrapper {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.2);
}

.success-card h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.success-card-front h3 { color: #1e293b; }

.success-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.success-card-back.state-success p { color: #166534; }
.success-card-back.state-error p   { color: #991b1b; }

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(230, 32, 32, 0.3);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 12px rgba(230, 32, 32, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(230, 32, 32, 0);
    }
}

/* ── WHATSAPP FLOATING BUTTON & CHATBOX ───────────────────────── */

.wa-float-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

@media (max-width: 768px) {
    .wa-float-btn {
        bottom: calc(var(--mobile-nav-height) + 14px);
        right: 16px;
    }
}

.wa-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 5px rgba(37, 211, 102, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.wa-circle img {
    width: 1.5rem;
    height: 1.5rem;
    filter: brightness(0) invert(1);
}

.wa-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55), 0 0 0 8px rgba(37, 211, 102, 0.12);
}

/* Tooltip label */
.wa-circle::before {
    content: 'WhatsApp Enquiry';
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

@media (max-width: 768px) {
    .wa-circle::before { display: none; }
}

.wa-circle:hover::before { opacity: 1; }

/* Pulse ring */
.wa-circle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(37, 211, 102, 0.5);
    animation: wa-pulse 2s infinite ease-out;
}

@keyframes wa-pulse {
    0%   { transform: scale(1);   opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Backdrop Overlay */
.wa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wa-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Chatbox Panel */
.wa-chatbox {
    position: fixed;
    bottom: 98px;
    right: 28px;
    z-index: 2999;
    width: 340px;
    max-width: calc(100vw - 32px);
    max-height: min(560px, calc(100vh - 120px));
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(37, 211, 102, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(37, 211, 102, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.92) translateY(16px);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (max-width: 768px) {
    .wa-chatbox {
        bottom: 146px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: 100%;
        max-height: calc(100dvh - 166px);
        border-radius: 16px;
    }
}

.wa-chatbox.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.wa-header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 2px solid #25D366;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.wa-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #d1fae5;
    overflow: hidden;
}

.wa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.wa-header-info { flex: 1; }

.wa-header-info h4 {
    color: #111827;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wa-header-info span {
    color: #6b7280;
    font-size: 0.73rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wa-online-dot {
    width: 7px;
    height: 7px;
    background: #25D366;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px rgba(37, 211, 102, 0.6);
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.wa-close-btn {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.wa-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.wa-chat-bubble-area {
    padding: 12px 14px 10px;
    background: rgba(249, 250, 251, 0.75);
    border-bottom: 1px solid #f0fdf4;
    flex-shrink: 0;
}

.wa-bubble {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 4px 14px 14px 14px;
    padding: 9px 12px;
    max-width: 90%;
    position: relative;
    display: inline-block;
}

.wa-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -7px;
    width: 0;
    height: 0;
    border-top: 7px solid #d1fae5;
    border-left: 7px solid transparent;
}

.wa-bubble p {
    margin: 0;
    font-size: 0.82rem;
    color: #1f2937;
    line-height: 1.5;
}

.wa-bubble .wa-time {
    display: block;
    font-size: 0.65rem;
    color: #6b7280;
    text-align: right;
    margin-top: 3px;
}

.wa-form-area {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.wa-form-area::-webkit-scrollbar { width: 3px; }
.wa-form-area::-webkit-scrollbar-track { background: transparent; }
.wa-form-area::-webkit-scrollbar-thumb { background: #d1fae5; border-radius: 4px; }

.wa-form-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: -2px;
}

.wa-input {
    width: 100%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    color: #111827;
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    outline: none;
}

.wa-input:focus {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
    background: #fff;
}

textarea.wa-input {
    min-height: 70px;
    resize: none;
}

.wa-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.7rem;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
    margin-top: 4px;
    flex-shrink: 0;
}

.wa-send-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.wa-send-btn img {
    width: 1.2rem;
    height: 1.2rem;
    filter: brightness(0) invert(1);
}
