/* ============================================
   Take Sleep Test Page - Unique Styles
   ============================================ */

:root {
    --tst-primary: #0A2B62;
    --tst-accent: #E94132;
    --tst-secondary: #1a365d;
    --tst-light: #F8FAFC;
    --tst-border: #E2E8F0;
    --tst-text: #1E293B;
    --tst-text-muted: #64748B;
    --tst-white: #FFFFFF;
    --tst-success: #10B981;
    --tst-shadow: 0 10px 30px rgba(10, 43, 98, 0.1);
    --tst-shadow-lg: 0 20px 50px rgba(10, 43, 98, 0.15);
}

/* ============================================
   Base Styles
   ============================================ */

.tst-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.tst-section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--tst-primary);
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.tst-section-subtitle {
    font-size: 1rem;
    color: var(--tst-text-muted);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 500;
}

/* ============================================
   Hero Section
   ============================================ */

.tst-hero {
    background: linear-gradient(135deg, var(--tst-light) 0%, #ffffff 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.tst-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

.tst-hero-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

.tst-hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.tst-hero-content {
    padding: 20px;
    text-align: left;
    color: var(--tst-text);
    max-width: 700px;
}

.tst-hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--tst-primary);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.tst-hero-subtitle {
    font-size: 1rem;
    color: var(--tst-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 500;
}

.tst-hero-badges {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.tst-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--tst-success);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tst-badge i {
    font-size: 0.85rem;
}

.tst-hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
}

.tst-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    cursor: pointer;
}

.tst-btn-primary {
    background: linear-gradient(135deg, var(--tst-accent) 0%, #d63a2a 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(233, 65, 50, 0.3);
}

.tst-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(233, 65, 50, 0.4);
}

.tst-btn-secondary {
    background: white;
    color: var(--tst-primary);
    border: 2px solid var(--tst-primary);
}

.tst-btn-secondary:hover {
    background: var(--tst-light);
    transform: translateY(-3px);
}

.tst-btn-outline {
    background: transparent;
    color: var(--tst-primary);
    border: 2px solid var(--tst-primary);
}

.tst-btn-outline:hover {
    background: var(--tst-light);
}

.tst-btn-full {
    width: 100%;
}

.tst-btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.tst-hero-image {
    display: none;
}

.tst-hero-img {
    display: none;
}

/* ============================================
   Benefits Section
   ============================================ */

.tst-benefits {
    padding: 50px 0;
    background: white;
}

.tst-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tst-benefit-card {
    background: linear-gradient(135deg, var(--tst-light) 0%, #ffffff 100%);
    padding: 20px 18px;
    border-radius: 50px;
    text-align: center;
    border: 1px solid var(--tst-border);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tst-benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--tst-shadow);
    border-color: var(--tst-accent);
}

.tst-benefit-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--tst-accent) 0%, #d63a2a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.6rem;
    color: white;
    box-shadow: 0 8px 20px rgba(233, 65, 50, 0.3);
}

.tst-benefit-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tst-primary);
    margin-bottom: 8px;
}

.tst-benefit-text {
    font-size: 0.95rem;
    color: var(--tst-text-muted);
    line-height: 1.6;
}

/* ============================================
   Devices Section
   ============================================ */

.tst-devices {
    padding: 50px 0;
    background: linear-gradient(135deg, var(--tst-light) 0%, #ffffff 100%);
}

.tst-devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.tst-device-card {
    background: white;
    border-radius: 50px;
    padding: 30px 25px;
    border: 2px solid var(--tst-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tst-device-card:hover {
    transform: translateY(-10px);
    border-color: var(--tst-accent);
    box-shadow: var(--tst-shadow-lg);
}

.tst-device-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tst-badge-popular {
    background: linear-gradient(135deg, var(--tst-accent) 0%, #d63a2a 100%);
    color: white;
}

.tst-badge-advanced {
    background: linear-gradient(135deg, var(--tst-primary) 0%, var(--tst-secondary) 100%);
    color: white;
}

.tst-device-image {
    text-align: center;
    margin-bottom: 20px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tst-light);
    border-radius: 50px;
    overflow: hidden;
}

.tst-device-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tst-device-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--tst-primary);
    margin-bottom: 8px;
}

.tst-device-tagline {
    font-size: 0.95rem;
    color: var(--tst-text-muted);
    margin-bottom: 20px;
    font-weight: 500;
}

.tst-device-features {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.tst-device-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--tst-text);
    line-height: 1.6;
}

.tst-device-features i {
    color: var(--tst-success);
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.tst-device-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--tst-accent);
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================
   Comparison Section
   ============================================ */

.tst-comparison {
    padding: 50px 0;
    background: white;
}

.tst-comparison-table {
    overflow-x: auto;
    border-radius: 30px;
    box-shadow: var(--tst-shadow);
}

.tst-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.tst-table thead {
    background: linear-gradient(135deg, var(--tst-primary) 0%, var(--tst-secondary) 100%);
    color: white;
}

