/* ========================================
   HOME PAGE SPECIFIC STYLES
   ======================================== */

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
}

.logo-container {
    margin-bottom: 40px;
    animation: float 3s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(1.75rem, 6vw, 3.5rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
    line-height: 1.2;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #5a6c7d;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* Test Cards */
.test-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    margin-top: 40px;
    width: 100%;
}

.test-card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.test-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.test-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.test-title {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.test-subtitle {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: #667eea;
    font-weight: 600;
    margin-bottom: 15px;
}

.test-description {
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    color: #5a6c7d;
    line-height: 1.6;
}

/* Steps Section */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

.step {
    text-align: center;
    padding: 20px;
}

.step-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.step-title {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.step-description {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    color: #5a6c7d;
    line-height: 1.6;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

.feature {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}

.feature-title {
    font-size: clamp(1.15rem, 2.3vw, 1.4rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.feature-description {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    color: #5a6c7d;
    line-height: 1.7;
}

/* Testimonials */
.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 25px;
    margin-top: 40px;
    width: 100%;
}

.testimonial {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.testimonial-text {
    font-size: clamp(0.95rem, 1.9vw, 1.05rem);
    color: #2c3e50;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.testimonial-name {
    font-weight: 700;
    color: #2c3e50;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.testimonial-role {
    font-size: clamp(0.8rem, 1.6vw, 0.9rem);
    color: #667eea;
}

/* Final CTA Section */
.final-cta {
    padding: 80px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.final-cta-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    color: white;
    margin-bottom: 30px;
    font-weight: 700;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.final-cta .cta-button {
    background: white;
    color: #667eea;
    font-size: clamp(1rem, 2vw, 1.2rem);
    padding: 15px 35px;
}

.final-cta .cta-button:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
    .hero {
        min-height: auto;
        padding: 60px 15px;
    }

    .test-cards,
    .steps,
    .features,
    .testimonials {
        gap: 20px;
    }

    .test-card,
    .feature,
    .testimonial {
        padding: 25px 20px;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .final-cta {
        padding: 60px 15px;
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .test-cards,
    .features,
    .testimonials {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large screen adjustments */
@media (min-width: 1025px) {
    .test-cards {
        grid-template-columns: repeat(5, 1fr);
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonials {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Horizontal Scroll Container */
.horizontal-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 1.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.horizontal-scroll.dragging {
    cursor: grabbing;
}

.test-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    user-select: none;
}

/* Hide scrollbar */
.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}


/* ========================================
   MODAL STYLES
   ======================================== */

/* ── Keyframe animations ── */
@keyframes modalOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalSlideUp {
    0%   { opacity: 0; transform: translateY(40px) scale(0.94); }
    65%  { transform: translateY(-6px) scale(1.015); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmerBar {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

/* ── Modal Overlay ──
   ROOT CAUSE OF BUG:
   `position: fixed` is overridden when any ancestor element has a CSS
   `transform`, `filter`, `perspective`, or `will-change: transform` applied,
   because those create a new stacking/containing block. The `.hero` section
   uses `animation: float` which implies a transform, so the modal was being
   positioned relative to that container instead of the viewport — making it
   appear as a plain block at the bottom of the page.

   FIX: `position: fixed !important` + `z-index: 99999 !important` beats every
   ancestor stacking context and keeps the overlay fullscreen over the viewport.
*/
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;

    background: rgba(10, 8, 25, 0.70);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 99999 !important;

    animation: modalOverlayIn 0.28s ease forwards;
}

/* ── Modal Box ── */
.modal-box {
    position: relative;
    width: min(92vw, 460px);
    background: #ffffff;
    border-radius: 28px;
    padding: 38px 32px 30px;

    box-shadow:
        0 2px 4px   rgba(0, 0, 0, 0.04),
        0 8px 24px  rgba(0, 0, 0, 0.08),
        0 32px 72px rgba(102, 126, 234, 0.22),
        0 0 0 1px   rgba(102, 126, 234, 0.10);

    animation: modalSlideUp 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* Animated shimmer bar at top */
.modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        #667eea 0%,
        #a78bfa 33%,
        #764ba2 66%,
        #667eea 100%
    );
    background-size: 200% auto;
    animation: shimmerBar 2.8s linear infinite;
}

/* Soft glow halo behind the box */
.modal-box::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 29px;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.15),
        rgba(118, 75, 162, 0.15)
    );
    z-index: -1;
    filter: blur(20px);
}

/* ── Title ── */
.modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1040;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

/* ── Subtitle ── */
.modal-subtitle {
    font-size: 13.5px;
    color: #8b7db5;
    text-align: center;
    margin-bottom: 26px;
}

/* ── Options container ── */
.modal-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

/* ── Option card ── */
.modal-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 2px solid #ede9f7;
    background: #faf9ff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
}

/* Arrow reveal on hover */
.modal-option::after {
    content: '→';
    position: absolute;
    right: 20px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-option:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    transform: translateY(-3px) scale(1.015);
    box-shadow:
        0 8px 24px  rgba(102, 126, 234, 0.35),
        0 2px 4px   rgba(102, 126, 234, 0.15);
}

.modal-option:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.modal-option:active {
    transform: scale(0.98);
}

/* ── Option text ── */
.modal-option-title {
    font-weight: 700;
    font-size: 16px;
    color: #1a1040;
    margin-bottom: 3px;
    transition: color 0.2s ease;
}

.modal-option-desc {
    font-size: 13px;
    color: #8b7db5;
    transition: color 0.2s ease;
}

.modal-option:hover .modal-option-title,
.modal-option:hover .modal-option-desc {
    color: #ffffff;
}

/* ── Icon badge ── */
.modal-icon {
    font-size: 26px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ede9f7, #ddd6fe);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.modal-option:hover .modal-icon {
    background: rgba(255, 255, 255, 0.20);
}

/* ── Divider ── */
.modal-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ede9f7;
}

/* ── Cancel button ── */
.modal-close {
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    border: 2px solid #ede9f7;
    background: transparent;
    color: #8b7db5;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: all 0.18s ease;
}

.modal-close:hover {
    background: #faf9ff;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.modal-close:active {
    transform: scale(0.98);
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .modal-box {
        width: 95%;
        padding: 28px 20px 22px;
        border-radius: 22px;
    }

    .modal-title         { font-size: 20px; }
    .modal-option        { padding: 14px 16px; }
    .modal-option-title  { font-size: 15px; }
    .modal-option-desc   { font-size: 12px; }

    .modal-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
        border-radius: 11px;
    }
}

/* ── Accessibility: keyboard focus ── */
.modal-option:focus-visible,
.modal-close:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* ── Hide modal when printing ── */
@media print {
    .modal-overlay {
        display: none !important;
    }
}

.start-test-text {
    color: #2563eb; /* clean professional blue */
}

.start-test-text:hover {
    color: #1d4ed8; /* darker blue on hover */
}