/**
 * İSLAM PORTALI — KURUMSAL & PREMİUM TASARIM SİSTEMİ
 * Saf CSS3, Custom Properties, Dark Mode, Tipografi & Mikro Animasyonlar
 */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Scheherazade+New:wght@400;700&display=swap');

:root {
    /* Renk Paleti - Zümrüt Yeşili & Altın Yaldız */
    --color-primary-900: #071e17;
    --color-primary-800: #0a2e23;
    --color-primary-700: #0e3f30;
    --color-primary-600: #145944;
    --color-primary-500: #1b7358;
    --color-primary-400: #2a9473;
    --color-primary-100: #e2f2ec;
    --color-primary-50:  #f0f8f5;

    /* Altın & Bronz Vurgular */
    --color-gold-700: #8a6818;
    --color-gold-600: #af8521;
    --color-gold-500: #c99c2d;
    --color-gold-400: #e5b84c;
    --color-gold-300: #f4d47d;
    --color-gold-100: #fbf5e6;

    /* Nötr & Arka Plan Tonları (Aydınlık Mod) */
    --bg-main: #f9f8f4;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-secondary: #f2efe9;
    --bg-elevated: #ffffff;
    --border-color: #e6e2d8;
    --border-color-light: #f0ece3;
    
    /* Metin Renkleri */
    --text-primary: #192520;
    --text-secondary: #4a5c54;
    --text-muted: #7c8f87;
    --text-inverse: #ffffff;

    /* Durum Renkleri */
    --color-success: #198754;
    --color-info: #0dcaf0;
    --color-warning: #ffc107;
    --color-danger: #dc3545;

    /* Font Aileleri */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-arabic: 'Amiri', 'Scheherazade New', serif;

    /* Gölgeler & Derinlik */
    --shadow-sm: 0 2px 4px rgba(7, 30, 23, 0.04);
    --shadow-md: 0 4px 12px rgba(7, 30, 23, 0.08);
    --shadow-lg: 0 10px 25px rgba(7, 30, 23, 0.12);
    --shadow-xl: 0 20px 40px rgba(7, 30, 23, 0.16);
    --shadow-gold: 0 4px 20px rgba(201, 156, 45, 0.25);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --radius-full: 9999px;

    /* Geçişler */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Karanlık Mod (Dark Mode) */
[data-theme="dark"] {
    --bg-main: #06110e;
    --bg-card: #0c1c17;
    --bg-card-hover: #122820;
    --bg-secondary: #0e221b;
    --bg-elevated: #153127;
    --border-color: #1f4236;
    --border-color-light: #18352b;

    --text-primary: #f2f7f5;
    --text-secondary: #b5ccc6;
    --text-muted: #819e97;

    /* Birincil Renkleri Koyu Temada Aydınlık & Okunabilir Kıl */
    --color-primary-900: #ecf8f3;
    --color-primary-800: #d7ede4;
    --color-primary-700: #6ee7b7;
    --color-primary-600: #34d399;
    --color-primary-500: #2dd4bf;
    --color-primary-400: #a7f3d0;
    --color-primary-100: rgba(20, 89, 68, 0.4);
    --color-primary-50:  rgba(20, 89, 68, 0.22);

    /* Altın Vurguları Koyu Temada Sıcak & Işıltılı Kıl */
    --color-gold-700: #e5b84c;
    --color-gold-600: #f4d47d;
    --color-gold-500: #fde68a;
    --color-gold-400: #fef08a;
    --color-gold-300: #fffbeb;
    --color-gold-100: rgba(201, 156, 45, 0.18);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.8);
}

/* Reset & Genel */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 15% 10%, rgba(20, 89, 68, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 60%, rgba(201, 156, 45, 0.04) 0%, transparent 35%);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img, svg {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Konteyner */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Tipografi */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
}

.arabic-text {
    font-family: var(--font-arabic);
    font-size: 1.85rem;
    line-height: 2.2;
    direction: rtl;
    text-align: right;
    font-weight: 400;
    color: var(--color-primary-800);
}

[data-theme="dark"] .arabic-text {
    color: var(--color-gold-300);
}

