/* =============================================
   SehriTime - Emerald Theme
   Matching sehriiftartime.com style
   ============================================= */

@font-face {
    font-family: 'PFont';
    src: url('../fonts/p.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.container {
    font-family: 'PFont', sans-serif;
}

:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;

    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --orange-500: #f97316;

    --primary: var(--emerald-600);
    --primary-hover: var(--emerald-700);
    --primary-light: var(--emerald-500);
    --primary-dark: var(--emerald-800);

    --bg: #ffffff;
    --bg-muted: #f9fafb;
    --bg-card: #ffffff;

    --foreground: #111827;
    --muted-fg: #6b7280;
    --border: #e5e7eb;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);

    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;

    --transition: all 0.3s ease;
}

/* ---- Reset & Base ---- */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--foreground);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

main { flex: 1; }

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

/* ---- Header / Navbar ---- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .navbar {
    background: transparent !important;
    padding: 0.75rem 0;
}

.site-header .navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--foreground) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-header .navbar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--emerald-600);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

.brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.site-header .nav-link {
    color: var(--muted-fg) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.site-header .nav-link:hover {
    color: var(--foreground) !important;
    background: var(--bg-muted);
}

.site-header .nav-link.active {
    color: var(--primary) !important;
    font-weight: 600;
}

/* ---- Hero Section (Home) ---- */
.hero-section {
    position: relative;
    padding: 4rem 0 3rem;
    text-align: center;
    overflow: hidden;
    background: var(--bg);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-pattern .shape {
    position: absolute;
    border-radius: 50%;
    background: var(--emerald-500);
    opacity: 0.04;
    filter: blur(40px);
}

.hero-pattern .shape-1 { width: 500px; height: 500px; top: -100px; left: -100px; }
.hero-pattern .shape-2 { width: 400px; height: 400px; bottom: -80px; right: -80px; opacity: 0.03; }
.hero-pattern .shape-3 { width: 200px; height: 200px; top: 50%; left: 60%; opacity: 0.05; }

.hero-section .hero-content {
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

/* Greeting Badge */
.greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--emerald-50);
    border: 1px solid var(--emerald-200);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--emerald-700);
    margin-bottom: 1.25rem;
}

.greeting-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--emerald-500);
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-section h1 {
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.15;
    margin-bottom: 2rem;
    color: var(--foreground);
}

@media (min-width: 768px) {
    .hero-section h1 { font-size: 3.3rem; }
}

.hero-section .hero-subtitle {
    font-size: 1.05rem;
    color: var(--muted-fg);
    max-width: 560px;
    margin: 0px auto 3.5rem;
    line-height: 1.6;
}

/* ---- Search Box ---- */
.search-wrapper {
    position: relative;
    max-width: 520px;
    margin: 0 auto 1rem;
}

.search-wrapper .form-control {
    height: 56px;
    padding: 0 20px 0 52px;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid var(--emerald-600);
    background: var(--bg);
    color: var(--foreground);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
    transition: var(--transition);
    font-family: 'Inter', system-ui, sans-serif;
}

.search-wrapper .form-control:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.2);
    outline: none;
}

.search-wrapper .form-control::placeholder {
    color: #9ca3af;
}

.search-wrapper .btn-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 0;
    background: none;
    border: none;
    color: var(--emerald-600);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.search-wrapper .btn-search:hover {
    color: var(--emerald-700);
}

/* Autocomplete */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 1050;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.autocomplete-results.show { display: block; }

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    color: var(--foreground);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--emerald-50); }

.autocomplete-item .item-icon { color: var(--emerald-600); width: 20px; text-align: center; }
.autocomplete-item .item-type { font-size: 0.7rem; color: var(--muted-fg); margin-left: auto; text-transform: uppercase; letter-spacing: 0.5px; }

/* Divider */
.or-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 1.75rem auto;
    max-width: 520px;
    color: var(--muted-fg);
    font-size: 0.85rem;
}