.tst-table th {
    padding: 15px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.tst-table-feature {
    text-align: left !important;
    background: var(--tst-light);
    color: var(--tst-primary);
    font-weight: 700;
}

.tst-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--tst-border);
    font-size: 0.95rem;
    color: var(--tst-text);
}

.tst-table tbody tr:hover {
    background: var(--tst-light);
}

.tst-table i {
    color: var(--tst-accent);
    margin: 0 2px;
}

/* ============================================
   Process Section
   ============================================ */

.tst-process {
    padding: 50px 0;
    background: linear-gradient(135deg, var(--tst-light) 0%, #ffffff 100%);
}

.tst-process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    align-items: center;
    position: relative;
}

.tst-process-step {
    text-align: center;
    position: relative;
    z-index: 2;
}

.tst-step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--tst-accent) 0%, #d63a2a 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 auto 12px;
    box-shadow: 0 8px 20px rgba(233, 65, 50, 0.3);
}

.tst-step-icon {
    width: 100px;
    height: 100px;
    background: white;
    border: 3px solid var(--tst-border);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 2.5rem;
    color: var(--tst-primary);
    transition: all 0.3s ease;
}

.tst-process-step:hover .tst-step-icon {
    border-color: var(--tst-accent);
    background: var(--tst-light);
    transform: scale(1.1);
}

.tst-step-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tst-primary);
    margin-bottom: 10px;
}

.tst-step-text {
    font-size: 0.95rem;
    color: var(--tst-text-muted);
    line-height: 1.6;
}

.tst-process-connector {
    display: none;
}

@media (min-width: 768px) {
    .tst-process-steps {
        grid-template-columns: 1fr auto 1fr auto 1fr;
    }

    .tst-process-connector {
        display: block;
        width: 40px;
        height: 3px;
        background: linear-gradient(90deg, var(--tst-border) 0%, var(--tst-accent) 50%, var(--tst-border) 100%);
        position: relative;
    }

    .tst-process-connector::after {
        content: '';
        position: absolute;
        right: -8px;
        top: -5px;
        width: 12px;
        height: 12px;
        background: var(--tst-accent);
        border-radius: 50%;
    }
}

/* ============================================
   CTA Section
   ============================================ */

.tst-cta {
    padding: 50px 0;
    background: linear-gradient(135deg, var(--tst-accent) 0%, #d63a2a 100%);
    position: relative;
    overflow: hidden;
}

.tst-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.tst-cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.tst-cta-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.tst-cta-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 500;
}

.tst-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.tst-cta .tst-btn-primary {
    background: white;
    color: var(--tst-accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.tst-cta .tst-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.tst-cta .tst-btn-outline {
    color: white;
    border-color: white;
}

.tst-cta .tst-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

@media (max-width: 1024px) {
    .tst-hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tst-hero-title {
        font-size: 2.5rem;
    }

    .tst-section-title {
        font-size: 2rem;
    }

    .tst-devices-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tst-hero {
        padding: 50px 0;
    }

    .tst-hero-title {
        font-size: 2rem;
    }

    .tst-hero-subtitle {
        font-size: 1rem;
    }

    .tst-hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tst-btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    .tst-section-title {
        font-size: 1.8rem;
    }

    .tst-section-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .tst-benefits,
    .tst-devices,
    .tst-comparison,
    .tst-process,
    .tst-cta {
        padding: 50px 0;
    }

    .tst-benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tst-benefit-card {
        padding: 30px 20px;
    }

    .tst-device-card {
        padding: 30px 20px;
    }

    .tst-device-image {
        height: 200px;
    }

    .tst-device-name {
        font-size: 1.5rem;
    }

    .tst-device-price {
        font-size: 1.5rem;
    }

    .tst-table th,
    .tst-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    .tst-cta-title {
        font-size: 1.8rem;
    }

    .tst-cta-subtitle {
        font-size: 1rem;
    }

    .tst-cta-buttons {
        flex-direction: column;
    }

    .tst-cta .tst-btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .tst-process-steps {
        grid-template-columns: 1fr;
    }

    .tst-process-connector {
        display: none !important;
    }

    .tst-step-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .tst-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .tst-hero {
        padding: 40px 0;
    }

    .tst-hero-title {
        font-size: 1.5rem;
    }

    .tst-hero-subtitle {
        font-size: 0.9rem;
    }

    .tst-hero-buttons {
        flex-direction: column;
    }

    .tst-section-title {
        font-size: 1.5rem;
    }

    .tst-benefits,
    .tst-devices,
    .tst-comparison,
    .tst-process,
    .tst-cta {
        padding: 40px 0;
    }

    .tst-benefit-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .tst-device-badge {
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    .tst-cta-title {
        font-size: 1.5rem;
    }

    .tst-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

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

    .tst-step-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tst-benefit-card,
.tst-device-card,
.tst-process-step {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   Accessibility
   ============================================ */

.tst-btn:focus {
    outline: 2px solid var(--tst-accent);
    outline-offset: 2px;
}

.tst-table:focus {
    outline: 2px solid var(--tst-accent);
    outline-offset: 2px;
}
