/* ملف CSS محسن للموقع - styles.css - LCP Optimized */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --border: #e9ecef;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-hero: 0 10px 30px rgba(102, 126, 234, 0.2);

    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;

    --container-max: 1200px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --spacing: 20px;
    --spacing-sm: 12px;
    --spacing-lg: 30px;
}

/* Reset & Base - Optimized for LCP */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
    background: var(--white);
    direction: rtl;
    line-height: 1.6;
    color: var(--dark);
    font-weight: 400;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Header - Optimized for fast rendering */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: var(--spacing-lg) 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    contain: layout style paint;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
    will-change: auto;
}

.header-container {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.logo {
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    transition: var(--transition-fast);
}

.logo:hover {
    color: #f0f8ff;
    transform: scale(1.02);
}

.logo-icon {
    font-size: clamp(24px, 5vw, 36px);
}

.header-desc {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(14px, 2.5vw, 18px);
    margin-top: var(--spacing-sm);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Chat Stats - Optimized */
.chat-stats {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px;
    margin-top: 25px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 10px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-fast);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.stat-number {
    display: block;
    font-size: clamp(18px, 3.5vw, 22px);
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.stat-label {
    font-size: clamp(12px, 2.2vw, 14px);
    opacity: 0.9;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Breadcrumb - Simplified */
.breadcrumb {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-sm) 0;
    backdrop-filter: blur(10px);
}

.breadcrumb-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb-home {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.breadcrumb-home:hover {
    color: var(--secondary);
}

.breadcrumb-separator {
    color: var(--gray);
    font-weight: 600;
}

.breadcrumb-current {
    color: var(--dark);
    font-weight: 600;
    word-break: break-word;
}

/* Main - Optimized for LCP */
.main {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--spacing);
    min-height: 50vh;
    contain: layout style;
}

/* Error Pages - Simplified for faster rendering */
.error-404 {
    margin: var(--spacing-lg) 0;
}

.error-container {
    background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%);
    color: var(--white);
    padding: clamp(30px, 6vw, 50px);
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 15px;
    display: block;
}

.error-container h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 12px;
    font-weight: 700;
}

.error-container p {
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    margin-bottom: 25px;
    opacity: 0.95;
    line-height: 1.6;
}

.error-back-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.error-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hero Section - Critical for LCP */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: clamp(25px, 7vw, 60px);
    border-radius: var(--border-radius-lg);
    margin: var(--spacing-lg) 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-hero);
    contain: layout style paint;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-icon {
    width: clamp(50px, 12vw, 80px);
    height: clamp(50px, 12vw, 80px);
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    backdrop-filter: blur(15px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
}

.hero-title {
    font-size: clamp(1.5rem, 5vw, 2.6rem);
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.hero-desc {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 25px;
    opacity: 0.95;
    line-height: 1.7;
}

/* Page Image - Fully Responsive & Cross-Browser Compatible */
.page-image-section {
    margin: var(--spacing-lg) auto;
    text-align: center;
    padding: 0 var(--spacing);
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
}

/* حاوية الصورة لضمان النسبة الصحيحة */
.page-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
}

.page-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    min-height: 200px;
    object-fit: contain;
    object-position: center;
    border-radius: calc(var(--border-radius) - 3px);
    transition: var(--transition-fast);
    content-visibility: auto;
    /* دعم المتصفحات القديمة */
    -webkit-object-fit: contain;
    -o-object-fit: contain;
}

/* للصور ذات النسبة العريضة */
.page-image-section.wide .page-image {
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

.page-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.3);
}

/* تحسينات للتابلت */
@media (max-width: 992px) {
    .page-image-section {
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }

    .page-image-wrapper {
        max-width: 100%;
    }

    .page-image {
        max-height: 400px;
    }
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    .page-image-section {
        margin: var(--spacing) auto;
        padding: 0 10px;
    }

    .page-image-wrapper {
        border-width: 2px;
        border-radius: 10px;
    }

    .page-image {
        max-height: 300px;
        min-height: 150px;
        border-radius: 8px;
    }

    .page-image:hover {
        transform: none;
        /* إلغاء التكبير على الموبايل */
    }
}

/* تحسينات لشاشات صغيرة جداً */
@media (max-width: 480px) {
    .page-image-section {
        padding: 0 5px;
    }

    .page-image-wrapper {
        border-radius: 8px;
    }

    .page-image {
        max-height: 250px;
        min-height: 120px;
        border-radius: 6px;
    }
}

/* دعم للمتصفحات التي لا تدعم object-fit */
@supports not (object-fit: contain) {
    .page-image-wrapper {
        position: relative;
        padding-bottom: 56.25%;
        /* نسبة 16:9 */
        height: 0;
    }

    .page-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Content Sections - Optimized for performance */
.content-section {
    background: var(--white);
    margin: var(--spacing-lg) 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition-fast);
    contain: layout style;
}