.or-divider::before, .or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---- Use My Location Card ---- */
.locate-card {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--foreground);
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
}

.locate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.locate-card-icon {
    width: 56px;
    height: 56px;
    background: var(--emerald-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--emerald-600);
    margin-bottom: 4px;
}

.locate-card-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.locate-card-text strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--foreground);
}

.locate-card-text span {
    font-size: 0.85rem;
    color: var(--muted-fg);
}

.locate-card-btn {
    width: 100%;
    max-width: 280px;
    height: 44px;
    background: var(--emerald-600);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    transition: var(--transition);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 4px;
}

.locate-card:hover .locate-card-btn {
    background: var(--emerald-700);
}

/* ---- Prayer Preview Section ---- */
.prayer-preview-section {
    background: linear-gradient(to bottom, var(--bg-muted), var(--bg));
    padding: 3rem 0;
}

.preview-cards {
    margin: 0 auto 1.5rem;
}

/* ---- Section Headings ---- */
.section-heading {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--foreground);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subheading {
    font-size: 1rem;
    color: var(--muted-fg);
    text-align: center;
    margin-bottom: 2rem;
}

/* ---- Countdown Timer Banner (mint green gradient with bordered boxes) ---- */
.countdown-banner {
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5, #dcfce7);
    border: 1px solid var(--emerald-200);
    border-radius: var(--radius-xl);
    padding: 2.5rem 1.5rem 2.75rem;
    text-align: center;
}

.countdown-label {
    font-size: 1.15rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fe720f;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}

.countdown-label .countdown-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ea580c;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.6);
    flex-shrink: 0;
}

.countdown-label .countdown-text {
    display: inline-block;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.countdown-label .countdown-text.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.countdown-label .countdown-text.fade-in {
    opacity: 0;
    transform: translateY(10px);
}

@keyframes pulse-dot {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.6);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 8px rgba(234, 88, 12, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0);
    }
}

.countdown-boxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.countdown-box {
    background: #fff;
    border: 2px solid var(--emerald-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    min-width: 120px;
    text-align: center;
}

.countdown-box.seconds-box {
    background: rgba(16,185,129,0.08);
    border-color: var(--emerald-400);
}

.countdown-box .cb-value {
    font-size: 3.75rem;
    font-weight: 800;
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
}

.countdown-box.seconds-box .cb-value {
    color: var(--emerald-600);
}

.countdown-box .cb-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted-fg);
    margin-top: 4px;
}

.countdown-box.seconds-box .cb-label {
    color: var(--emerald-600);
}

.countdown-separator {
    font-size: 2rem;
    font-weight: 800;
    color: var(--muted-fg);
    line-height: 1;
    padding-bottom: 1.25rem;
}

@media (max-width: 575.98px) {
    .countdown-box { min-width: 80px; padding: 0.75rem 0.5rem; }
    .countdown-box .cb-value { font-size: 1.75rem; }
    .countdown-separator { font-size: 1.25rem; }
    .countdown-boxes { gap: 0.4rem; }
}

/* ---- Today Date Line ---- */
.today-date-line {
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted-fg);
    margin-bottom: 1.5rem;
    font-weight: 500;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.today-date-line strong {
    color: var(--foreground);
    font-weight: 700;
}

