/**
 * Gregorian to Hijri Converter - Sacred Geometric Night Sky Theme
 * Celestial dark design with gold accents
 */

/* ========================================
   CSS VARIABLES - Inherits from main theme
   ======================================== */

:root {
    /* Celestial Color Palette */
    --ghc-midnight: #0A1628;
    --ghc-deep-space: #0F1D32;
    --ghc-night-blue: #152238;
    --ghc-twilight: #1E3050;

    /* Islamic Emerald Tones */
    --ghc-emerald-deep: #0D3B2D;
    --ghc-emerald: #10503D;

    /* Sacred Gold Palette */
    --ghc-gold: #D4A941;
    --ghc-gold-light: #E8D5A3;
    --ghc-brass: #C4A35A;

    /* Neutral Tones */
    --ghc-cream: #F5F5F0;
    --ghc-pearl: #E8E8E3;
    --ghc-mist: #94A3B8;
    --ghc-slate: #64748B;

    /* Semantic Colors */
    --ghc-success: #10B981;
    --ghc-error: #EF4444;

    /* Typography */
    --ghc-font-display: 'Cormorant Garamond', Georgia, serif;
    --ghc-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --ghc-font-arabic: 'Noto Naskh Arabic', serif;

    /* Spacing */
    --ghc-spacing-xs: 0.5rem;
    --ghc-spacing-sm: 1rem;
    --ghc-spacing-md: 1.5rem;
    --ghc-spacing-lg: 2rem;
    --ghc-spacing-xl: 3rem;

    /* Border Radius */
    --ghc-radius-sm: 4px;
    --ghc-radius-md: 8px;
    --ghc-radius-lg: 16px;

    /* Shadows */
    --ghc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --ghc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --ghc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --ghc-shadow-glow: 0 0 40px rgba(212, 169, 65, 0.2);

    /* Transitions */
    --ghc-transition: all 0.3s ease;
}

/* ========================================
   BASE STYLES
   ======================================== */

.gregorian-hijri-converter-page {
    font-family: var(--ghc-font-body);
    color: var(--ghc-cream);
    line-height: 1.7;
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--ghc-spacing-md);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    text-align: center;
    padding: var(--ghc-spacing-xl) var(--ghc-spacing-md);
    margin-bottom: var(--ghc-spacing-lg);
    background: linear-gradient(135deg, var(--ghc-emerald-deep), var(--ghc-emerald));
    border-radius: var(--ghc-radius-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212, 169, 65, 0.2);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.2), transparent);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-title {
    font-family: var(--ghc-font-display);
    font-size: 2.2rem;
    color: var(--ghc-cream);
    margin: 0 0 var(--ghc-spacing-sm) 0;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--ghc-pearl);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

/* ========================================
   CONVERTER APP
   ======================================== */

.converter-app {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ghc-spacing-lg);
    margin-bottom: var(--ghc-spacing-xl);
}

@media (max-width: 768px) {
    .converter-app {
        grid-template-columns: 1fr;
    }
}

/* Input Panel */
.converter-input-panel {
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.4), rgba(15, 29, 50, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--ghc-radius-lg);
    padding: var(--ghc-spacing-lg);
}

.panel-title {
    font-family: var(--ghc-font-display);
    font-size: 1.3rem;
    color: var(--ghc-gold);
    margin-bottom: var(--ghc-spacing-md);
    font-weight: 600;
}

/* Date Input Form */
.date-input-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--ghc-spacing-sm);
    margin-bottom: var(--ghc-spacing-md);
}

@media (max-width: 480px) {
    .date-input-form {
        grid-template-columns: 1fr;
    }
}

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

.form-group label {
    font-size: 0.85rem;
    color: var(--ghc-mist);
    margin-bottom: var(--ghc-spacing-xs);
    font-weight: 500;
}

