/* Seoadam.com - Modern Premium CSS */

html { scroll-behavior: smooth; }

/* Global overflow prevention */
html, body { overflow-x: hidden; max-width: 100vw; }
*, *::before, *::after { box-sizing: border-box; }

/* CLS Prevention - Font fallback matching */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-rendering: optimizeSpeed;
}

/* CLS Prevention - Reserve space for icons */
.material-symbols-outlined {
    width: 1em;
    height: 1em;
    display: inline-block;
    overflow: hidden;
}

/* Performance - Contain paint for heavy sections */
section { contain: layout style; }
footer { contain: layout style; }

/* ======================== MATERIAL ICONS ======================== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ======================== GRADIENTS ======================== */
.gradient-hero {
    background: linear-gradient(135deg, #0c1222 0%, #1a1a3e 30%, #0f2847 60%, #0c1222 100%);
}
.gradient-primary {
    background: linear-gradient(135deg, #3e86c0 0%, #2563eb 100%);
}
.gradient-section {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}
.gradient-dark {
    background: linear-gradient(180deg, #0c1222 0%, #1a1a3e 100%);
}
.gradient-card {
    background: linear-gradient(135deg, rgba(62,134,192,0.08) 0%, rgba(37,99,235,0.04) 100%);
}
.text-gradient {
    background: linear-gradient(135deg, #3e86c0, #60a5fa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-gradient-green {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ======================== GLASSMORPHISM ======================== */
.glass {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
}
.glass-light {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.4);
}
.glass-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
}

/* ======================== NAVBAR ======================== */
#navbar {
    background: transparent;
}
.nav-text-default { color: rgba(255,255,255,0.75); }
#navbar.navbar-scrolled {
    background: rgba(12,18,34,0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
#navbar.navbar-scrolled .nav-text-default { color: rgba(255,255,255,0.75); }
.navbar-logo-seo { color: #fff; }
.navbar-logo-adam { color: #3e86c0; }
.navbar-scrolled .navbar-logo-seo { color: #fff; }
.navbar-scrolled .navbar-logo-adam { color: #3e86c0; }
.navbar-menu-btn { color: #fff; }
.navbar-scrolled .navbar-menu-btn { color: #fff; }
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, visibility 0.35s ease;
    z-index: 100;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
}
.mobile-menu.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* ======================== MEGA MENU ======================== */
.mega-trigger { position: relative; }
.mega-dropdown {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}
.mega-trigger:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-trigger:hover .mega-chevron {
    transform: rotate(180deg);
}
.mega-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    transition: all 0.2s ease;
}
.mega-item:hover {
    background: rgba(62,134,192,0.06);
}

/* ======================== FADE ANIMATIONS ======================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in-left.visible { opacity: 1; transform: translateX(0); }

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

.fade-in-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-scale.visible { opacity: 1; transform: scale(1); }

.stagger-1 { transition-delay: 0.1s !important; }
.stagger-2 { transition-delay: 0.2s !important; }
.stagger-3 { transition-delay: 0.3s !important; }
.stagger-4 { transition-delay: 0.4s !important; }
.stagger-5 { transition-delay: 0.5s !important; }

/* ======================== HOVER EFFECTS ======================== */
.hover-scale {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}
.hover-scale:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
}
.hover-glow:hover {
    box-shadow: 0 0 30px rgba(62,134,192,0.15), 0 20px 40px rgba(0,0,0,0.08);
}
.hover-border {
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}
.hover-border:hover {
    border-color: rgba(62,134,192,0.3);
}

/* ======================== BUTTONS ======================== */
.btn-primary {
    background: linear-gradient(135deg, #3e86c0 0%, #2563eb 100%);
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: 0.875rem;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(62,134,192,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(62,134,192,0.4);
}
.btn-cta {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: 0.875rem;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(34,197,94,0.3);
}
.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34,197,94,0.4);
}
.btn-outline {
    background: transparent;
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: 0.875rem;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
}
.btn-outline-dark {
    background: transparent;
    color: #231e1d;
    padding: 0.875rem 2rem;
    border-radius: 0.875rem;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(35,30,29,0.15);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-outline-dark:hover {
    background: rgba(35,30,29,0.05);
    border-color: rgba(35,30,29,0.3);
}

/* CTA Pulse */
.cta-pulse { animation: pulse-glow 2.5s infinite; }
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(34,197,94,0.3), 0 0 0 0 rgba(34,197,94,0.4); }
    50% { box-shadow: 0 4px 15px rgba(34,197,94,0.3), 0 0 0 12px rgba(34,197,94,0); }
}

/* ======================== FLOATING ELEMENTS ======================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-slow { animation: float-slow 8s ease-in-out infinite; }
.animate-float-delay { animation: float 6s ease-in-out 2s infinite; }

/* ======================== COUNTER ANIMATION ======================== */
.counter-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}
.counter-box:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(62,134,192,0.3);
    transform: translateY(-4px);
}

/* ======================== STAT CARDS ======================== */
.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
}
.stat-card:hover {
    background: linear-gradient(135deg, rgba(62,134,192,0.1), rgba(62,134,192,0.05));
    border-color: rgba(62,134,192,0.3);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(62,134,192,0.1);
}

/* ======================== TOOL INPUT ======================== */
.tool-input-wrapper {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 1rem;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    transition: all 0.3s ease;
}
.tool-input-wrapper:focus-within {
    border-color: rgba(62,134,192,0.5);
    box-shadow: 0 0 20px rgba(62,134,192,0.1);
}
.tool-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0.75rem 1.25rem;
    flex: 1;
    font-size: 0.95rem;
}
.tool-input::placeholder { color: rgba(255,255,255,0.4); }

/* ======================== STICKY CTA ======================== */
.sticky-cta {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 45;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sticky-cta a {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0 1rem 1rem 0;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
}
.sticky-cta a:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.sticky-cta a .material-symbols-outlined {
    font-size: 1.25rem;
    flex-shrink: 0;
}
.sticky-cta a span:not(.material-symbols-outlined) {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease, margin-left 0.3s ease;
    margin-left: 0;
}
.sticky-cta a:hover span:not(.material-symbols-outlined) {
    max-width: 200px;
    margin-left: 0.5rem;
}

/* ======================== FAQ ACCORDION ======================== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-answer.open { max-height: 500px; }
.faq-icon { transition: transform 0.3s ease; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-item {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 1rem;
    transition: all 0.3s ease;
}
.faq-item:hover, .faq-item.active {
    border-color: rgba(62,134,192,0.2);
    box-shadow: 0 4px 15px rgba(62,134,192,0.06);
}

/* ======================== FEATURE CARDS ======================== */
.feature-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3e86c0, #2563eb);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    border-color: rgba(62,134,192,0.15);
}

/* ======================== LOADING SPINNER ======================== */
.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ======================== TYPING ANIMATION ======================== */
.typing-text::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #3e86c0;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ======================== MARQUEE / SCROLL ======================== */
.scroll-container {
    overflow: hidden;
    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);
}
.scroll-content {
    display: flex;
    gap: 2rem;
    animation: scroll 30s linear infinite;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ======================== GLOW DOT ======================== */
.glow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,0.6);
    animation: glow-pulse 2s infinite;
}
@keyframes glow-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(34,197,94,0.6); }
    50% { opacity: 0.5; box-shadow: 0 0 16px rgba(34,197,94,0.8); }
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
    .sticky-cta {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }
    .sticky-cta a {
        border-radius: 0;
        flex: 1;
        justify-content: center;
        padding: 0.75rem 0.5rem;
    }
    .sticky-cta a span:not(.material-symbols-outlined) {
        max-width: none;
        margin-left: 0.5rem;
        font-size: 0.75rem;
    }
    .sticky-cta a:hover { transform: none; }

    /* Buttons - prevent overflow */
    .btn-primary, .btn-cta, .btn-outline, .btn-outline-dark {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        text-align: center;
        word-break: break-word;
    }

    /* Hero text sizing */
    .gradient-hero h1 { font-size: 1.875rem !important; line-height: 1.2 !important; }
    .gradient-hero p { font-size: 1rem !important; }

    /* Tool input wrapper - stack on very small screens */
    .tool-input-wrapper {
        flex-direction: column;
    }
    .tool-input-wrapper .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* Stat cards - smaller text */
    .stat-card {
        padding: 1rem;
    }
    .stat-card .text-2xl, .stat-card .text-3xl {
        font-size: 1.25rem !important;
    }

    /* WhatsApp float - move above sticky CTA */
    #whatsapp-float {
        bottom: 70px;
        right: 12px;
    }
    #whatsapp-float .w-14 {
        width: 3rem;
        height: 3rem;
    }
    #whatsapp-float svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    /* Footer padding for sticky CTA */
    footer { padding-bottom: 56px; }

    /* Section spacing reduction */
    section { padding-top: 3rem; padding-bottom: 3rem; }
    .py-24 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .py-20 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }

    /* Grid fixes for mobile */
    .grid-cols-2 { gap: 0.75rem; }

    /* Font size overrides for headings */
    .text-3xl { font-size: 1.5rem !important; }
    .text-4xl { font-size: 1.75rem !important; }
    .text-5xl { font-size: 2rem !important; }

    /* Mega dropdown never show on mobile */
    .mega-dropdown { display: none !important; }

    /* CTA block buttons stack */
    .gradient-primary .flex.justify-center {
        flex-direction: column;
        align-items: center;
    }
    .gradient-primary .flex.justify-center a {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tool-input { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
    .btn-cta.cta-pulse { padding: 0.75rem 1rem !important; font-size: 0.875rem !important; }
    /* Footer grid - single column on very small */
    footer .grid { gap: 1.5rem; }
}