/* ---- Daily Prayer Times Container ---- */
.prayer-times-container {
    margin: 0 auto 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.prayer-times-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.prayer-times-header h3 {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--foreground);
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.prayer-times-header p {
    font-size: 0.88rem;
    color: var(--muted-fg);
    margin: 0;
}

.prayer-cards-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

@media (max-width: 767.98px) {
    .prayer-cards-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 479.98px) {
    .prayer-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.prayer-hcard {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 0.75rem;
    text-align: center;
    transition: var(--transition);
}

.prayer-hcard:hover {
    border-color: var(--emerald-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.prayer-hcard.next-prayer-active {
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    border-color: var(--emerald-500);
    color: #fff;
}

.prayer-hcard.next-prayer-active .prayer-hcard-icon { color: rgba(255,255,255,0.85); }
.prayer-hcard.next-prayer-active .prayer-hcard-name { color: rgba(255,255,255,0.9); }
.prayer-hcard.next-prayer-active .prayer-hcard-time { color: #fff; }

.prayer-hcard-icon {
    display: none;
}

.prayer-hcard-name {
    font-size: 0.85rem;
    color: var(--muted-fg);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    margin-bottom: 0.35rem;
}

.prayer-hcard-time {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
}

/* ---- Next Prayer Banner ---- */
.next-prayer-banner {
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    text-align: center;
    color: #fff;
}

.next-prayer-top-label {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.25rem;
}

.next-prayer-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.next-prayer-countdown {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    opacity: 0.9;
}

/* ---- Popular Cities Section ---- */
.popular-cities-section {
    padding: 3rem 0;
}

/* City Card */
.city-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: var(--transition);
    display: block;
    text-decoration: none;
    color: var(--foreground);
    text-align: center;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--emerald-300);
    color: var(--foreground);
}

.city-card .card-icon {
    width: 40px;
    height: 40px;
    background: var(--emerald-50);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-600);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    margin-left: auto;
    margin-right: auto;
}

.city-card .city-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.city-card .city-meta {
    font-size: 0.8rem;
    color: var(--muted-fg);
    margin-bottom: 0.75rem;
}

.city-card .view-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--emerald-600);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---- Section: Everything You Need / Services ---- */
.services-section {
    padding: 3rem 0;
    background: var(--bg-muted);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.service-card .service-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: var(--emerald-50);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--emerald-600);
}

.service-card h5 {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--muted-fg);
    margin-bottom: 1rem;
}

.service-card .btn-service,
.btn-service {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--emerald-600);
    padding: 0;
    border: none;
    background: none;
}

.service-card .btn-service:hover,
.btn-service:hover { color: var(--emerald-700); }

/* ---- Section: FAQ ---- */
.faq-section {
    padding: 3rem 0;
}

.faq-section .accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-section .accordion-button {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--foreground);
    background: var(--bg);
    padding: 1rem 1.25rem;
    font-family: 'Inter', system-ui, sans-serif;
}

.faq-section .accordion-button:not(.collapsed) {
    background: var(--emerald-50);
    color: var(--emerald-800);
    box-shadow: none;
}

.faq-section .accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.faq-section .accordion-body {
    font-size: 0.9rem;
    color: var(--muted-fg);
    line-height: 1.7;
    padding: 0 1.25rem 1.25rem;
}

/* ---- Section: Download CTA ---- */
.download-cta-section {
    padding: 3rem 0;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.download-cta-inner {
    background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(6,78,59,0.05));
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
}

.download-cta-inner h2 {
    font-weight: 800;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.download-cta-inner p {
    color: var(--muted-fg);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

/* ---- Location Page Header ---- */
.location-header {
    padding: 2.5rem 0 1.5rem;
    text-align: center;
    background: var(--bg);
    position: relative;
}

.location-header h1 {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .location-header h1 { font-size: 2.5rem; }
}

.location-header .location-subtitle {
    font-size: 1rem;
    color: var(--muted-fg);
    margin-bottom: 0.5rem;
}

/* Breadcrumbs */
.breadcrumb-wrapper {
    padding: 0.5rem 0;
}

.location-header .breadcrumb-wrapper {
    display: flex;
    justify-content: center;
}

.location-header .breadcrumb-wrapper .breadcrumb {
    justify-content: center;
}

/* Advertisement Placeholder */
.ad-placeholder {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    margin: 0 auto;
    max-width: 900px;
}

.ad-placeholder span {
    font-size: 0.8rem;
    color: #6b728000;
    letter-spacing: 0.5px;
}

.breadcrumb {
    margin-bottom: 0;
    font-size: 0.8rem;
}

.breadcrumb-item a { color: var(--muted-fg); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--primary); font-weight: 600; }

.breadcrumb-item + .breadcrumb-item::before {
    content: "\2192";
    color: var(--muted-fg);
}

/* ---- Sehri/Iftar Time Cards (horizontal layout) ---- */
.time-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0 auto 1.25rem;
}

