/* ==========================================================================
   Ab-e-Hayat — public site styles
   Recreates the original WordPress "Mosque" theme look (brown sunset mosque
   background, green arched navigation, peach domed boxes) as responsive CSS.
   ========================================================================== */

@font-face {
    font-family: "Jameel Noori Nastaleeq";
    src: url("../fonts/jameel-noori-nastaleeq.woff2") format("woff2");
    font-display: swap;
}

:root {
    --brown-900: #2e1a0c;
    --brown-800: #4a2b17;
    --brown-700: #5c3519;
    --brown-600: #7a4520;
    --brown-500: #a0582a;
    --peach-100: #fbe3c7;
    --peach-200: #f6cfa4;
    --peach-300: #f1bd8a;
    --gold: #f2bd86;
    --gold-light: #ffd9a8;
    --text-light: #f4d1ad;
    --green-900: #1f3a06;
    --green-800: #2d4f0a;
    --green-700: #436307;
    --green-600: #50750a;
    --green-400: #7aa61a;
    --urdu: "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", "Urdu Typesetting", "Alvi Nastaleeq", serif;
    --ui: "Segoe UI", Tahoma, Arial, sans-serif;
    --wrap: 1170px;
    --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-light);
    font-family: var(--urdu);
    font-size: 20px;
    line-height: 1.9;
    background: var(--brown-800) url("../img/bg_body.jpg") 0 0 repeat-x;
}

.page {
    flex: 1;
    background: url("../img/bg_main.jpg") center 0 no-repeat;
    padding-bottom: 40px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-light); text-decoration: none; }
