/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-bg);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

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

/* Header Styles */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-brand a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.logo {
    width: 196px;
    height: 48px;
    border-radius: var(--border-radius);
    object-fit: contain;
    cursor: pointer;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.language-selector {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.language-selector:hover {
    border-color: var(--secondary-color);
}

.language-selector:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1000;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-icon {
    width: 24px;
    height: 24px;
    color: var(--white);
    transition: all 0.3s ease;
}

.hamburger-line {
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-link {
    padding: 10px 20px;
    color: var(--white);
    background: rgba(30, 58, 138, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
}

.nav-link:hover {
    background-color: rgba(59, 130, 246, 0.9);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-link:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Google Ads Section */
.ads-section {
    background: var(--gray-50);
    padding: 1.4rem 0;
    text-align: center;
    display: flex;
    align-items: center;
    min-height: calc(90px + 2.8rem);
}

.ads-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.ad-banner {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 0 auto;
    max-width: 728px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    transition: var(--transition);
}

.ad-banner:hover {
    border-color: var(--secondary-color);
    background: #f1f8ff;
}

/* Enhanced Hero Banner */
.hero-banner {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8faff 0%, #e6f3ff 100%);
    border-radius: var(--border-radius-xl);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
}

.badge-icon {
    font-size: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.highlight-text {
    color: var(--primary-color);
    position: relative;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    right: 0;
    height: 0.3em;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.3));
    border-radius: 0.15em;
    z-index: -1;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 1.25rem;
}

.feature-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Calculator Navigation */
.calculator-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 2rem 0;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 4px;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.nav-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--gray-50);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

/* Calculator Cards */
.calculator {
    display: none;
}

.calculator.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.calculator-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    border: 1px solid var(--border-light);
}

.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.card-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Input Styles */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Special 2-column row for time and quality inputs */
.time-quality-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    grid-column: 1 / -1;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.select-input,
.time-input {
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--white);
    transition: var(--transition);
    width: 100%;
}

.select-input:focus,
.time-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Enhanced time input styles for better UX */
.time-input {
    cursor: pointer;
    position: relative;
}

.time-input:hover {
    border-color: var(--secondary-color);
    background: #f8faff;
}

/* Make the entire time input clickable */
.time-input::-webkit-datetime-edit {
    cursor: pointer;
    padding: 0;
    width: 100%;
}

.time-input::-webkit-datetime-edit-fields-wrapper {
    cursor: pointer;
    padding: 0;
}

.time-input::-webkit-datetime-edit-hour-field,
.time-input::-webkit-datetime-edit-minute-field {
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.time-input::-webkit-datetime-edit-hour-field:hover,
.time-input::-webkit-datetime-edit-minute-field:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.time-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.time-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.radio-label:hover {
    background: var(--gray-50);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: var(--transition);
}

body.rtl .radio-custom {
    margin-right: 0;
    margin-left: 12px;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
}

/* Button Styles */
.calculate-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: var(--shadow-md);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

/* Result Styles */
.result {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

.result.hidden {
    display: none;
}

.result-item {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--secondary-color);
}

.result-item h3,
.result-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.result-item h3 {
    font-size: 1.25rem;
}

.result-item h4 {
    font-size: 1.1rem;
}

.result-item p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.result-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.result-item ul {
    margin: 1rem 0;
    padding-left: 0;
}

.result-item li {
    list-style: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.result-item li:last-child {
    border-bottom: none;
}

.time-option {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    margin: 4px 8px 4px 0;
    font-weight: 600;
    font-size: 14px;
}

body.rtl .time-option {
    margin: 4px 0 4px 8px;
}

.best-option {
    background: var(--success-color);
    box-shadow: var(--shadow-md);
}

.warning {
    background: #fef3cd;
    color: #856404;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #ffeaa7;
    margin: 1rem 0;
}

/* Education Section */
.education-section {
    margin: 2rem 0 4rem 0;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.education-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.education-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.education-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--white);
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--white);
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding: 1.5rem 2rem;
    text-align: center;
    color: #9ca3af;
}

/* Status Colors */
.status-excellent { color: var(--success-color); }
.status-good { color: var(--secondary-color); }
.status-warning { color: var(--warning-color); }
.status-danger { color: var(--danger-color); }

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result {
    animation: fadeIn 0.5s ease-out;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-container {
        padding: 1rem;
        position: relative;
    }

    .logo {
        width: 120px;
        height: 30px;
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block;
    }

    .nav-right {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav-right.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 16px;
        width: 100%;
        text-align: center;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .language-selector {
        padding: 12px 16px;
        font-size: 16px;
        width: 100%;
        text-align: center;
        border-radius: 8px;
        margin-top: 8px;
    }
    
    .hero-banner {
        padding: 2rem 0;
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-features {
        gap: 1rem;
    }
    
    .feature-item {
        padding: 0.5rem 1rem;
    }
    
    .feature-text {
        font-size: 0.8rem;
    }
    
    .ads-section {
        padding: 0.75rem 0;
        min-height: calc(50px + 1.5rem);
    }
    
    .ads-container {
        padding: 0 1rem;
    }
    
    .ad-banner {
        max-width: 320px;
        height: 50px;
        padding: 0.5rem;
        font-size: 11px;
        margin: 1rem auto 0.5rem auto;
    }
    
    .calculator-nav {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
    
    .nav-btn {
        text-align: center;
        padding: 12px;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .time-quality-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .radio-group {
        gap: 8px;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 80px;
        height: 20px;
    }
    
    .ads-section {
        padding: 0.5rem 0;
        min-height: calc(40px + 1rem);
    }
    
    .ads-container {
        padding: 0 0.5rem;
    }
    
    .ad-banner {
        max-width: 300px;
        height: 40px;
        padding: 0.25rem;
        font-size: 10px;
        margin: 0.75rem auto 0.25rem auto;
    }
    
    .calculator-card {
        padding: 1rem;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .nav-container {
        padding: 0.75rem;
    }

    .nav-right {
        padding: 0.75rem;
    }

    .nav-link {
        padding: 14px 16px;
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .language-selector {
        padding: 14px 16px;
        font-size: 16px;
        margin-top: 6px;
    }
    
    .hamburger-menu {
        padding: 6px;
    }
    
    .hamburger-icon {
        width: 20px;
        height: 20px;
    }
}

/* Date picker styles */
.date-picker-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    flex: 1;
}

.date-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-select:hover {
    border-color: var(--primary-color);
}

/* Error state styles */
.input-error {
    border-color: #dc3545 !important;
    animation: errorPulse 1.5s ease-in-out 3;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.select-input.input-error,
input[type="time"].input-error,
input[type="number"].input-error {
    border-color: #dc3545 !important;
    animation: errorPulse 1.5s ease-in-out 3;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

@keyframes errorPulse {
    0% {
        border-color: #dc3545;
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
    }
    50% {
        border-color: #ff6b6b;
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0.1);
    }
    100% {
        border-color: #dc3545;
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
    }
}

/* Responsive date picker */
@media (max-width: 768px) {
    .date-picker-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .date-select {
        width: 100%;
        min-width: unset;
        flex: unset;
    }
}

/* SEO Content Sections */
.benefits-section,
.faq-section,
.science-section,
.stats-section {
    padding: 4rem 0;
    background: var(--white);
}

.benefits-section {
    background: var(--gray-50);
}

.science-section {
    background: var(--gray-50);
}

.benefits-grid,
.faq-grid,
.stats-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.faq-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

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

.benefit-item,
.faq-item,
.science-item {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.benefit-item h3,
.faq-item h3,
.science-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.faq-item h3 {
    font-size: 1.1rem;
    line-height: 1.4;
}

.science-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.science-item ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.science-item li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Section Headers */
.benefits-section h2,
.faq-section h2,
.science-section h2,
.stats-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Responsive Design for SEO Sections */
@media (max-width: 768px) {
    .education-section {
        margin: 1.5rem 0 2rem 0;
    }
    
    .benefits-section,
    .faq-section,
    .science-section,
    .stats-section {
        padding: 2rem 0;
    }
    
    .benefits-grid,
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefit-item,
    .faq-item,
    .science-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .benefits-section h2,
    .faq-section h2,
    .science-section h2,
    .stats-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .feature-item {
        padding: 0.5rem 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .calculator-nav,
    .footer {
        display: none;
    }
    
    .calculator-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Article Showcase Sections */
.article-showcase-section {
    margin: 2rem 0;
    background: var(--white);
    padding: 3rem 0 2rem 0;
}

.article-showcase-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.article-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.article-showcase-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    height: 480px;
}

.article-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.article-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-showcase-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    width: fit-content;
}

.article-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: var(--secondary-color);
}

.article-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.read-time {
    font-weight: 500;
}

.article-date {
    color: var(--text-muted);
}

/* Article Hero Styles */
.article-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.article-hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive adjustments for article showcase */
@media (max-width: 768px) {
    .article-hero {
        padding: 2rem 0;
        margin-bottom: 1.5rem;
    }
    
    .article-hero .container {
        padding: 0 1rem;
    }
    
    .article-hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .article-meta {
        gap: 0.75rem;
        font-size: 0.8rem;
    }
    
    .article-meta span {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .article-showcase-section {
        margin: 1.5rem 0;
        padding: 2rem 0 1.5rem 0;
    }
    
    .article-showcase-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        margin-top: 0.5rem;
    }
    
    .article-showcase-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-showcase-card {
        height: 420px;
    }
    
    .article-image {
        height: 180px;
    }
    
    .article-content {
        padding: 1.25rem;
    }
    
    .article-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .article-hero {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
    }
    
    .article-hero .container {
        padding: 0 0.75rem;
    }
    
    .article-hero h1 {
        font-size: 1.4rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }
    
    .article-meta {
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    
    .article-meta span {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    
    .article-showcase-section {
        margin: 1rem 0;
        padding: 1.5rem 0 1rem 0;
    }
    
    .article-showcase-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        margin-top: 0.5rem;
    }
    
    .article-showcase-grid {
        gap: 1rem;
    }
    
    .article-showcase-card {
        height: 380px;
    }
    
    .article-image {
        height: 160px;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Personalized Message Styles */
.personalized-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease-out;
    max-width: 320px;
}

.message-content {
    padding: 1.5rem;
    text-align: center;
    line-height: 1.6;
}

.save-plan-btn {
    display: inline-block;
    margin: 1rem 0.5rem 0.5rem 0;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.save-plan-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.dismiss-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced Usage Stats Animation */
.usage-stats {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #64748b;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.usage-stats .stat-number {
    font-weight: 600;
    color: #1e40af;
    display: inline !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

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

/* Mobile Responsiveness for Personalized Message */
@media (max-width: 768px) {
    .personalized-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .message-content {
        padding: 1rem;
    }
    
    .save-plan-btn {
        display: block;
        width: 100%;
        margin: 1rem 0 0.5rem 0;
    }
}

/* 图片样式优化 - 确保所有本地图片都能正确显示 */
.article-content img,
.content-section img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
    transition: transform 0.3s ease;
}

.article-image:hover {
    transform: scale(1.02);
}

/* 文章预览图片样式 */
.topic-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
}

.topic-card:hover .topic-image img {
    transform: scale(1.05);
}

/* 响应式图片优化 */
@media (max-width: 768px) {
    .article-content img,
    .content-section img {
        margin: 1rem 0;
        border-radius: 6px;
    }
    
    .topic-image img {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .topic-image img {
        height: 140px;
    }
}

/* 文章内容区域的图片特殊样式 */
.article-content img,
.content-section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 预览图片加载优化 */
.topic-image {
    overflow: hidden;
    position: relative;
}

.topic-image img {
    opacity: 1;
    transition: opacity 0.3s ease;
} 

/* Article Page Layout with Sidebar */
.article-layout {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 20px; /* Add top margin for better spacing from header */
}

.article-main {
    flex: 1;
    max-width: 800px;
}

/* Optimized Article Sidebar Design */
.article-sidebar {
    width: 320px;
    position: sticky;
    top: 120px; /* Increased top spacing for better visual separation */
    height: fit-content;
    z-index: 10;
    margin-top: 20px; /* Additional margin for better spacing from header */
}

/* Enhanced APP Download Sidebar */
.app-download-sidebar {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    color: #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.app-download-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.app-download-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.app-download-header::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
}

.app-free-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.app-free-badge::before {
    content: '✓';
    margin-right: 0.25rem;
    font-weight: bold;
}

.app-download-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
    line-height: 1.3;
}

.app-download-header p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.app-features {
    margin-bottom: 2rem;
}

.app-features h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
    display: flex;
    align-items: center;
}

.app-features h4::before {
    content: '✨';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.app-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.app-features li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.4;
}

.app-features li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    margin-right: 0.75rem;
    margin-top: 0.1rem;
    font-size: 0.85rem;
}

.app-download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Reduced gap between buttons */
    align-items: center; /* Center the buttons */
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    background: #ffffff;
    color: #1e293b;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #f8fafc;
}

.download-btn img {
    width: 18px;
    height: 18px;
}

.download-btn.apple {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.download-btn.apple:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.download-btn.android {
    background: #01875f;
    color: #ffffff;
    border-color: #01875f;
}

.download-btn.android:hover {
    background: #016a4e;
    border-color: #016a4e;
}

/* Trust indicators */
.trust-indicators {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.trust-indicators p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.trust-indicators .stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

/* Mobile Responsive for Article Layout */
@media (max-width: 1024px) {
    .article-layout {
        flex-direction: column;
        gap: 1rem;
        margin-top: 10px; /* Reduced margin on mobile */
    }
    
    .article-sidebar {
        width: 100%;
        position: static;
        top: auto;
        margin-top: 10px; /* Reduced margin on mobile */
    }
    
    .app-download-sidebar {
        position: static;
        top: auto;
        margin: 1rem 0;
    }
}

@media (max-width: 768px) {
    .article-layout {
        padding: 0 15px;
    }
    
    .app-download-sidebar {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .app-download-header h3 {
        font-size: 1.25rem;
    }
    
    .app-download-header p {
        font-size: 0.9rem;
    }
    
    .app-features h4 {
        font-size: 0.95rem;
    }
    
    .app-features li {
        font-size: 0.85rem;
    }
    
    .download-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .app-download-sidebar {
        padding: 1.25rem;
    }
    
    .app-download-header h3 {
        font-size: 1.1rem;
    }
    
    .app-features li {
        font-size: 0.8rem;
    }
    
    .download-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .download-btn img {
        width: 16px;
        height: 16px;
    }
}

/* Hide sidebar on print */
@media print {
    .article-sidebar {
        display: none;
    }
    
    .article-layout {
        flex-direction: column;
    }
    
    .article-main {
        max-width: none;
    }
} 

/* Smart App Banner Styles */
.smart-banner {
    position: fixed;
    top: 60px; /* Position below header with proper spacing */
    left: 0;
    right: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.smart-banner.hidden {
    display: none;
}

.smart-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.smart-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    overflow: hidden;
}

.smart-banner-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smart-banner-text {
    flex: 1;
}

.smart-banner-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.smart-banner-subtitle {
    color: #666;
    font-size: 12px;
}

.smart-banner-button {
    background: #007aff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.smart-banner-button:hover {
    background: #0056cc;
}

.smart-banner-close {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
}

/* Device-specific sidebar visibility */
.sidebar-hidden {
    display: none !important;
}

/* Adjust body padding when banner is shown */
body.banner-active {
    padding-top: 116px; /* 60px (header) + 56px (banner) */
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .smart-banner {
        top: 50px; /* Slightly less spacing on mobile */
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .smart-banner-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .smart-banner-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .smart-banner-title {
        font-size: 13px;
    }
    
    .smart-banner-subtitle {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .smart-banner {
        top: 45px; /* Even less spacing on small mobile */
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .smart-banner-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .smart-banner-button {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .smart-banner-title {
        font-size: 12px;
    }
    
    .smart-banner-subtitle {
        font-size: 10px;
    }
} 

/* SVG Download Buttons */
.download-btn-svg {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    max-width: 200px; /* Limit maximum width */
    margin: 0 auto; /* Center the buttons */
}

.download-btn-svg:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.download-btn-svg:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.download-btn-svg img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
} 