@media (min-width: 768px) {
    .time-cards-row { gap: 1.5rem; }
}

.time-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.time-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.time-card .card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.time-card.sehri-card .card-icon-wrap {
    background: var(--emerald-50);
    color: var(--emerald-600);
}

.time-card.iftar-card .card-icon-wrap {
    background: #fff7ed;
    color: #ea580c;
}

.time-card .card-text {
    flex: 1;
    min-width: 0;
}

.time-card .card-label {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--muted-fg);
    margin-bottom: 6px;
}

.time-card .card-time {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.time-card.sehri-card .card-time { color: var(--emerald-700); }
.time-card.iftar-card .card-time { color: #ea580c; }

.time-card .card-date {
    font-size: 0.72rem;
    color: var(--muted-fg);
    margin-top: 1px;
}

/* ---- Day Toggle ---- */
.day-toggle {
    display: inline-flex;
    background: var(--bg-muted);
    border-radius: 50px;
    padding: 3px;
    border: 1px solid var(--border);
}

.day-toggle .btn {
    border-radius: 50px;
    padding: 6px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    background: transparent;
    color: var(--muted-fg);
    font-family: 'Inter', system-ui, sans-serif;
}

.day-toggle .btn.active {
    background: var(--emerald-600);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* ---- Prayer Times Table (calendar uses this) ---- */
.prayer-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.prayer-table-header {
    background: var(--emerald-600);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prayer-table-card .table {
    margin-bottom: 0;
}

.prayer-table-card .table th {
    background: var(--emerald-50);
    color: var(--emerald-800);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.6rem 1rem;
    border-bottom: 2px solid var(--emerald-200);
}

.prayer-table-card .table td {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    border-color: var(--border);
    vertical-align: middle;
}

.prayer-table-card .table tbody tr:hover {
    background: var(--emerald-50);
}

.prayer-name {
    font-weight: 600;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 8px;
}

.prayer-name .prayer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald-400);
}

.prayer-time-value {
    font-weight: 700;
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
}

/* ---- Monthly Calendar ---- */
.calendar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    background: var(--emerald-600);
    color: #fff;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.calendar-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-header h3 {
    font-size: 1rem;
    margin: 0;
    line-height: 1.2;
}

.calendar-header-location {
    font-size: 0.75rem;
    opacity: 0.85;
    font-weight: 400;
}

.calendar-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-cal-action {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cal-action:hover {
    background: rgba(255,255,255,0.35);
}

.btn-cal-download {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1.5px solid rgba(44, 5, 5, 0.35);
    border-radius: 4px;
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.btn-cal-download:hover {
    background: #fff;
    color: var(--emerald-700);
    border-color: #fff;
}

/* Month Navigation Bar */
.calendar-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
}

.calendar-month-nav .btn-month-nav {
    background: none;
    border: none;
    color: var(--emerald-600);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.calendar-month-nav .btn-month-nav:hover {
    background: var(--emerald-50);
    color: var(--emerald-700);
}

.calendar-month-current {
    font-size: 0.85rem;
    color: var(--foreground);
    letter-spacing: 0.5px;
}

.calendar-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-table {
    width: 100%;
    font-size: 0.82rem;
    min-width: 550px;
}

.calendar-table th {
    background: var(--emerald-50);
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-weight: normal;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--emerald-800);
    letter-spacing: 0.3px;
    border-bottom: 2px solid var(--emerald-200);
}

.calendar-table td {
    padding: 0.5rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
    color: var(--foreground);
}

.cal-th-date,
.cal-date-cell {
    width: 15%;
}

.cal-date-cell {
    text-align: left !important;
    padding-left: 1rem !important;
    white-space: nowrap;
    color: var(--foreground);
}

/* IFTAR column green bold */
.cal-iftar-cell {
    color: var(--emerald-600) !important;
    font-weight: 700 !important;
}

.cal-th-iftar {
    color: var(--emerald-700) !important;
}

/* Today row */
.calendar-table tr.today-row {
    background: var(--emerald-50);
    border-left: 3px solid var(--emerald-500);
}

.calendar-table tr.today-row td {
    border-color: var(--emerald-200);
    color: #059669;
}

.calendar-table tr.today-row .cal-iftar-cell {
    color: var(--emerald-600) !important;
}

/* TODAY badge in calendar */
.cal-today-badge {
    display: inline-block;
    background: var(--emerald-600);
    color: #fff;
    font-size: 0.75rem;
    font-weight: normal;
    padding: 1px 6px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}

/* ---- Areas Grid ---- */
.areas-grid-section {
    margin-bottom: 2rem;
}

.area-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    color: var(--foreground);
}

.area-card:hover {
    border-color: var(--emerald-300);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    color: var(--foreground);
}

.area-card .area-icon {
    width: 36px;
    height: 36px;
    background: var(--emerald-50);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-600);
    flex-shrink: 0;
}