.content-section:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.content-container {
    padding: clamp(20px, 5vw, 40px);
}

.section-title {
    font-size: clamp(1.3rem, 4vw, 2rem);
    color: var(--dark);
    text-align: center;
    margin-bottom: var(--spacing);
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-content {
    font-size: clamp(1rem, 2.8vw, 1.15rem);
    line-height: 1.8;
    color: var(--dark);
    text-align: center;
}

.section-content p {
    margin-bottom: 1.2rem;
}

.content-list {
    text-align: right;
    margin: var(--spacing) 0;
    padding-right: var(--spacing);
}

.content-list li {
    margin-bottom: 8px;
    color: var(--dark);
}

/* Section Variants - Simplified gradients */
.intro-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-right: 4px solid var(--primary);
}

.features-section {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.05) 0%, rgba(39, 174, 96, 0.05) 100%);
    border-right: 4px solid var(--success);
}

.tips-section {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(41, 128, 185, 0.05) 100%);
    border-right: 4px solid var(--info);
}

.faq-section {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.05) 0%, rgba(230, 126, 34, 0.05) 100%);
    border-right: 4px solid var(--warning);
}

.conclusion-section {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05) 0%, rgba(142, 68, 173, 0.05) 100%);
    border-right: 4px solid #9b59b6;
}

.faq-visible {
    background: linear-gradient(135deg, rgba(250, 214, 165, 0.15) 0%, rgba(255, 245, 225, 0.35) 100%);
    border-right: 4px solid #f39c12;
}

.faq-item {
    text-align: right;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    contain: layout style;
}

.faq-q {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
}

.faq-a {
    margin: 0;
    color: var(--dark);
}

/* Login Section - Critical for LCP */
.login-section {
    background: var(--white);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: var(--border-radius-lg);
    padding: clamp(30px, 6vw, 40px);
    margin: var(--spacing-lg) auto;
    max-width: 550px;
    box-shadow: var(--shadow-lg);
    position: relative;
    contain: layout style paint;
}

.login-disclaimer {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(41, 128, 185, 0.05) 100%);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 12px;
    padding: 15px 18px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: right;
}

