/* Time.krd - Kurdistan Time - Colors from Flag: Red #EE1C25, White, Green #007A3D, Gold #FFD700 */
:root {
    --kurd-red: #c41e3a;
    --kurd-white: #ffffff;
    --kurd-green: #007a3d;
    --kurd-gold: #c9a227;
    --kurd-gold-dark: #b0861c;
    --bg-dark: #f6f7fb;
    --bg-card: rgba(255,255,255,0.7);
    --bg-card-hover: rgba(255,255,255,0.85);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-subtle: rgba(15,23,42,0.12);
    --shadow-card: 0 14px 40px rgba(15,23,42,0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Arabic', 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
    background: radial-gradient(circle at top, #ffffff 0%, #f1f5f9 55%, #e8eef7 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    direction: rtl;
}

/* Header - مدرن و جذاب */
.header {
    position: relative;
    padding: 1.5rem 2rem 1.75rem;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f6f7fb 45%, #edf2f8 100%);
}

.header-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(196,30,58,0.12) 0%, transparent 35%, transparent 70%, rgba(0,122,61,0.12) 100%);
    pointer-events: none;
}

.header-bg::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kurd-red), var(--kurd-gold), var(--kurd-green));
}

.header-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.flag-wrap {
    width: 56px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
}

.flag-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text h1 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}


.tagline {
    display: block;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.header-regions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.region-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.region-pill.bakur { background: rgba(74,144,217,0.2); color: #2563eb; }
.region-pill.rojhilat { background: rgba(196,30,58,0.2); color: #b91c1c; }
.region-pill.basur { background: rgba(0,122,61,0.18); color: #047857; }
.region-pill.rojava { background: rgba(244,196,48,0.25); color: #b45309; }

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #8b6b12;
    text-align: center;
}

/* City Cards */
.cards-section {
    margin-bottom: 4rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.city-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.75rem;
    border: 1px solid var(--border-subtle);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
    text-align: center;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
}

.city-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
}

.city-card[data-city="mahabad"]::before { background: var(--kurd-red); }
.city-card[data-city="hewler"]::before { background: var(--kurd-gold); }
.city-card[data-city="kobani"]::before { background: var(--kurd-green); }
.city-card[data-city="amed"]::before { background: #4a90d9; }

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 46px rgba(15,23,42,0.16);
    border-color: rgba(244,196,48,0.3);
}

.card-region {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.card-time-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.weather-icon {
    font-size: 2rem;
    line-height: 1;
}

.card-time-wrap .card-time {
    margin-bottom: 0;
}

.region-rojhilat { background: rgba(196,30,58,0.2); color: #b91c1c; }
.region-basur { background: rgba(0,122,61,0.2); color: #047857; }
.region-rojava { background: rgba(244,196,48,0.25); color: #b45309; }
.region-bakur { background: rgba(74,144,217,0.2); color: #1d4ed8; }

.card-city {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-time {
    font-size: 1.9rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    color: #8b6b12;
    letter-spacing: 0.05em;
}

.card-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.weather-temp {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.weather-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Map Section */
.map-section {
    margin-bottom: 4rem;
}

.map-legend-item {
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}
.map-legend-item:hover { background: rgba(255,255,255,0.08); }


.map-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(18px);
}

#map {
    height: 450px;
    width: 100%;
    background: #f8fafc;
}

.map-legend {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.85);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.map-legend span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.bakur { background: #4a90d9; }
.dot.rojhilat { background: var(--kurd-red); }
.dot.basur { background: var(--kurd-green); }
.dot.rojava { background: var(--kurd-gold); }

/* Leaflet custom */
.leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
}

.leaflet-popup-tip { background: var(--bg-card); }

.leaflet-container {
    font-family: 'Noto Sans Arabic', sans-serif;
}

/* خاک کوردستان - چندضلعی زرد/طلایی */
#map .kurdistan-polygon path {
    fill: #FFD700 !important;
    fill-opacity: 0.55 !important;
    stroke: #B8860B !important;
    stroke-width: 2.5px !important;
}

/* Globe Section */
.globe-section {
    margin-bottom: 4rem;
}

.globe-container {
    position: relative;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    touch-action: none;
    backdrop-filter: blur(18px);
}

#globe-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.globe-hint {
    position: absolute;
    bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Calendar Section */
.calendar-section {
    margin-bottom: 4rem;
}

.today-btn {
    display: block;
    margin: 0 auto 1rem;
    padding: 0.4rem 1rem;
    background: transparent;
    border: 1px solid var(--kurd-gold);
    color: var(--kurd-gold);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.today-btn:hover { background: rgba(244,196,48,0.2); }
.calendar-kurdish-date { font-size: 0.9rem; color: var(--text-secondary); text-align: center; margin-bottom: 1rem; }

.calendar-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-subtle);
    max-width: 500px;
    margin: 0 auto;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.calendar-header button {
    background: var(--kurd-gold);
    color: var(--bg-dark);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.calendar-header button:hover {
    background: var(--kurd-gold-dark);
    transform: scale(1.05);
}

#calendar-month-year {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-days .day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: default;
}

.calendar-days .day.other-month {
    color: var(--text-secondary);
    opacity: 0.5;
}

.calendar-days .day.today {
    background: var(--kurd-gold);
    color: var(--bg-dark);
    font-weight: 700;
}

/* Book Section */
.book-section { margin-bottom: 4rem; text-align: center; }
.book-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: -0.75rem 0 1.25rem;
}
.book-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-subtle);
    max-width: 600px;
    margin: 0 auto;
    text-align: right;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card);
}
.book-icon { font-size: 3rem; }
.book-content h3 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.book-content p { color: var(--text-secondary); font-size: 0.95rem; }
.book-desc { margin-top: 0.5rem; font-size: 0.9rem !important; }

/* Quote Section */
.quote-section { margin-bottom: 4rem; }
.quote-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(248,250,252,0.9) 100%);
    border-radius: var(--radius);
    padding: 2rem 2rem 2.5rem;
    border: 1px solid var(--border-subtle);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card);
}
.quote-mark {
    font-size: 3rem;
    color: var(--kurd-gold);
    opacity: 0.6;
    line-height: 1;
}
#quote-text { font-size: 1.1rem; line-height: 1.8; margin: 0.75rem 0; color: var(--text-primary); }
#quote-author { font-size: 0.9rem; color: var(--kurd-gold); font-style: normal; }

/* Footer */
.footer {
    background: var(--bg-card);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    backdrop-filter: blur(18px);
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--kurd-gold);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links span { margin: 0 0.5rem; opacity: 0.5; }
.footer-contact { margin-top: 1rem; font-size: 0.9rem !important; }
.footer-contact a { color: var(--kurd-gold); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .header { padding: 1rem 1.25rem; }
    .header-content { flex-direction: column; align-items: flex-start; }
    .header-regions { width: 100%; }
    .main-content { padding: 1.5rem 1rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .card-time { font-size: 1.6rem; }
    .weather-icon { font-size: 1.75rem; }
    #map { height: 350px; }
    .globe-container { height: 320px; }
    .book-card { flex-direction: column; text-align: center; }
}
