/* ==========================================
   ISLAMIC CALENDAR SYNC
   MakkahCompass Theme - Dark Celestial with Gold Accents
   ========================================== */

/* ==========================================
   1. CSS VARIABLES
   ========================================== */
.calendar-sync-page {
    --midnight: #0A1628;
    --deep-space: #0F1D32;
    --night-blue: #152238;
    --twilight: #1E3050;
    --gold: #D4A941;
    --gold-light: #E8D5A3;
    --gold-bright: #F5C84C;
    --cream: #F5F5F0;
    --pearl: #E8E8E3;
    --mist: #94A3B8;
    --slate: #64748B;
    --google-blue: #4285F4;
    --apple-gray: #A2AAAD;
    --outlook-blue: #0078D4;
    --emerald: #10B981;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(212, 169, 65, 0.2);
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
}

/* ==========================================
   2. PAGE CONTAINER
   ========================================== */
.calendar-sync-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg);
    font-family: var(--font-body);
    color: var(--cream);
    line-height: 1.6;
}

/* ==========================================
   3. LANGUAGE SWITCHER
   ========================================== */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.lang-btn {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    color: var(--mist);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    background: var(--twilight);
    color: var(--cream);
}

.lang-btn.active {
    background: var(--gold);
    color: var(--midnight);
    border-color: var(--gold);
    font-weight: 600;
}

/* ==========================================
   4. HERO SECTION
   ========================================== */
.hero-section {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    background: linear-gradient(180deg, var(--deep-space) 0%, var(--midnight) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
    border: 1px solid var(--twilight);
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    filter: drop-shadow(0 0 20px rgba(212, 169, 65, 0.4));
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: var(--gold);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--pearl);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   5. SYNC SECTION
   ========================================== */
.sync-section {
    margin-bottom: var(--space-3xl);
}

/* ==========================================
   6. CALENDAR PREVIEW
   ========================================== */
.calendar-preview-card {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.calendar-preview-card h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.events-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    max-height: 300px;
    overflow-y: auto;
    padding-right: var(--space-sm);
}

.events-preview::-webkit-scrollbar {
    width: 6px;
}

.events-preview::-webkit-scrollbar-track {
    background: var(--deep-space);
    border-radius: 3px;
}

.events-preview::-webkit-scrollbar-thumb {
    background: var(--twilight);
    border-radius: 3px;
}

.event-preview-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--deep-space);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--gold);
}

.event-preview-date {
    font-size: 0.8rem;
    color: var(--gold);
    white-space: nowrap;
}

.event-preview-name {
    font-size: 0.9rem;
    color: var(--cream);
}

/* ==========================================
   7. SYNC OPTIONS
   ========================================== */
.sync-options {
    background: var(--night-blue);
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-glow);
}

.sync-options h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* ==========================================
   8. SYNC BUTTONS
   ========================================== */
.sync-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.sync-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
}

.sync-btn:hover {
    transform: translateY(-2px);
}

.sync-btn.google {
    background: var(--google-blue);
    color: white;
}

.sync-btn.google:hover {
    box-shadow: 0 4px 20px rgba(66, 133, 244, 0.4);
}

.sync-btn.apple {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: white;
    border: 1px solid #444;
}

.sync-btn.apple:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.sync-btn.outlook {
    background: var(--outlook-blue);
    color: white;
}

.sync-btn.outlook:hover {
    box-shadow: 0 4px 20px rgba(0, 120, 212, 0.4);
}

.sync-icon {
    width: 24px;
    height: 24px;
}

.sync-icon svg {
    width: 100%;
    height: 100%;
}

/* ==========================================
   9. MANUAL SYNC
   ========================================== */
.manual-sync {
    text-align: center;
}

.manual-sync h3 {
    font-size: 1rem;
    color: var(--mist);
    margin-bottom: var(--space-md);
    font-weight: normal;
}

.url-copy-box {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.url-copy-box input {
    flex: 1;
    padding: var(--space-md);
    background: var(--deep-space);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-md);
    color: var(--gold-light);
    font-size: 0.9rem;
    font-family: monospace;
}

.btn-copy {
    padding: var(--space-md) var(--space-lg);
    background: var(--gold);
    color: var(--midnight);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-copy:hover {
    background: var(--gold-bright);
}

.btn-copy.copied {
    background: var(--emerald);
    color: white;
}

.copy-note {
    font-size: 0.85rem;
    color: var(--mist);
}

/* ==========================================
   10. DOWNLOAD SECTION
   ========================================== */
.download-section {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.download-section h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--gold);
    margin-bottom: var(--space-md);
}

.section-desc {
    color: var(--mist);
    margin-bottom: var(--space-lg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-secondary {
    background: var(--twilight);
    color: var(--cream);
    border: 1px solid var(--slate);
}

.btn-secondary:hover {
    background: var(--slate);
    transform: translateY(-2px);
}

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

/* ==========================================
   11. HOW IT WORKS
   ========================================== */
.how-it-works {
    margin-bottom: var(--space-3xl);
    text-align: center;
}

.how-it-works h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: var(--space-xl);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
}

.step {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--midnight);
    margin: 0 auto var(--space-md);
}

.step h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--cream);
    margin-bottom: var(--space-sm);
}

.step p {
    font-size: 0.9rem;
    color: var(--mist);
    margin: 0;
}

/* ==========================================
   12. EDUCATIONAL CONTENT
   ========================================== */
.educational-content {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.educational-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    margin: var(--space-xl) 0 var(--space-md);
}

.educational-content h2:first-child {
    margin-top: 0;
}

.educational-content h3 {
    font-size: 1.25rem;
    color: var(--gold-light);
    margin: var(--space-lg) 0 var(--space-md);
}

.educational-content p {
    color: var(--pearl);
    margin-bottom: var(--space-md);
}

.educational-content ul,
.educational-content ol {
    color: var(--pearl);
    padding-left: var(--space-xl);
    margin-bottom: var(--space-md);
}

.educational-content li {
    margin-bottom: var(--space-sm);
}

/* ==========================================
   13. FAQ SECTION
   ========================================== */
.faq-section {
    margin-bottom: var(--space-3xl);
}

.faq-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.faq-item {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    font-size: 1.125rem;
    color: var(--gold-light);
    padding: var(--space-lg);
    margin: 0;
    cursor: pointer;
}

.faq-question:hover {
    background: var(--twilight);
}

.faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--pearl);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================
   14. RELATED TOOLS
   ========================================== */
.related-tools-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.related-tool-card {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-decoration: none;
    transition: all var(--transition-base);
}

.related-tool-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.related-tool-card h3 {
    font-size: 1.125rem;
    color: var(--gold-light);
    margin: 0 0 var(--space-sm);
}

.related-tool-card p {
    font-size: 0.9rem;
    color: var(--mist);
    margin: 0;
}

/* ==========================================
   15. RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .calendar-sync-page {
        padding: var(--space-md);
    }

    .hero-section {
        padding: var(--space-xl) var(--space-md);
    }

    .sync-options {
        padding: var(--space-xl);
    }

    .url-copy-box {
        flex-direction: column;
    }

    .url-copy-box input {
        text-align: center;
        font-size: 0.8rem;
    }
}

@media (max-width: 500px) {
    .language-switcher {
        gap: var(--space-xs);
    }

    .lang-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }

    .sync-btn {
        font-size: 1rem;
        padding: var(--space-md);
    }

    .events-preview {
        grid-template-columns: 1fr;
    }
}