.login-disclaimer i {
    color: var(--info);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.login-disclaimer p {
    color: var(--dark);
    font-size: clamp(13px, 2.3vw, 14px);
    line-height: 1.6;
    margin: 0;
}

.disclaimer-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.disclaimer-link:hover,
.disclaimer-link:focus {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
    text-decoration: none;
}

.login-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-size: clamp(16px, 3vw, 18px);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    min-width: 160px;
    user-select: none;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-guest {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-member {
    background: linear-gradient(45deg, var(--primary), var(--dark));
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.btn:active {
    transform: translateY(0);
}

.login-form {
    display: none;
    background: var(--light);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border);
    margin-top: 25px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.form-group {
    margin-bottom: 25px;
}

.form-input {
    width: 100%;
    padding: 18px;
    text-align: center;
    font-size: clamp(16px, 3.5vw, 18px);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: var(--white);
    color: var(--dark);
    font-weight: 500;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: #fafafa;
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--gray);
    opacity: 1;
}

.gender-selection {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.gender-option {
    text-align: center;
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    transition: var(--transition-fast);
    background: var(--white);
    border: 2px solid var(--border);
    overflow: hidden;
}

.gender-option label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    padding: 15px 20px;
    border-radius: 8px;
    transition: var(--transition-fast);
    min-width: 80px;
    height: 70px;
}

.gender-option input {
    display: none;
}

.gender-option:hover label {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gender-male {
    color: var(--info);
}

.gender-female {
    color: #e91e63;
}

.gender-icon {
    font-size: 24px;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    line-height: 1;
}

.gender-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.gender-option input:checked+label {
    font-weight: 700;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.gender-male input:checked+label {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(41, 128, 185, 0.1) 100%);
    border-color: var(--info);
    color: var(--info);
}

.gender-female input:checked+label {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.15) 0%, rgba(233, 30, 99, 0.1) 100%);
    border-color: #e91e63;
    color: #e91e63;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    font-size: clamp(18px, 3.5vw, 20px);
    background: linear-gradient(45deg, var(--primary), var(--dark));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: linear-gradient(45deg, var(--dark), #34495e);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.error {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    padding: 18px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 1px solid #ffcdd2;
    display: none;
    text-align: center;
    font-weight: 600;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* Footer - Optimized */
.footer {
    background: linear-gradient(135deg, var(--light) 0%, #e8ecf0 100%);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-lg);
    border-top: 3px solid var(--primary);
    contain: layout style;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.footer-links-section {
    margin-bottom: 40px;
}

.footer-links-title {
    font-size: clamp(1.3rem, 3.5vw, 1.6rem);
    color: var(--dark);
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
    position: relative;
}

.footer-links-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

/* تصنيفات الفوتر الجديدة */
.footer-category {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    border: 1px solid var(--border);
}

.footer-category-title {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--dark);
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.footer-category .footer-links-grid {
    margin-bottom: 0;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: var(--white);
    color: var(--dark);
    text-decoration: none;
    border-radius: 15px;
    transition: var(--transition-fast);
    font-size: clamp(14px, 2.5vw, 15px);
    font-weight: 500;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.footer-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.4s;
}

.footer-link:hover::before {
    left: 100%;
}

.footer-link:hover,
.footer-link:focus {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border-color: var(--primary);
}

.link-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.link-text {
    flex: 1;
    font-weight: 600;
    /* عرض النص بالكامل مع التحكم بالأسطر */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* سطرين كحد أقصى */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    word-break: break-word;
}

.footer-copyright {
    text-align: center;
    font-size: clamp(13px, 2.2vw, 14px);
    color: var(--gray);
    line-height: 1.8;
    border-top: 2px solid var(--border);
    padding-top: 25px;
}

.footer-nav {
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.footer-nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--white);
    color: var(--dark);
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.footer-nav-link:hover,
.footer-nav-link:focus {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    border-color: var(--primary);
}

.loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive - Optimized for mobile performance */
@media (max-width: 768px) {
    :root {
        --spacing: 15px;
        --spacing-lg: 25px;
        --spacing-sm: 10px;
    }

    .main {
        padding: var(--spacing);
    }

    .content-container {
        padding: var(--spacing);
    }

    .hero-section {
        margin: var(--spacing) 0;
        padding: var(--spacing-lg);
    }

    .content-section {
        margin: var(--spacing) 0;
    }

    .login-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .gender-selection {
        gap: 12px;
    }

    .gender-option label {
        min-width: 70px;
        height: 60px;
        padding: 12px 16px;
    }

    .gender-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .gender-text {
        font-size: 12px;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-nav-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .footer-nav-link {
        width: 200px;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing: 12px;
        --spacing-lg: 18px;
        --spacing-sm: 8px;
    }

    .hero-section {
        padding: var(--spacing);
        margin: var(--spacing-sm) 0;
    }

    .content-section {
        margin: var(--spacing-sm) 0;
    }

    .section-title {
        padding: 12px;
        font-size: clamp(1.1rem, 5vw, 1.4rem);
    }

    .login-section {
        padding: 20px 15px;
        margin: 15px auto;
    }

    .login-disclaimer {
        padding: 12px 15px;
        margin-bottom: 20px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .login-disclaimer i {
        align-self: center;
    }

    .gender-selection {
        gap: 10px;
    }

    .gender-option label {
        min-width: 65px;
        height: 55px;
        padding: 10px 14px;
    }

    .gender-icon {
        font-size: 18px;
        margin-bottom: 3px;
    }

    .gender-text {
        font-size: 11px;
    }

    .stats-grid {
        gap: 12px;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
    }

    .footer-link {
        padding: 15px;
        font-size: 14px;
    }
}

/* Print styles */
@media print {

    .header,
    .footer,
    .breadcrumb,
    .login-section {
        display: none !important;
    }

    .hero-section {
        background: var(--white) !important;
        color: var(--dark) !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    .content-section {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
}

/* Performance optimizations */
.hero-section,
.content-section,
.footer-link {
    will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .btn::before {
        display: none;
    }

    .footer-link::before {
        display: none;
    }
}

/* Additional optimizations for LCP */
.content-section {
    content-visibility: auto;
    contain-intrinsic-size: 300px;
}

.footer {
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

/* Optimized loading states */
.form-input:focus {
    will-change: border-color, box-shadow, transform;
}

.btn:hover {
    will-change: transform, box-shadow;
}

/* Prevent layout shifts */
.stat-number {
    min-height: 1.5em;
}

.hero-title {
    min-height: 1.2em;
}

/* Optimize font rendering */
body {
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth animations only when necessary */
@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-2px);
    }

    .stat-item:hover {
        transform: translateY(-1px);
    }
}

/* Enhanced FAQ styles */
.faq-container {
    margin-top: 20px;
}

.faq-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    margin-bottom: 20px;
    padding: 25px;
    transition: var(--transition-fast);
    position: relative;
    contain: layout style;
}

.faq-item:hover {
    border-color: #3498db;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.faq-q {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
    position: relative;
    padding-right: 30px;
}

.faq-q::before {
    content: "❓";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 18px;
}

.faq-number {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
}

.faq-a {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-right: 4px solid #3498db;
}

.faq-count {
    background: #e8f4fd;
    color: #2980b9;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
}

@media (max-width: 768px) {
    .faq-item {
        padding: 20px;
        margin-bottom: 15px;
    }

    .faq-q {
        font-size: 18px;
        padding-right: 25px;
    }

    .faq-a {
        padding: 15px;
        font-size: 15px;
    }
}