/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --primary:    #00d2ff;
    --secondary:  #3a7bd5;
    --text-dark:  #2d3748;
    --text-muted: #718096;
    --bg-light:   #f8fafc;
    --bg-white:   #ffffff;
    --shadow-sm:  0 4px 15px rgba(0,0,0,0.07);
    --shadow-md:  0 10px 30px rgba(0,0,0,0.10);
    --shadow-lg:  0 20px 50px rgba(0,0,0,0.12);
    --radius-sm:  12px;
    --radius-md:  20px;
    --radius-lg:  30px;
    --ease:       0.3s ease;
    --font:       'Outfit', sans-serif;
    --nav-h:      64px;  /* navbar height */
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
/* overflow-x:hidden on BODY breaks position:fixed on iOS Safari.
   Use 'overflow:clip' on body (doesn't create scroll container)
   and add overflow:hidden per-section where needed. */
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}
ul  { list-style: none; }
a   { text-decoration: none; color: inherit; transition: var(--ease); }
img { max-width: 100%; display: block; }

.container {
    width: min(90%, 1200px);
    margin-inline: auto;
}
h1 span, h2 span, h3 span { color: var(--secondary); }

/* ==========================================================================
   Custom Cursor — desktop/mouse ONLY
   ========================================================================== */
.cursor-dot,
.cursor-ring {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
}
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--primary);
    top: 0; left: 0;
    transition: width .2s, height .2s, background .2s;
}
.cursor-ring {
    width: 38px; height: 38px;
    border: 2px solid var(--primary);
    top: 0; left: 0;
    transition: width .35s ease, height .35s ease, border-color .3s;
}
body.cursor-hover .cursor-ring {
    width: 58px; height: 58px;
    border-color: var(--secondary);
    background: rgba(58,123,213,0.08);
}
body.cursor-hover .cursor-dot { width: 4px; height: 4px; }

/* On touch / mobile — hide cursor elements entirely */
@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none !important; }
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1 { font-size: clamp(1.9rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.8rem); font-weight: 600; line-height: 1.2; }
h3 { font-size: clamp(1.3rem, 2.5vw, 2rem);   font-weight: 600; }
p  { color: var(--text-muted); font-size: clamp(.95rem, 1.5vw, 1.1rem); line-height: 1.7; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    display: inline-block;
    padding: .8rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    border-radius: 50px;
    font-weight: 600; font-size: 1rem;
    border: none; cursor: pointer;
    box-shadow: 0 4px 18px rgba(58,123,213,.35);
    transition: transform var(--ease), box-shadow var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(58,123,213,.5); }

.btn-secondary {
    display: inline-block;
    padding: .8rem 2rem;
    background: transparent;
    color: var(--secondary);
    border-radius: 50px;
    font-weight: 600; font-size: 1rem;
    border: 2px solid var(--secondary);
    cursor: pointer;
    transition: var(--ease);
}
.btn-secondary:hover { background: var(--secondary); color: #fff !important; }

.btn-submit {
    width: 100%; padding: 1rem;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff; border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem; font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,210,255,.3);
    transition: transform var(--ease), box-shadow var(--ease);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,210,255,.45); }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    /* Rock-solid fixed navbar.
       backdrop-filter can break position:fixed on some Android/iOS browsers.
       Use solid white background instead — fully reliable. */
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: auto;
    min-height: var(--nav-h);
    padding-top: env(safe-area-inset-top, 0px); /* handles notched phones, status bar */
    z-index: 9999;                     /* highest possible */
    background: #fff;                  /* solid — no blur needed on mobile */
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transition: box-shadow .3s ease;
    /* NO transform, NO filter, NO will-change — these break fixed on mobile */
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.1); }