.area-card .area-info {
    flex: 1;
    min-width: 0;
}

.area-card .area-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1px;
}

.area-card .area-sublabel {
    font-size: 0.75rem;
    color: var(--muted-fg);
}

.area-card .area-arrow {
    color: var(--muted-fg);
    font-size: 1rem;
    transition: var(--transition);
}

.area-card:hover .area-arrow {
    color: var(--emerald-600);
    transform: translateX(3px);
}

/* ---- Download Buttons ---- */
.download-section .btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-emerald {
    background: var(--emerald-600);
    color: #fff;
    border: none;
}

.btn-emerald:hover {
    background: var(--emerald-700);
    color: #fff;
}

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

.btn-emerald-outline:hover {
    background: var(--emerald-600);
    color: #fff;
}

/* ---- Country Page: City List ---- */
.location-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.location-list-card .list-group-item {
    border-color: var(--border);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    color: var(--foreground);
}

.location-list-card .list-group-item:hover {
    background: var(--emerald-50);
}

.location-list-card .list-group-item .loc-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-list-card .list-group-item .loc-arrow {
    color: var(--muted-fg);
    transition: var(--transition);
}

.location-list-card .list-group-item:hover .loc-arrow {
    color: var(--emerald-600);
    transform: translateX(3px);
}

/* ---- Footer ---- */
.site-footer {
    background: linear-gradient(to bottom, var(--bg), var(--bg-muted));
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -30px;
    width: 280px;
    height: 280px;
    background: url('../img/logo.png') no-repeat center / contain;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}
.site-footer .container {
    position: relative;
    z-index: 1;
}

.site-footer .footer-brand {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.site-footer .footer-brand .brand-icon {
    width: 32px;
    height: 32px;
    background: var(--emerald-600);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
}

.site-footer .footer-desc {
    font-size: 0.85rem;
    color: var(--muted-fg);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.site-footer .live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--emerald-700);
}

.site-footer .live-badge .live-dot {
    width: 8px;
    height: 8px;
    background: var(--emerald-500);
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

.site-footer h6 {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--foreground);
    margin-bottom: 0.75rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    font-size: 0.85rem;
    color: var(--muted-fg);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--muted-fg);
}

.footer-bottom .heart {
    color: var(--emerald-600);
}

/* ---- Contact Form ---- */
.contact-form .form-control,
.contact-form .form-select {
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-family: 'Inter', system-ui, sans-serif;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--emerald-400);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