/* ==========================================================================
   ÜST BİLGİ & DUYURU BARI (TopBar)
   ========================================================================== */
.top-bar {
    background: var(--color-primary-900);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.825rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(201, 156, 45, 0.25);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.top-bar-item .gold-icon {
    color: var(--color-gold-400);
}

.hijri-badge {
    background: rgba(201, 156, 45, 0.15);
    border: 1px solid rgba(201, 156, 45, 0.3);
    color: var(--color-gold-300);
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.78rem;
}

/* ==========================================================================
   ANA BAŞLIK (Header & Navigation)
   ========================================================================== */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="dark"] .site-header {
    background: rgba(11, 26, 21, 0.95);
    border-bottom-color: var(--border-color);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-symbol {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-900));
    border: 1.5px solid var(--color-gold-500);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold-400);
    box-shadow: 0 4px 12px rgba(20, 89, 68, 0.2);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: var(--transition);
}

.brand-logo:hover .logo-symbol {
    transform: scale(1.04);
    box-shadow: 0 6px 16px rgba(201, 156, 45, 0.35);
}

.logo-symbol::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(201, 156, 45, 0.25) 0%, transparent 70%);
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-primary-800);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

[data-theme="dark"] .brand-title {
    color: #ffffff;
}

.brand-title span {
    color: var(--color-gold-600);
}

[data-theme="dark"] .brand-title span {
    color: var(--color-gold-400);
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: block;
    line-height: 1;
    margin-top: 3px;
}

/* Menü Bağlantıları */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    position: relative;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
    color: var(--color-primary-800);
    background-color: var(--color-primary-50);
    border-color: rgba(20, 89, 68, 0.12);
}

[data-theme="dark"] .nav-link:hover {
    color: var(--color-gold-300);
    background-color: var(--bg-card-hover);
    border-color: rgba(201, 156, 45, 0.2);
}

.nav-link.active {
    color: var(--color-primary-800);
    background-color: rgba(20, 89, 68, 0.09);
    border-color: rgba(20, 89, 68, 0.2);
    font-weight: 700;
}

[data-theme="dark"] .nav-link.active {
    color: var(--color-gold-400);
    background-color: rgba(201, 156, 45, 0.12);
    border-color: rgba(201, 156, 45, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--color-primary-700);
    border-color: var(--color-primary-400);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .btn-icon:hover {
    color: var(--color-gold-300);
    border-color: var(--color-gold-500);
}

.mobile-toggle {
    display: none;
}

/* ==========================================================================
   BUTONLAR & ETİKETLER
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800));
    color: #ffffff;
    border-color: var(--color-primary-800);
    box-shadow: 0 4px 12px rgba(10, 46, 35, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(10, 46, 35, 0.35);
}

.btn-gold {
    background: linear-gradient(135deg, var(--color-gold-500), var(--color-gold-600));
    color: #ffffff;
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--color-gold-400), var(--color-gold-500));
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--color-primary-500);
}

/* ==========================================================================
   KARTLAR & BİLEŞENLER (Cards & Panels)
   ========================================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(20, 89, 68, 0.25);
}

[data-theme="dark"] .card:hover {
    border-color: rgba(201, 156, 45, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-color-light);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-primary-800);
}

[data-theme="dark"] .card-title {
    color: var(--color-gold-400);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-gold {
    background: var(--color-gold-100);
    color: var(--color-gold-700);
    border: 1px solid rgba(201, 156, 45, 0.25);
}

[data-theme="dark"] .badge-gold {
    background: rgba(201, 156, 45, 0.15);
    color: var(--color-gold-300);
}

.badge-green {
    background: var(--color-primary-50);
    color: var(--color-primary-700);
}

[data-theme="dark"] .badge-green {
    background: rgba(20, 89, 68, 0.25);
    color: var(--color-primary-400);
}

/* ==========================================================================
   CANLI NAMAZ VAKİTLERİ BARI / WIDGETI
   ========================================================================== */
.prayer-hero-card {
    background: linear-gradient(135deg, var(--color-primary-900) 0%, var(--color-primary-800) 60%, var(--color-primary-700) 100%);
    border: 1px solid rgba(201, 156, 45, 0.35);
    border-radius: var(--radius-xl);
    color: #ffffff;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.prayer-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 156, 45, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.prayer-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.location-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
}

.location-selector select {
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.location-selector select option {
    background-color: var(--color-primary-900);
    color: #ffffff;
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.85rem;
    position: relative;
    z-index: 1;
}

.prayer-box {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-lg);
    padding: 1.15rem 0.75rem;
    text-align: center;
    transition: var(--transition);
}

.prayer-box:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.prayer-box.active-next {
    background: linear-gradient(180deg, rgba(201, 156, 45, 0.35) 0%, rgba(201, 156, 45, 0.15) 100%);
    border-color: var(--color-gold-400);
    box-shadow: 0 0 20px rgba(201, 156, 45, 0.3);
    position: relative;
}

.prayer-box.active-next::after {
    content: 'SIRADAKİ';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-gold-500);
    color: #071e17;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.prayer-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.35rem;
}