.form-control {
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--ghc-radius-md);
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.2);
    color: var(--ghc-cream);
    transition: var(--ghc-transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--ghc-gold);
    box-shadow: 0 0 0 3px rgba(212, 169, 65, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ghc-spacing-xs);
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--ghc-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ghc-transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--ghc-gold), var(--ghc-brass));
    color: var(--ghc-midnight);
    width: 100%;
    box-shadow: var(--ghc-shadow-md), 0 0 20px rgba(212, 169, 65, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--ghc-shadow-lg), 0 0 30px rgba(212, 169, 65, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ghc-cream);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

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

.btn-outline:hover {
    background: var(--ghc-gold);
    color: var(--ghc-midnight);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

/* Quick Actions */
.quick-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--ghc-spacing-md);
}

.quick-btn {
    padding: var(--ghc-spacing-xs) var(--ghc-spacing-sm);
    background: rgba(212, 169, 65, 0.15);
    color: var(--ghc-gold-light);
    border: 1px solid rgba(212, 169, 65, 0.3);
    border-radius: var(--ghc-radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--ghc-transition);
}

.quick-btn:hover {
    background: var(--ghc-gold);
    color: var(--ghc-midnight);
}

/* Error Box */
.error-box {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    padding: var(--ghc-spacing-sm);
    border-radius: var(--ghc-radius-md);
    margin-top: var(--ghc-spacing-md);
    font-size: 0.9rem;
    border-left: 4px solid var(--ghc-error);
}

/* ========================================
   RESULTS PANEL
   ======================================== */

.converter-results-panel {
    min-height: 300px;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: var(--ghc-spacing-md);
}

.results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.2), rgba(15, 29, 50, 0.3));
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--ghc-radius-lg);
    color: var(--ghc-mist);
    text-align: center;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: var(--ghc-spacing-sm);
    opacity: 0.5;
}

/* Result Cards */
.result-card {
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.4), rgba(15, 29, 50, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--ghc-radius-lg);
    padding: var(--ghc-spacing-md);
}

.result-card.primary-card {
    background: linear-gradient(135deg, var(--ghc-emerald-deep), var(--ghc-emerald));
    border: 1px solid rgba(212, 169, 65, 0.2);
    box-shadow: var(--ghc-shadow-glow);
}

.result-card.primary-card .card-header h3 {
    color: var(--ghc-cream);
}

.result-card.info-card {
    background: rgba(255, 255, 255, 0.02);
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--ghc-spacing-xs);
    margin-bottom: var(--ghc-spacing-sm);
}

.card-icon {
    font-size: 1.3rem;
}

.card-header h3 {
    font-size: 0.95rem;
    color: var(--ghc-gold);
    font-weight: 600;
    margin: 0;
}

.card-body {
    text-align: center;
}

.date-large {
    font-family: var(--ghc-font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--ghc-spacing-xs);
    color: var(--ghc-gold);
    text-shadow: 0 0 20px rgba(212, 169, 65, 0.3);
}

.date-arabic {
    font-size: 1.4rem;
    font-family: var(--ghc-font-arabic);
    direction: rtl;
    color: var(--ghc-pearl);
    opacity: 0.9;
}

.date-medium {
    font-family: var(--ghc-font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ghc-cream);
}

.day-of-week {
    font-size: 0.95rem;
    color: var(--ghc-mist);
    margin-top: var(--ghc-spacing-xs);
}

.month-info {
    text-align: left;
    font-size: 0.95rem;
    color: var(--ghc-pearl);
}

.month-info strong {
    color: var(--ghc-gold);
}

.info-text {
    color: var(--ghc-mist);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: var(--ghc-spacing-sm);
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 140px;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ghc-success);
    color: white;
    padding: var(--ghc-spacing-sm) var(--ghc-spacing-md);
    border-radius: var(--ghc-radius-md);
    box-shadow: var(--ghc-shadow-lg);
    z-index: 1000;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ========================================
   FEATURES SECTION
   ======================================== */

.features-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--ghc-spacing-md);
    margin-bottom: var(--ghc-spacing-xl);
}

@media (max-width: 768px) {
    .features-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .features-section {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    text-align: center;
    padding: var(--ghc-spacing-md);
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.4), rgba(15, 29, 50, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--ghc-radius-md);
    transition: var(--ghc-transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 169, 65, 0.3);
}