/* ---- Section title (used on location pages) ---- */
.section-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--foreground);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .title-icon {
    color: var(--emerald-600);
}

/* ---- Showing X of Y badge ---- */
.count-badge {
    font-size: 0.75rem;
    background: var(--emerald-50);
    color: var(--emerald-700);
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
}

/* ---- Admin Styles ---- */
.admin-sidebar {
    background: var(--emerald-900);
    min-height: 100vh;
    color: #fff;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 2px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ---- Language Selector Dropdown ---- */
.lang-selector {
    position: relative;
}

.lang-globe-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--emerald-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.lang-globe-btn:hover {
    background: var(--emerald-50);
    border-color: var(--emerald-300);
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    padding: 0.5rem 0;
    animation: dropFade 0.2s ease;
}

.lang-dropdown.show {
    display: block;
}

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

.lang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    color: var(--foreground);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.lang-item:last-child {
    border-bottom: none;
}

.lang-item:hover {
    color: var(--emerald-700);
    background: var(--emerald-50);
}

.lang-item.active {
    color: var(--emerald-600);
    font-weight: 600;
}

.lang-check {
    color: var(--emerald-600);
}

/* ---- Sehri & Iftar Schedule Card (5-Day View) ---- */
.schedule-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.schedule-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}

.schedule-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--emerald-600);
}

.schedule-card-title h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--foreground);
    line-height: 1.2;
}

.schedule-card-location {
    font-size: 0.78rem;
    color: var(--muted-fg);
    font-weight: 400;
}

.schedule-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-schedule-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.9rem;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--foreground);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: 'PFont', 'Inter', system-ui, sans-serif;
}

.btn-schedule-action:hover {
    border-color: var(--emerald-400);
    color: var(--emerald-700);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
}

.btn-schedule-action.btn-schedule-primary {
    background: var(--emerald-600);
    color: #fff;
    border-color: var(--emerald-600);
    padding: 10px 26px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.btn-schedule-action.btn-schedule-primary:hover {
    background: var(--emerald-700);
    border-color: var(--emerald-700);
    color: #fff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

/* Schedule Day List */
.schedule-day-list {
    padding: 0;
}

.schedule-day-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    transition: var(--transition);
}

.schedule-day-row:last-child {
    border-bottom: none;
}

.schedule-day-row:hover {
    background: var(--bg-muted);
}

.schedule-day-row.today {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-left: 3px solid var(--emerald-500);
}

.schedule-day-info {
    flex: 1;
    min-width: 0;
}

.schedule-day-name {
    font-size: 0.82rem;
    color: var(--foreground);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.today-badge {
    display: inline-block;
    background: var(--emerald-600);
    color: #fff;
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.schedule-day-date {
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule-day-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--foreground);
    line-height: 1;
    min-width: 28px;
}

.schedule-day-row.today .schedule-day-num {
    color: var(--emerald-700);
}

.schedule-full-date {
    font-size: 0.78rem;
    color: var(--muted-fg);
    font-weight: 500;
}

.schedule-note {
    font-size: 0.7rem;
    color: var(--muted-fg);
    font-style: italic;
}

/* Schedule Time Items */
.schedule-day-times {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
}

.schedule-time-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 130px;
}

.schedule-time-item.sehri svg {
    color: var(--emerald-600);
}

.schedule-time-item.iftar svg {
    color: #ea580c;
}

.schedule-time-label {
    font-size: 1rem;
    letter-spacing: 0.3px;
    color: var(--muted-fg);
    min-width: 35px;
}

.schedule-time-value {
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
    color: var(--foreground);
}

.schedule-time-item.sehri .schedule-time-value {
    color: var(--emerald-700);
}

.schedule-time-item.iftar .schedule-time-value {
    color: #ea580c;
}

/* Schedule Card Footer */
.schedule-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    background: var(--bg-muted);
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted-fg);
    font-weight: 500;
}

