/* ==========================================
   EID GREETING CARD GENERATOR
   MakkahCompass Theme - Dark Celestial with Gold Accents
   ========================================== */

/* ==========================================
   1. CSS VARIABLES
   ========================================== */
.card-generator-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;
    --emerald: #10B981;
    --emerald-light: #34D399;
    --royal: #4F46E5;
    --royal-light: #818CF8;
    --rose: #E11D48;
    --rose-light: #FB7185;
    --teal: #0D9488;
    --teal-light: #2DD4BF;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-arabic: 'Noto Kufi Arabic', 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
   ========================================== */
.card-generator-page {
    max-width: 1100px;
    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-2xl) 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: 3.5rem;
    margin-bottom: var(--space-md);
    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. EID TYPE SELECTOR
   ========================================== */
.eid-type-selector {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.eid-type-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--night-blue);
    border: 2px solid var(--twilight);
    border-radius: var(--radius-lg);
    color: var(--mist);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.eid-type-btn:hover {
    border-color: var(--gold);
    color: var(--cream);
}

.eid-type-btn.active {
    background: linear-gradient(135deg, var(--night-blue) 0%, rgba(212, 169, 65, 0.2) 100%);
    border-color: var(--gold);
    color: var(--gold);
}

.eid-type-icon {
    font-size: 1.5rem;
}

/* ==========================================
   6. GENERATOR GRID
   ========================================== */
.generator-section {
    margin-bottom: var(--space-3xl);
}

.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-xl);
}

/* ==========================================
   7. TEMPLATES PANEL
   ========================================== */
.templates-panel h2,
.editor-panel h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--gold);
    margin-bottom: var(--space-lg);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    max-height: 500px;
    overflow-y: auto;
    padding-right: var(--space-sm);
}

.templates-grid::-webkit-scrollbar {
    width: 6px;
}

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

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

.template-card {
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    border: 2px solid var(--twilight);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.template-card:hover {
    border-color: var(--gold);
    transform: scale(1.02);
}

.template-card.active {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 169, 65, 0.3);
}

.template-card .template-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-align: center;
}

.template-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, 0.9);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    color: var(--cream);
    text-align: center;
}

/* ==========================================
   8. EDITOR PANEL
   ========================================== */
.card-preview-container {
    background: var(--deep-space);
    border: 2px dashed var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-preview {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Customization Options */
.customization-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.option-group label {
    font-size: 0.9rem;
    color: var(--gold-light);
    font-weight: 500;
}

.option-group select,
.option-group input,
.option-group textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-md);
    color: var(--cream);
    font-size: 1rem;
    font-family: var(--font-body);
}

.option-group select:focus,
.option-group input:focus,
.option-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.option-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* Color Options */
.color-options {
    display: flex;
    gap: var(--space-sm);
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: var(--space-md);
}

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

.btn-primary {
    background: var(--gold);
    color: var(--midnight);
}

.btn-primary:hover {
    background: var(--gold-bright);
    transform: translateY(-2px);
}

.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;
}

/* ==========================================
   9. MESSAGES SECTION
   ========================================== */
.messages-section {
    margin-bottom: var(--space-3xl);
}

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

.messages-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

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

.msg-tab:hover {
    background: var(--twilight);
    color: var(--cream);
}

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

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

.message-card {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.message-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.message-card p {
    color: var(--pearl);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.message-card .use-btn {
    display: inline-block;
    margin-top: var(--space-md);
    font-size: 0.8rem;
    color: var(--gold);
    text-decoration: none;
}

/* ==========================================
   10. 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);
    text-align: left;
}

.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);
}

/* ==========================================
   11. 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;
}

/* ==========================================
   12. 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;
}

/* ==========================================
   13. CARD TEMPLATE STYLES
   ========================================== */

/* Base Card Style */
.eid-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Template 1: Classic Gold */
.eid-card.template-classic-gold {
    background: linear-gradient(135deg, #0A1628 0%, #152238 100%);
    color: #F5F5F0;
}

.eid-card.template-classic-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(212, 169, 65, 0.1) 0%, transparent 50%);
}

/* Template 2: Emerald Garden */
.eid-card.template-emerald-garden {
    background: linear-gradient(135deg, #064E3B 0%, #10B981 100%);
    color: #F5F5F0;
}

/* Template 3: Royal Purple */
.eid-card.template-royal-purple {
    background: linear-gradient(135deg, #312E81 0%, #4F46E5 100%);
    color: #F5F5F0;
}

/* Template 4: Sunset Rose */
.eid-card.template-sunset-rose {
    background: linear-gradient(135deg, #9F1239 0%, #FB7185 100%);
    color: #F5F5F0;
}

/* Template 5: Ocean Teal */
.eid-card.template-ocean-teal {
    background: linear-gradient(135deg, #134E4A 0%, #2DD4BF 100%);
    color: #F5F5F0;
}

/* Template 6: Cream Minimal */
.eid-card.template-cream-minimal {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    color: #1F2937;
}

/* Card Content */
.card-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.card-greeting {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-arabic {
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 12px;
    opacity: 0.9;
}

.card-message {
    font-size: 0.9rem;
    opacity: 0.85;
    max-width: 280px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-from {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: auto;
}

/* Decorative Elements */
.card-decoration {
    position: absolute;
    opacity: 0.1;
    font-size: 8rem;
}

.card-decoration.top-left {
    top: -20px;
    left: -20px;
}

.card-decoration.bottom-right {
    bottom: -20px;
    right: -20px;
}

/* ==========================================
   14. RESPONSIVE
   ========================================== */
@media (max-width: 900px) {
    .generator-grid {
        grid-template-columns: 1fr;
    }

    .templates-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .card-generator-page {
        padding: var(--space-md);
    }

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

    .eid-type-selector {
        flex-direction: column;
        align-items: center;
    }

    .eid-type-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        flex-direction: column;
    }
}

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

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

    .card-preview {
        max-width: 100%;
    }

    .color-btn {
        width: 32px;
        height: 32px;
    }

    .messages-grid {
        grid-template-columns: 1fr;
    }
}