.feature-icon {
    font-size: 2rem;
    color: var(--ghc-gold);
    margin-bottom: var(--ghc-spacing-xs);
}

.feature-card h3 {
    font-size: 1rem;
    color: var(--ghc-cream);
    margin-bottom: var(--ghc-spacing-xs);
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--ghc-mist);
    margin: 0;
}

/* ========================================
   EDUCATIONAL CONTENT
   ======================================== */

.educational-content {
    padding: var(--ghc-spacing-xl);
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.4), rgba(15, 29, 50, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--ghc-radius-lg);
    margin-bottom: var(--ghc-spacing-xl);
}

.educational-content h2 {
    font-family: var(--ghc-font-display);
    color: var(--ghc-cream);
    font-size: 1.6rem;
    margin-bottom: var(--ghc-spacing-md);
    margin-top: var(--ghc-spacing-lg);
}

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

.educational-content h3 {
    color: var(--ghc-gold);
    font-size: 1.2rem;
    margin-top: var(--ghc-spacing-md);
    margin-bottom: var(--ghc-spacing-sm);
}

.educational-content p {
    margin-bottom: var(--ghc-spacing-sm);
    color: var(--ghc-pearl);
    line-height: 1.8;
}

.educational-content ul {
    margin-left: var(--ghc-spacing-md);
    margin-bottom: var(--ghc-spacing-sm);
    color: var(--ghc-pearl);
}

.educational-content li {
    margin-bottom: var(--ghc-spacing-xs);
}

.educational-content a {
    color: var(--ghc-gold);
    text-decoration: underline;
    text-decoration-color: rgba(212, 169, 65, 0.4);
}

.educational-content a:hover {
    color: var(--ghc-gold-light);
    text-decoration-color: var(--ghc-gold);
}

/* ========================================
   FAQ SECTION
   ======================================== */

.faq-section {
    margin-bottom: var(--ghc-spacing-xl);
}

.faq-section h2 {
    font-family: var(--ghc-font-display);
    color: var(--ghc-cream);
    font-size: 1.6rem;
    margin-bottom: var(--ghc-spacing-lg);
    text-align: center;
}

.faq-item {
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.4), rgba(15, 29, 50, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--ghc-radius-md);
    padding: var(--ghc-spacing-md);
    margin-bottom: var(--ghc-spacing-sm);
}

.faq-question {
    font-size: 1rem;
    color: var(--ghc-gold);
    margin-bottom: var(--ghc-spacing-xs);
    font-weight: 600;
}

.faq-answer {
    font-size: 0.95rem;
    color: var(--ghc-pearl);
    line-height: 1.6;
}

/* ========================================
   RELATED TOOLS SECTION
   ======================================== */

.related-tools-section {
    margin-bottom: var(--ghc-spacing-xl);
}

.related-tools-section h2 {
    font-family: var(--ghc-font-display);
    color: var(--ghc-cream);
    font-size: 1.6rem;
    margin-bottom: var(--ghc-spacing-lg);
    text-align: center;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ghc-spacing-md);
}

@media (max-width: 768px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

.related-tool-card {
    display: block;
    padding: var(--ghc-spacing-md);
    background: linear-gradient(145deg, rgba(30, 48, 80, 0.4), rgba(15, 29, 50, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--ghc-radius-md);
    text-decoration: none;
    transition: var(--ghc-transition);
}

.related-tool-card:hover {
    border-color: rgba(212, 169, 65, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--ghc-shadow-md);
}

.related-tool-card h3 {
    font-size: 1rem;
    color: var(--ghc-gold);
    margin-bottom: var(--ghc-spacing-xs);
}

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

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    .date-large {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gregorian-hijri-converter-page {
        padding: var(--ghc-spacing-sm);
    }
    .hero-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   PRINT & ACCESSIBILITY
   ======================================== */

@media print {
    body { background: white; color: black; }
    .btn, .quick-actions { display: none !important; }
}

button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--ghc-gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

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