/* ---- SEO Content Section ---- */
.seo-content {
    padding: 1.5rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: 0.88rem;
    color: var(--muted-fg);
    line-height: 1.7;
}

.seo-content p {
    margin-bottom: 0.75rem;
}

.seo-content ul {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.seo-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--foreground);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
    .hero-section { padding: 2.5rem 0 2rem; }
    .hero-section h1 { font-size: 1.75rem; }
    .time-card .card-time { font-size: 1.25rem; }
    .time-card { padding: 1rem; }
    .section-heading { font-size: 1.35rem; }
    .city-card { padding: 1rem; }
    .calendar-table { font-size: 0.75rem; }
    .location-header h1 { font-size: 1.4rem; }
    .service-card { padding: 1.25rem 1rem; }
    .locate-card { padding: 1.5rem 1.25rem; }

    .schedule-card-header { flex-direction: column; align-items: flex-start; }
    .schedule-day-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .schedule-day-times { width: 100%; justify-content: space-between; }
    .schedule-time-item { min-width: auto; }

    .calendar-header { flex-wrap: wrap; }
    .calendar-month-nav .btn-month-nav { font-size: 0.7rem; }
}

@media (max-width: 575.98px) {
    .download-section .btn {
        width: 100%;
        justify-content: center;
    }
    .time-cards-row { gap: 0.75rem; grid-template-columns: 1fr; }
    .time-card .card-time { font-size: 1.25rem; }
    .prayer-times-container { padding: 1rem; }

    .schedule-day-num { font-size: 1.2rem; }
    .schedule-time-value { font-size: 0.85rem; }
    .schedule-card-actions { width: 100%; }
    .btn-schedule-action { flex: 1; justify-content: center; }
}

/* ---- Print ---- */
@media print {
    /* Hide non-essential sections */
    .site-header, .site-footer, .search-wrapper, .locate-card,
    .download-section, .faq-section, .breadcrumb-wrapper, .download-cta-section,
    .countdown-banner, .next-prayer-banner, .or-divider,
    .ad-placeholder, .schedule-card-actions, .calendar-header-actions,
    .areas-grid-section, .seo-content, .btn-schedule-action, .btn-cal-action,
    .btn-cal-download, .btn-month-nav {
        display: none !important;
    }

    /* Clean layout */
    body { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .container { max-width: 100% !important; padding: 0 !important; }
    .location-header { padding: 12px 0 8px !important; background: #fff !important; border-bottom: 2px solid #059669; }
    .location-header h1 { font-size: 18px !important; margin-bottom: 2px !important; }
    .location-header .location-subtitle { font-size: 11px !important; }

    /* Cards print clean */
    .time-cards-row { gap: 10px !important; margin-bottom: 10px !important; }
    .time-card { padding: 8px 12px !important; border: 1px solid #d1d5db !important; box-shadow: none !important; }
    .time-card .card-time { font-size: 14px !important; }

    /* Prayer cards compact */
    .prayer-times-container { padding: 8px !important; margin-bottom: 10px !important; }
    .prayer-hcard { padding: 6px 8px !important; }

    /* Calendar table */
    .calendar-section { break-inside: avoid; }
    .calendar-table { min-width: auto !important; font-size: 9px !important; }
    .calendar-table th { padding: 4px 3px !important; font-size: 8px !important; background: #059669 !important; color: #fff !important; }
    .calendar-table td { padding: 3px !important; }
    .calendar-table tr.today-row td { background: #ecfdf5 !important; color: #059669 !important; }

    /* Schedule card */
    .schedule-card { break-inside: avoid; border: 1px solid #d1d5db !important; box-shadow: none !important; }
    .schedule-card-header { padding: 8px 12px !important; }
    .schedule-day-row { padding: 6px 12px !important; }

    /* Footer print line */
    .today-date-line::after {
        content: " | SehriTime.com";
        font-size: 9px;
        color: #9ca3af;
    }
}