/* On larger screens, add the glass effect back */
@media (min-width: 769px) {
    .navbar {
        background: rgba(255,255,255,0.94);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
}

.nav-container {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(90%, 1200px);
    margin: 0 auto;
}

.logo {
    font-size: 1.75rem; font-weight: 700;
    color: var(--text-dark); line-height: 1;
    flex-shrink: 0;
}

/* Desktop nav links */
.nav-links {
    display: flex; align-items: center; gap: 2rem;
}
.nav-links a { font-weight: 500; color: var(--text-dark); white-space: nowrap; transition: color var(--ease); }
.nav-links a:not(.btn-primary):hover, .nav-links a.active:not(.btn-primary) { color: var(--secondary); }
.nav-links a.active:not(.btn-primary) { font-weight: 700; position: relative; }
.nav-links a.active:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
}

/* Hamburger — HIDDEN on desktop, SHOWN on mobile via media query */
.hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transform-origin: center;
    transition: transform .3s ease, opacity .2s ease;
    pointer-events: none;
}
/* X state when open */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown — position:fixed independent of navbar DOM flow */
.mobile-nav {
    display: none;
    position: fixed;
    top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
    left: 0; right: 0;
    width: 100%;
    background: #fff;              /* solid — reliable on all mobile browsers */
    border-bottom: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    z-index: 9998;                 /* just below navbar (9999) */
    flex-direction: column;
    align-items: center;
    padding: 1rem 0 1.5rem;
    gap: 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    display: block; width: 100%;
    text-align: center;
    padding: .9rem 1.5rem;
    font-size: 1.05rem; font-weight: 500;
    color: var(--text-dark);
    transition: color .2s ease, background .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.mobile-nav a:hover,
.mobile-nav a:active { color: var(--secondary); background: rgba(58,123,213,.05); }
.mobile-nav a.active:not(.btn-primary) {
    color: var(--secondary);
    font-weight: 600;
    background: rgba(58,123,213,.05);
    border-left: 3px solid var(--secondary);
    padding-left: 1.5rem;
}
.mobile-nav .btn-primary {
    margin-top: .5rem; width: auto;
    padding: .7rem 2rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center;
    overflow: hidden;
    padding-top: var(--nav-h);
}
.hero-slider {
    position: absolute; inset: 0; z-index: 0;
}
.hero-slider .slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
}
.hero-slider .slide.active { opacity: 1; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg,rgba(0,0,0,.68) 0%,rgba(58,123,213,.35) 100%);
    z-index: 1;
}
.floating-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.shape {
    position: absolute;
    color: rgba(255, 255, 255, 0.25);
    animation: floatShape 20s linear infinite;
}
.shape svg {
    width: 100%; 
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
}
.shape-1 { width: 50px; height: 50px; top: 15%; left: 8%; animation-duration: 25s; animation-delay: -5s; }
.shape-2 { width: 35px; height: 35px; top: 65%; left: 5%; animation-duration: 20s; animation-delay: -10s; }
.shape-3 { width: 60px; height: 60px; top: 25%; right: 10%; animation-duration: 28s; animation-delay: -2s; }
.shape-4 { width: 40px; height: 40px; top: 75%; right: 15%; animation-duration: 22s; animation-delay: -15s; }
.shape-5 { width: 55px; height: 55px; top: 45%; left: 85%; animation-duration: 35s; animation-delay: -8s; }
.shape-6 { width: 65px; height: 65px; top: 80%; left: 25%; animation-duration: 30s; animation-delay: -12s; }