.prayer-time {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.prayer-box.active-next .prayer-time {
    color: var(--color-gold-300);
}

/* Geri Sayım Kartı */
.countdown-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(201, 156, 45, 0.3);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
}

.countdown-digits {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: var(--color-gold-400);
    font-size: 1.1rem;
}

/* ==========================================================================
   GÜNÜN AYETİ, HADİSİ VE DUASI (Vitrin)
   ========================================================================== */
.daily-wisdom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.daily-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.daily-card .verse-arabic {
    font-size: 1.45rem;
    line-height: 2.1;
    margin-bottom: 1rem;
    color: var(--color-primary-800);
}

[data-theme="dark"] .daily-card .verse-arabic {
    color: var(--color-gold-300);
}

.daily-card .verse-translation {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.daily-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color-light);
    font-size: 0.825rem;
    color: var(--text-muted);
}

/* ==========================================================================
   MODÜL VE İLİM DALLARI GRİDİ (Portal Hub)
   ========================================================================== */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    display: flex;
    gap: 1.15rem;
    align-items: flex-start;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-500);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary-600);
    opacity: 0;
    transition: var(--transition);
}

.module-card:hover::before {
    opacity: 1;
}

.module-icon-wrap {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-primary-50), var(--color-primary-100));
    border: 1px solid var(--color-primary-400);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-700);
    font-size: 1.4rem;
    transition: var(--transition);
}

[data-theme="dark"] .module-icon-wrap {
    background: rgba(20, 89, 68, 0.25);
    border-color: var(--color-primary-600);
    color: var(--color-gold-400);
}

.module-card:hover .module-icon-wrap {
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800));
    color: #ffffff;
    transform: scale(1.05);
}

.module-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.module-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   ALT BİLGİ (Footer)
   ========================================================================== */
.site-footer {
    background: var(--color-primary-900);
    color: rgba(255, 255, 255, 0.8);
    padding: 3.5rem 0 1.5rem;
    margin-top: auto;
    border-top: 2px solid var(--color-gold-600);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-title {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.15rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--color-gold-400);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.55rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-links a:hover {
    color: var(--color-gold-300);
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   RESPONSIVE UYUMLULUK
   ========================================================================== */
@media (max-width: 992px) {
    .daily-wisdom-grid {
        grid-template-columns: 1fr;
    }

    .prayer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

/* ==========================================================================
   ISLAM ATLAS — MEGA DROPDOWN & 17 KANONİK NAVİGASYON
   ========================================================================== */
.atlas-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.atlas-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 650px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--color-gold-500);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.22), 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 1.4rem;
    z-index: 1050;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}

/* Hover Köprüsü: Menü başlığı ile açılır menü arasındaki boşlukta farenin teması kaybetmesini kesinlikle engeller */
.atlas-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
    z-index: 10;
}

/* Tek Sütunlu Kompakt Dropdown Menü (Kur'an) */
.atlas-dropdown-menu.dropdown-sm {
    width: 320px;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 1.1rem;
}