a:hover { color: #fff; }

button { font: inherit; cursor: pointer; }

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

.skip-link {
    position: absolute; right: 1rem; top: -100px; z-index: 1000;
    background: var(--green-700); color: #fff; padding: .4rem 1rem; border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 15px; }

/* ----------------------------------------------------------------------------
   Header
---------------------------------------------------------------------------- */

.site-header {
    max-width: var(--wrap);
    margin: 0 auto;
    position: relative;
    /* green bar + central arch from the original theme */
    background: url("../img/bg_topHeader2.png") center bottom / 100% 172px no-repeat;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100px;
    padding: 12px 30px 0;
}

.logo { display: block; line-height: 1; }
.logo img { max-height: 80px; width: auto; }
.logo-text {
    font-size: 46px;
    color: var(--brown-800);
    text-shadow: 0 1px 0 rgba(255, 230, 190, .6);
    white-space: nowrap;
}

.search input {
    width: 210px;
    height: 32px;
    padding: 0 16px;
    border: 1px solid rgba(160, 88, 42, .55);
    border-radius: 16px;
    background: rgba(230, 170, 95, .75);
    color: var(--brown-900);
    font-family: var(--urdu);
    font-size: 16px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .15);
}
.search input::placeholder { color: rgba(74, 43, 23, .75); }
.search input:focus { outline: none; background: rgba(250, 210, 160, .95); }

.main-nav {
    position: relative;
    height: 72px;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 60px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.main-nav li { position: relative; display: flex; align-items: center; }
.main-nav li + li::before {
    content: "";
    width: 10px; height: 9px;
    margin: 0 22px;
    background: url("../img/bg_primaryNav_li_Divider.png") center no-repeat;
    opacity: .9;
}

.main-nav a {
    display: block;
    padding: 4px 2px;
    color: #f6ead2;
    font-size: 21px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
    transition: color .15s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--gold); }

.nav-toggle { display: none; }

/* ----------------------------------------------------------------------------
   Main container
---------------------------------------------------------------------------- */

.site-main {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 0 20px;
}

.panel {
    background: rgba(60, 33, 15, .82);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 12px 12px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.panel--content { padding: 30px 40px 40px; }

/* ----------------------------------------------------------------------------
   Home: slider
---------------------------------------------------------------------------- */

.slider { position: relative; }
.slides {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1150 / 480;
    background: var(--brown-700);
}
.slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 14px;
}
.slider-dots button {
    width: 11px; height: 11px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #6b4a33;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}
.slider-dots button.is-active { background: var(--peach-300); }

.slider-empty {
    display: grid; place-items: center;
    height: 100%;
    font-size: 40px;
    color: var(--gold);
}

/* ----------------------------------------------------------------------------
   Home: peach domed boxes
---------------------------------------------------------------------------- */

.boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 55px;
}

.dome-box {
    --box: var(--peach-300);
    position: relative;
    background: var(--box);
    border-radius: 40px;
    padding: 30px 28px 44px;
    min-height: 400px;
    color: var(--brown-900);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
}
/* top arch + bottom drop, drawn as SVG so the colour always matches */
.dome-box::before,
.dome-box::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 190px;
    transform: translateX(-50%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
}
.dome-box::before {
    top: -30px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 32' preserveAspectRatio='none'%3E%3Cpath fill='%23f1bd8a' d='M0 32c22 0 40-2 55-10 12-6 22-8 30-8 0-6 4-11 10-14 6 3 10 8 10 14 8 0 18 2 30 8 15 8 33 10 55 10z'/%3E%3C/svg%3E");
}
.dome-box::after {
    bottom: -26px;
    height: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 28' preserveAspectRatio='none'%3E%3Cpath fill='%23f1bd8a' d='M0 0c22 0 40 2 55 8 12 5 22 6 30 6 2 6 5 10 10 14 5-4 8-8 10-14 8 0 18-1 30-6 15-6 33-8 55-8z'/%3E%3C/svg%3E");
}

.dome-box h2 {
    margin: 0 0 18px;
    font-size: 32px;
    line-height: 1.6;
    font-weight: normal;
    color: #4b2410;
}
.dome-box p {
    margin: 0 0 22px;
    font-size: 19px;
    line-height: 2;
    color: #3a1d0b;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    min-width: 104px;
    padding: 2px 26px 6px;
    border: 0;
    border-radius: 20px;
    background: var(--brown-500);
    color: var(--peach-200);
    font-family: var(--urdu);
    font-size: 19px;
    line-height: 1.8;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .15);
    transition: background .15s, color .15s;
}
.btn:hover { background: var(--brown-800); color: #fff; }
.btn--green { background: var(--green-600); color: #fff; }
.btn--green:hover { background: var(--green-800); }
.btn--small { min-width: 0; padding: 0 16px 3px; font-size: 17px; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ----------------------------------------------------------------------------
   Category / sermon page
---------------------------------------------------------------------------- */

.page-head {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(242, 189, 134, .25);
}
.page-head h1 {
    margin: 0;
    font-size: 44px;
    line-height: 1.7;
    font-weight: normal;
    color: var(--gold);
}
.speaker { margin: 6px 0 0; font-size: 22px; color: var(--text-light); line-height: 1.8; }
.speaker small { display: block; font-size: 18px; color: rgba(244, 209, 173, .8); }

.page-cover { margin: 0 auto 24px; border-radius: 10px; max-height: 360px; object-fit: cover; width: 100%; }

.prose { font-size: 20px; line-height: 2.1; margin-bottom: 30px; }
.prose p { margin: 0 0 1em; }
.prose a { text-decoration: underline; }

.playlist {
    margin: 0 0 34px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(35, 18, 6, .45);
}

.playlist-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px 12px;
    background: linear-gradient(to left, var(--green-700) 0%, var(--green-600) 100%);
    color: #fff;
}
.playlist-head-text { flex: 1; min-width: 0; }
.playlist-head h2 {
    margin: 0;
    font-size: 27px;
    line-height: 1.7;
    font-weight: normal;
    color: #fff;
}
.playlist-head p { margin: 0; font-size: 18px; color: #e6f2c8; line-height: 1.6; }
.playlist-count {
    font-family: var(--ui);
    font-size: 13px;
    color: #dbe8bd;
    white-space: nowrap;
}

.playlist-desc { margin: 0; padding: 12px 20px 0; font-size: 18px; color: var(--text-light); }

.tracks { list-style: none; margin: 0; padding: 0; counter-reset: track; }

.track {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 6px 16px 8px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    cursor: pointer;
    transition: background .12s;
}
.track:first-child { border-top: 0; }
.track:hover { background: rgba(255, 220, 170, .07); }
.track.is-current { background: rgba(122, 166, 26, .22); }

.track-play {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(242, 189, 134, .55);
    background: rgba(242, 189, 134, .12);
    display: grid; place-items: center;
    padding: 0;
    color: var(--gold);
}
.track-play svg { width: 16px; height: 16px; fill: currentColor; }
.track-play .i-pause, .track-play .i-bars { display: none; }
.track.is-current .track-play { background: var(--green-600); border-color: var(--green-400); color: #fff; }
.track.is-current.is-playing .track-play .i-play { display: none; }
.track.is-current.is-playing .track-play .i-pause { display: block; }

.track-title {
    font-size: 20px;
    line-height: 1.7;
    color: #fff3e2;
    min-width: 0;
}
.track-title .num {
    font-family: var(--ui);
    font-size: 13px;
    color: rgba(244, 209, 173, .6);
    margin-inline-start: 8px;
}
.track-meta {
    font-family: var(--ui);
    font-size: 13px;
    color: rgba(244, 209, 173, .75);
    white-space: nowrap;
    direction: ltr;
}
.track-badge {
    font-family: var(--ui);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 9px;
    background: #ff5500;
    color: #fff;
}
.track-dl { color: rgba(244, 209, 173, .7); display: grid; place-items: center; }
.track-dl svg { width: 18px; height: 18px; fill: currentColor; }
.track-dl:hover { color: #fff; }

.empty {
    padding: 40px;
    text-align: center;
    color: rgba(244, 209, 173, .8);
    font-size: 22px;
}

/* ----------------------------------------------------------------------------
   Search + contact
---------------------------------------------------------------------------- */

.search-big { display: flex; gap: 10px; max-width: 600px; margin: 0 auto 30px; }
.search-big input { flex: 1; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 19px; margin-bottom: 4px; color: var(--gold); }

input[type="text"].input, input[type="email"].input, input[type="tel"].input,
input[type="search"].input, textarea.input {
    width: 100%;
    padding: 6px 14px 8px;
    border: 1px solid rgba(242, 189, 134, .45);
    border-radius: 10px;
    background: rgba(255, 240, 220, .95);
    color: var(--brown-900);
    font-family: var(--urdu);
    font-size: 19px;
    line-height: 1.8;
}
textarea.input { min-height: 170px; resize: vertical; }
.input:focus { outline: 2px solid var(--green-400); }
.error { color: #ffb4a0; font-size: 17px; }
.notice {
    padding: 12px 18px;
    border-radius: 10px;
    background: rgba(122, 166, 26, .25);
    border: 1px solid var(--green-400);
    margin-bottom: 20px;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.contact-grid .full { grid-column: 1 / -1; }

.results h2 { color: var(--gold); font-weight: normal; font-size: 28px; margin: 24px 0 10px; }
.results ul { list-style: none; padding: 0; margin: 0; }
.results li { padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.results small { color: rgba(244, 209, 173, .7); margin-inline-start: 8px; }

/* ----------------------------------------------------------------------------
   Footer
---------------------------------------------------------------------------- */

.site-footer { position: relative; margin-top: auto; }
.footer-skyline {
    height: 157px;
    background:
        url("../img/bg_wrapFooterCenter.jpg") center top no-repeat,
        url("../img/bg_wrapFooterAll.png") 0 124px repeat-x,
        var(--brown-800);
    pointer-events: none;
}
.footer-inner {
    background: url("../img/bg_footer.jpg") repeat;
    padding: 34px 0 calc(40px + var(--player-h, 0px));
}
.footer-nav {
    list-style: none;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
}
.footer-nav li + li::before { content: "|"; color: var(--gold); margin: 0 8px; }
.footer-nav a { color: var(--gold); font-size: 19px; }
.footer-nav a:hover { color: #fff; }
.copyright {
    max-width: var(--wrap);
    margin: 28px auto 0;
    padding: 0 15px;
    font-family: var(--ui);
    font-size: 13px;
    color: rgba(244, 209, 173, .55);
}

/* ----------------------------------------------------------------------------
   Sticky audio player
---------------------------------------------------------------------------- */

.player {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: linear-gradient(to bottom, #3a5a0b, var(--green-900));
    border-top: 2px solid var(--gold);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .45);
    color: #fff;
}
.player[hidden] { display: none; }
.player-inner {
    position: relative;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 8px 54px 10px 20px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) auto;
    align-items: center;
    gap: 6px 24px;
}
.player-now { min-width: 0; line-height: 1.5; }
.player-label { display: block; font-size: 14px; color: #cfe3a3; }
.player-title {
    display: block;
    font-weight: normal;
    font-size: 21px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-sub { display: block; font-size: 15px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-native { display: contents; }
.player-native[hidden] { display: none; }

.player-buttons { display: flex; justify-content: center; align-items: center; gap: 8px; grid-column: 2; grid-row: 1; }
.player-progress { display: flex; align-items: center; gap: 10px; grid-column: 2; grid-row: 2; }
.player-extra { display: flex; align-items: center; gap: 10px; grid-column: 3; grid-row: 1 / span 2; }

.pbtn {
    position: relative;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
}
.pbtn:hover { background: rgba(255, 255, 255, .2); }
.pbtn svg { width: 20px; height: 20px; fill: currentColor; }
.pbtn-back span, .pbtn-fwd span {
    position: absolute;
    font: 700 8px/1 var(--ui);
    top: 50%; left: 50%;
    transform: translate(-50%, -10%);
}
.pbtn-play { width: 48px; height: 48px; background: var(--gold); color: var(--brown-900); }
.pbtn-play:hover { background: var(--gold-light); }
.pbtn-play svg { width: 26px; height: 26px; }
.pbtn-play .i-pause { display: none; }
.player.is-playing .pbtn-play .i-play { display: none; }
.player.is-playing .pbtn-play .i-pause { display: block; }
.pbtn-speed { width: auto; min-width: 42px; padding: 0 8px; border-radius: 14px; height: 28px; font: 600 13px var(--ui); }
.pbtn-dl[hidden] { display: none; }

.time { font: 12px var(--ui); color: #dbe8bd; min-width: 42px; text-align: center; }

.player input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--gold) var(--fill, 0%), rgba(255, 255, 255, .25) var(--fill, 0%));
    cursor: pointer;
}
#player-seek { flex: 1; }
#player-volume { width: 80px; }
.player input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 2px solid var(--gold);
}
.player input[type="range"]::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 2px solid var(--gold);
}

.player-sc { grid-column: 2 / span 2; grid-row: 1 / span 2; }
.player-sc[hidden] { display: none; }
.player-sc iframe { display: block; width: 100%; height: 116px; border: 0; border-radius: 6px; }

.player-close {
    position: absolute;
    top: 6px; left: 10px;
    width: 30px; height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #e8f2d0;
    font: 24px/1 var(--ui);
}
.player-close:hover { background: rgba(255, 255, 255, .15); }

/* ----------------------------------------------------------------------------
   Responsive
---------------------------------------------------------------------------- */

@media (max-width: 1200px) {
    .main-nav li + li::before { margin: 0 12px; }
    .main-nav a { font-size: 19px; }
    .main-nav ul { padding: 0 30px; }
}

@media (max-width: 1000px) {
    .boxes { grid-template-columns: 1fr 1fr; }
    .main-nav li + li::before { margin: 0 6px; }
    .main-nav a { font-size: 17px; }
    .panel--content { padding: 24px 22px 30px; }
}

@media (max-width: 820px) {
    body { font-size: 18px; }

    .site-header { background: none; }
    .header-top { padding: 12px 15px 8px; flex-wrap: wrap; gap: 10px; }
    .logo-text { font-size: 38px; }
    .search input { width: 170px; }

    .main-nav {
        height: auto;
        background: linear-gradient(to bottom, var(--green-600), var(--green-800));
        border-radius: 16px 16px 0 0;
        margin: 0 8px;
    }
    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin: 0 auto;
        padding: 14px 20px;
        background: none;
        border: 0;
    }
    .nav-toggle span:not(.sr-only) { width: 26px; height: 3px; border-radius: 2px; background: #fff; }
    .main-nav ul { display: none; flex-direction: column; padding: 0 0 12px; }
    .main-nav.is-open ul { display: flex; }
    .main-nav li + li::before { display: none; }
    .main-nav li { width: 100%; justify-content: center; border-top: 1px solid rgba(255, 255, 255, .12); }
    .main-nav a { font-size: 21px; padding: 6px 0; }

    .site-main { padding: 0 8px; }
    .panel { border-radius: 0 0 14px 14px; }

    .boxes { grid-template-columns: 1fr; gap: 50px; margin-top: 50px; }
    .dome-box { min-height: 0; }

    .page-head h1 { font-size: 34px; }
    .playlist-head { flex-wrap: wrap; padding: 8px 14px 10px; gap: 6px 12px; }
    .playlist-head h2 { font-size: 23px; }
    .track { grid-template-columns: 36px 1fr auto; gap: 10px; padding: 6px 10px 8px; }
    .track-meta.duration { grid-column: 2; grid-row: 2; margin-top: -8px; }
    .track-title { font-size: 18px; }

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

    .footer-skyline { background-size: auto, auto; }

    .player-inner {
        grid-template-columns: 1fr auto;
        padding: 6px 12px 10px 44px;
        gap: 4px 10px;
    }
    .player-now { grid-column: 1 / -1; }
    .player-title { font-size: 18px; }
    .player-label { display: none; }
    .player-buttons { grid-column: 1; grid-row: 2; justify-content: flex-start; gap: 4px; }
    .player-extra { grid-column: 2; grid-row: 2; }
    .player-progress { grid-column: 1 / -1; grid-row: 3; }
    #player-volume { display: none; }
    .pbtn { width: 34px; height: 34px; }
    .pbtn-play { width: 44px; height: 44px; }
    .player-sc { grid-column: 1 / -1; grid-row: 2 / span 2; }
}

@media (prefers-reduced-motion: reduce) {
    .slide { transition: none; }
}