@keyframes floatShape {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.1; }
    25% { transform: translate(40px, -30px) rotate(90deg); opacity: 0.4; }
    50% { transform: translate(10px, -70px) rotate(180deg); opacity: 0.15; }
    75% { transform: translate(-30px, -20px) rotate(270deg); opacity: 0.4; }
    100% { transform: translate(0, 0) rotate(360deg); opacity: 0.1; }
}
.hero-content {
    position: relative; z-index: 2;
    width: 100%; max-width: 850px;
    margin-inline: auto;
    text-align: center;
    padding: 3.5rem;
}
.hero-content::before {
    content: "";
    position: absolute;
    inset: -150px -50px; /* Expand out to allow smooth fade */
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(10, 15, 30, 0.6) 0%, rgba(10, 15, 30, 0) 70%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 70%);
    mask-image: radial-gradient(ellipse at center, black 25%, transparent 70%);
    pointer-events: none;
}
.hero-content h1 {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
    margin-bottom: 1.2rem;
}
.hero-content h1 span { color: var(--primary); }
.hero-content p { 
    color: #f0f5fa; 
    margin-bottom: 0; 
    font-size: 1.15rem; 
    font-weight: 400; 
    line-height: 1.6; 
}
.hero-btns {
    display: flex; flex-wrap: wrap; gap: 1rem;
    margin-top: 2.2rem; justify-content: center;
}
.hero-btns .btn-secondary { border-color: #fff; color: #fff !important; }
.hero-btns .btn-secondary:hover { background: #fff; color: var(--secondary) !important; }

/* ==========================================================================
   Section title
   ========================================================================== */
.section-title { text-align: center; margin-bottom: 3.5rem; }
.section-title p { max-width: 600px; margin-inline: auto; margin-top: .8rem; }

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding: 6rem 0; background: var(--bg-light); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;   /* ALL rows same height */
    gap: 1.25rem;
    align-items: stretch;
}
.service-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--ease), box-shadow var(--ease);
    position: relative;
    display: flex;
    flex-direction: column;  /* card-body fills remaining space */
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-img {
    width: 100%; height: 135px;
    background-size: cover; background-position: center;
    flex-shrink: 0;
}
.service-card-body {
    padding: 1.1rem;
    flex: 1;   /* fills remaining card height uniformly */
}
.service-icon {
    position: absolute; top: 0.8rem; right: 0.8rem;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(6px);
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.service-card h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: .4rem; color: var(--text-dark); }
.service-card p  { font-size: .88rem; margin: 0; line-height: 1.5; }

/* ==========================================================================
   About & Team
   ========================================================================== */
.about { padding: 6rem 0; background: var(--bg-white); overflow: hidden; }

.team-container { margin-bottom: 5rem; }
.team-title {
    text-align: center; margin-bottom: 2.5rem;
    font-size: clamp(1.6rem,3vw,2.2rem);
}
.team-carousel-wrapper { display: flex; align-items: center; gap: .5rem; }