/* Sağa Yaslı Dropdown Menü (Araçlar) */
.atlas-dropdown-menu.dropdown-right {
    width: 620px;
    left: auto;
    right: 0;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.atlas-dropdown-col h5 {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-gold-600);
    letter-spacing: 0.06em;
    margin-bottom: 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

[data-theme="dark"] .atlas-dropdown-col h5 {
    color: var(--color-gold-400);
}

.atlas-dropdown-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.atlas-dropdown-col a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.18s ease;
}

.atlas-dropdown-col a small {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .atlas-dropdown-col a small {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.atlas-dropdown-col a:hover {
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    transform: translateX(3px);
}

[data-theme="dark"] .atlas-dropdown-col a:hover {
    background: var(--bg-card-hover);
    color: var(--color-gold-300);
}

/* ==========================================================================
   DESKTOP HOVER DAVRANIŞI (Sadece 769px ve üzeri)
   ========================================================================== */
@media (min-width: 769px) {
    .atlas-dropdown-wrap:hover .atlas-dropdown-menu,
    .atlas-dropdown-wrap.is-open .atlas-dropdown-menu {
        display: grid;
        animation: fadeInDropdown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* ==========================================================================
   RESPONSIVE UYUMLULUK & MOBİL GÖRÜNÜM (768px ve altı)
   ========================================================================== */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 0.85rem 1rem 1.75rem;
        border-bottom: 2px solid var(--color-gold-500);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
        max-height: calc(100vh - 75px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.35rem;
        z-index: 1050;
    }

    .main-nav.active {
        display: flex;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    /* Mobil Menüde Dropdown Akordiyon Uyumluluğu */
    .atlas-dropdown-wrap {
        width: 100%;
        display: block;
    }

    .atlas-dropdown-wrap > .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-md);
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
    }

    .atlas-dropdown-wrap > .nav-link svg {
        transition: transform 0.22s ease;
    }

    .atlas-dropdown-wrap.open > .nav-link svg {
        transform: rotate(180deg);
    }

    .atlas-dropdown-menu,
    .atlas-dropdown-menu.dropdown-sm,
    .atlas-dropdown-menu.dropdown-right {
        position: static !important;
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        grid-template-columns: 1fr !important;
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
        border-top: 1px solid var(--border-color) !important;
        margin-top: 0.4rem !important;
        padding: 0.75rem !important;
        gap: 0.85rem !important;
        display: none !important;
        animation: none !important;
    }

    .atlas-dropdown-wrap.open > .atlas-dropdown-menu {
        display: grid !important;
    }

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

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

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    /* Ses Çaları Mobil Uyumu */
    .sticky-player-inner {
        flex-direction: column !important;
        gap: 0.65rem !important;
        align-items: stretch !important;
    }
    .player-verse-info {
        min-width: unset !important;
        justify-content: space-between;
    }
    .player-controls-center {
        max-width: 100% !important;
        width: 100%;
    }
    .player-options-right {
        min-width: unset !important;
        justify-content: center !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        padding: 1.25rem 1rem !important;
    }

    .brand-title {
        font-size: 1.15rem;
    }

    .brand-subtitle {
        display: none;
    }

    .arabic-text {
        font-size: 1.6rem;
        line-height: 2;
    }

    .verse-arabic {
        font-size: 1.7rem !important;
        line-height: 2.1 !important;
    }

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

/* ==========================================================================
   KOYU TEMA (DARK MODE) — KAPSAMLI KONTRAST & OKUNABİLİRLİK GÜVENCESİ
   ========================================================================== */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .arabic-text,
[data-theme="dark"] .verse-arabic,
[data-theme="dark"] [style*="font-family: var(--font-arabic)"],
[data-theme="dark"] [class*="arabic"] {
    color: var(--color-gold-300) !important;
    text-shadow: 0 0 1px rgba(254, 240, 138, 0.25);
}

[data-theme="dark"] .card-title {
    color: var(--color-gold-400);
}

/* Şablonlarda inline kalmış var(--color-primary-800) ve var(--color-primary-700) renklerini kurtar */
[data-theme="dark"] [style*="color: var(--color-primary-800)"],
[data-theme="dark"] [style*="color:var(--color-primary-800)"],
[data-theme="dark"] [style*="color: #0a2e23"],
[data-theme="dark"] [style*="color:#0a2e23"] {
    color: var(--text-primary) !important;
}

[data-theme="dark"] [style*="color: var(--color-primary-700)"],
[data-theme="dark"] [style*="color:var(--color-primary-700)"],
[data-theme="dark"] [style*="color: #0e3f30"],
[data-theme="dark"] [style*="color:#0e3f30"] {
    color: var(--color-gold-400) !important;
}

[data-theme="dark"] [style*="color: var(--color-primary-900)"],
[data-theme="dark"] [style*="color:var(--color-primary-900)"] {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .badge-primary {
    background: rgba(20, 89, 68, 0.45);
    color: var(--color-primary-400);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

[data-theme="dark"] .badge-gold {
    background: rgba(201, 156, 45, 0.16);
    color: var(--color-gold-400);
    border-color: rgba(201, 156, 45, 0.35);
}

[data-theme="dark"] .btn-outline {
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-outline:hover {
    border-color: var(--color-gold-500);
    color: var(--color-gold-300);
    background: var(--bg-card-hover);
}

[data-theme="dark"] .rich-entry-content {
    color: var(--text-primary);
}

[data-theme="dark"] .rich-entry-content h4,
[data-theme="dark"] .rich-entry-content h3 {
    color: var(--color-gold-400);
}

/* ==========================================================================
   ANASAYFA ARAMA WİDGETİ (HOMEPAGE HERO & SEARCH WIDGET RESPONSIVE)
   ========================================================================== */
.home-hero-card {
    padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1rem, 4vw, 2.25rem) !important;
    border-radius: var(--radius-xl);
    margin-bottom: 2.5rem;
    text-align: center;
    background: radial-gradient(circle at 50% 20%, rgba(201, 156, 45, 0.12) 0%, rgba(10, 46, 35, 0.04) 50%, var(--bg-card) 100%);
    border: 1.5px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.home-hero-title {
    font-size: clamp(1.85rem, 6vw, 2.8rem);
    font-weight: 800;
    color: var(--color-primary-800);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.home-hero-subtitle {
    color: var(--text-muted);
    font-size: clamp(0.92rem, 2.5vw, 1.15rem);
    max-width: 780px;
    margin: 0 auto 1.75rem;
    line-height: 1.6;
}

.home-search-form {
    max-width: 680px;
    margin: 0 auto 1.25rem;
    width: 100%;
}

.home-search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 0.35rem 0.35rem 0.35rem 1rem;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-gold-500);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    transition: all 0.25s ease;
    gap: 0.5rem;
}

.home-search-box:focus-within {
    box-shadow: 0 0 0 4px rgba(201, 156, 45, 0.25), 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--color-gold-600);
}

.home-search-icon {
    flex-shrink: 0;
    color: var(--color-gold-500);
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-search-input {
    flex: 1 1 0%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.7rem 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.home-search-btn {
    flex-shrink: 0;
    padding: 0.75rem 1.65rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(201, 156, 45, 0.3);
    transition: all 0.2s ease;
}

.home-search-btn:active {
    transform: scale(0.97);
}

.home-search-btn .btn-text-short {
    display: none;
}
.home-search-btn .btn-text-full {
    display: inline;
}

@media (max-width: 640px) {
    .home-search-box {
        padding: 0.25rem 0.25rem 0.25rem 0.75rem;
        gap: 0.25rem;
    }
    .home-search-input {
        padding: 0.6rem 0.35rem;
        font-size: 0.92rem;
    }
    .home-search-btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.88rem;
    }
    .home-search-btn .btn-text-full {
        display: none;
    }
    .home-search-btn .btn-text-short {
        display: inline;
    }
}

@media (max-width: 380px) {
    .home-search-box {
        padding: 0.2rem 0.2rem 0.2rem 0.6rem;
    }
    .home-search-input {
        padding: 0.5rem 0.25rem;
        font-size: 0.88rem;
    }
    .home-search-btn {
        padding: 0.55rem 0.85rem;
        font-size: 0.82rem;
    }
}