.slider-btn {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    background: var(--bg-white); color: var(--secondary);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.slider-btn:hover { background: var(--secondary); color: #fff; transform: scale(1.08); }

.team-grid {
    display: flex; gap: 1.5rem;
    overflow-x: auto;              /* enable touch swiping */
    scroll-behavior: smooth;
    flex: 1;
    /* Hide scrollbar for Chrome, Safari and Opera */
    -ms-overflow-style: none;      /* IE and Edge */
    scrollbar-width: none;         /* Firefox */
}
.team-grid::-webkit-scrollbar {
    display: none;                 /* Chrome, Safari, Opera */
}

/* Flip Card */
.flip-card { flex: 0 0 260px; height: 360px; perspective: 1100px; cursor: default; }
.flip-card-inner {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d;
    transition: transform .75s cubic-bezier(.4,.2,.2,1);
    border-radius: var(--radius-md);
}
.flip-card:hover .flip-card-inner,
.flip-card.is-hovered .flip-card-inner,
.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
    position: absolute; inset: 0;
    border-radius: var(--radius-md);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}
.flip-card-front {
    background-size: cover; background-position: center top;
    display: flex; align-items: flex-end;
    box-shadow: var(--shadow-md);
}
.front-overlay {
    width: 100%;
    padding: 2.5rem 1.2rem 1.2rem;
    background: linear-gradient(transparent,rgba(0,0,0,.82));
}
.front-overlay h4 { color: #fff; font-size: 1.15rem; margin-bottom: .25rem; }
.front-overlay p  { color: #c9d8f0; font-size: .88rem; margin: 0; }

.flip-card-back {
    background: linear-gradient(145deg, var(--secondary), var(--primary));
    transform: rotateY(180deg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 2rem 1.5rem; text-align: center;
    box-shadow: var(--shadow-md);
}
.flip-card-back h4 { color: #fff; font-size: 1.25rem; margin-bottom: .8rem; }
.flip-card-back p  { color: #ddeeff; font-size: .92rem; margin-bottom: 1.5rem; }
.btn-back {
    display: inline-block; padding: .6rem 1.5rem;
    border: 2px solid #fff; color: #fff;
    border-radius: 50px; font-weight: 600; font-size: .9rem;
    cursor: pointer; transition: var(--ease);
}
.btn-back:hover { background: #fff; color: var(--secondary); }

/* About container */
.about-container { display: flex; align-items: center; gap: 4rem; }
.about-image {
    flex: 0 0 300px;     /* fixed smaller width */
    max-width: 300px;
    position: relative;
}
.about-image img { width: 100%; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.deco-circle {
    position: absolute; width: 120px; height: 120px;
    background: var(--primary); border-radius: 50%;
    top: -20px; left: -20px; opacity: .18;
    animation: float 5s ease-in-out infinite;
}
.deco-square {
    position: absolute; width: 100px; height: 100px;
    background: var(--secondary); border-radius: 16px;
    bottom: -20px; right: -20px; opacity: .12;
    transform: rotate(30deg);
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }

.about-content { flex: 1; }
.about-content h2 { margin-bottom: 1rem; }
.about-content > p { margin-bottom: 2rem; }
.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .9rem 1.5rem;
}
.about-features li {
    display: flex; align-items: center; gap: .8rem;
    font-size: 1rem; color: var(--text-dark);
}
.check-icon {
    flex-shrink: 0; width: 26px; height: 26px;
    background: rgba(0,210,255,.15); color: var(--secondary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
    padding: 6rem 0;
    background: linear-gradient(135deg,#edf4f5 0%,#d9e6f2 100%);
}
.contact-container { display: flex; gap: 3.5rem; align-items: flex-start; }
.contact-info { flex: 1; }
.contact-info h2 { margin-bottom: 1rem; }
.contact-info > p { margin-bottom: 2rem; }
.contact-details { display: flex; flex-direction: column; gap: 1.5rem; }
.detail-item { display: flex; align-items: flex-start; gap: 1rem; }
.detail-item .icon {
    flex-shrink: 0; width: 48px; height: 48px;
    background: var(--bg-white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; box-shadow: var(--shadow-sm);
}
.detail-item h4 { margin-bottom: .2rem; color: var(--text-dark); font-size: 1rem; }
.detail-item p  { margin: 0; font-size: .95rem; }

.contact-form-card {
    flex: 1;
    background: rgba(255,255,255,.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: 1.2rem; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: .9rem 1.1rem;
    border: 1.5px solid rgba(255,255,255,.7);
    background: rgba(255,255,255,.5);
    border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 1rem;
    color: var(--text-dark);
    outline: none;
    transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: #fff;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(58,123,213,.12);
}
.form-message { margin-top: .8rem; text-align: center; font-weight: 500; font-size: .95rem; }
.success-text { color: #10b981; }
.error-text   { color: #ef4444; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: #1a202c; color: #a0aec0; padding: 4rem 0 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem; margin-bottom: 3rem;
}
.footer-col h3 { color: #fff; font-size: 1.8rem; margin-bottom: .8rem; }
.footer-col h4 { color: #fff; margin-bottom: 1.2rem; font-size: 1.05rem; }
.footer-col p  { font-size: .95rem; margin: 0; color: #a0aec0; }
.footer-col ul { display: flex; flex-direction: column; gap: .7rem; }
.footer-col ul a { color: #a0aec0; font-size: .95rem; transition: color var(--ease); }
.footer-col ul a:hover { color: var(--primary); }
.social-links { display: flex; flex-direction: column; gap: .7rem; }
.social-links a { color: #a0aec0; font-size: .95rem; transition: color var(--ease); }
.social-links a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center; padding: 1.4rem 0;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .9rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ≥1025 tablet landscape */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2,1fr); }
    .about-container { gap: 2.5rem; }
    .contact-container { gap: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
}

/* ≤768 tablet portrait / mobile */
@media (max-width: 768px) {

    /* Show hamburger, hide desktop nav */
    .hamburger  { display: flex; }
    .nav-links  { display: none; }

    .hero-content { padding: 2rem 1.5rem; } /* Reduce glass card padding on mobile */
    .hero-content h1 { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; align-items: center; }
    .hero-btns .btn-primary,
    .hero-btns .btn-secondary { width: min(280px,90%); text-align: center; }

    /* Services */
    .services { padding: 4rem 0; }
    .services-grid { grid-template-columns: 1fr; }
    .service-img { height: 200px; }

    /* Team */
    .team-container { margin-bottom: 4rem; }
    .flip-card { flex: 0 0 220px; height: 300px; }
    .slider-btn { width: 40px; height: 40px; font-size: 1.1rem; }

    /* Services */
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } /* 2 columns on tablet portrait */

    /* About */
    .about { padding: 4rem 0; }
    .about-container { flex-direction: column; gap: 2rem; }
    .about-content { text-align: center; }

    /* AI Analysis Mobile */
    .ai-container { flex-direction: column; gap: 2rem; }

    /* Contact */
    .contact { padding: 4rem 0; }
    .contact-container { flex-direction: column; gap: 2rem; }
    .contact-form-card { padding: 1.8rem; }

    /* Footer */
    .footer { padding: 3rem 0 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .footer-grid .footer-col:first-child { grid-column: auto; }
    .footer-col ul, .social-links { align-items: center; }
}

/* ≤480 mobile */
@media (max-width: 480px) {
    .hero-btns .btn-primary,
    .hero-btns .btn-secondary { width: 90%; }

    .services-grid { grid-template-columns: 1fr; } /* 1 column on small phones */

    .flip-card { flex: 0 0 190px; height: 270px; }
    .front-overlay h4 { font-size: 1rem; }
    .flip-card-back h4 { font-size: 1.1rem; }
    .flip-card-back p  { font-size: .85rem; }

    .slider-btn { width: 36px; height: 36px; font-size: 1rem; }

    .contact-form-card { padding: 1.2rem; border-radius: var(--radius-md); }

    .footer-grid { gap: 1.5rem; }
    .footer-col h3 { font-size: 1.5rem; }
}

/* ≤360 very small */
@media (max-width: 360px) {
    .flip-card { flex: 0 0 165px; height: 245px; }
}

/* ==========================================================================
   AI Skin Analysis Section
   ========================================================================== */
.ai-analysis {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
}
.ai-container {
    display: flex;
    gap: 3rem;
    align-items: stretch;
}
.ai-scanner-card,
.ai-results-card {
    flex: 1;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}
.scanner-dropzone {
    flex: 1;
    border: 2px dashed rgba(58,123,213,0.3);
    border-radius: var(--radius-md);
    background: rgba(58,123,213,0.02);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--ease);
}
.scanner-dropzone.dragover {
    background: rgba(58,123,213,0.06);
    border-color: var(--secondary);
}
.dropzone-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.upload-icon {
    font-size: 3rem;
}
.dropzone-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.dropzone-preview img {
    max-height: 240px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

/* Scan Bar Animation */
.scan-bar {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    box-shadow: 0 0 12px var(--primary);
    z-index: 5;
    animation: scan 2s linear infinite;
    display: none;
}
@keyframes scan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}
.scan-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

/* Results Card styling */
.results-placeholder {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
}
.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}
.results-content h3 {
    margin-bottom: 1.5rem;
}
.score-gauge {
    background: rgba(58,123,213,0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid rgba(58,123,213,0.1);
}
.gauge-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 0.2rem;
}
.gauge-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}
.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.metric-info {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}
.metric-bar {
    width: 100%; height: 8px;
    background: #edf2f7;
    border-radius: 4px;
    overflow: hidden;
}
.metric-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}
.metric-fill.warning {
    background: #ed8936;
}
.metric-fill.success {
    background: #48bb78;
}
.ai-recommendation {
    background: var(--bg-light);
    border-left: 4px solid var(--secondary);
    padding: 1.2rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ai-recommendation h4 {
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}
.ai-recommendation p {
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.6;
}

