/* ═══════════════════════════════════════════════
   DUS Qur'an School — Production CSS
   Fonts: Montserrat (headings) · Poppins (body) · Amiri (Arabic)
   Brand palette from dusunnah.com & poster
   ═══════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

html, body { overflow-x: hidden; max-width: 100%; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0ede8;
    color: #1c1c2e;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ════════════════════════════════
   HEADER
════════════════════════════════ */
.site-header {
    background: #0d1526;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 2px 20px rgba(0,0,0,.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 62px;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 1;
    min-width: 0;
    height: 100%;
    padding: 10px 0;
}

.header-logo { max-width: 100%; }

.header-logo {
    height: 42px;
    width: auto;
}

.header-logo-fallback {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-arabic {
    font-family: 'Amiri', Georgia, serif;
    font-size: 1.35rem;
    color: #ffd249;
    direction: rtl;
    line-height: 1;
}

.brand-sep {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,.2);
    flex-shrink: 0;
}

.brand-english {
    font-family: 'Montserrat', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255,255,255,.55);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.header-nav { display: flex; align-items: center; }

/* Gold pill button — all properties explicit, no variables */
.nav-cta {
    display: inline-block;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0d1526;
    background: #ffd249;
    padding: 10px 22px;
    border-radius: 999px;
    line-height: 1;
    transition: background .18s ease, transform .15s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.nav-cta:hover  { background: #f5c820; transform: translateY(-1px); color: #0d1526; }
.nav-cta:active { transform: translateY(0); }

/* ════════════════════════════════
   HERO  — warm beige, poster look
════════════════════════════════ */
.hero {
    background: #cbc8bc;
    position: relative;
    overflow: hidden;
    padding: 54px 0 50px;
    min-height: 280px;
    display: flex;
    align-items: center;
}

/* Illustration positioned right — add img/hero.png to show */
.hero-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    background: url('img/hero.png') no-repeat right bottom / contain;
    pointer-events: none;
    z-index: 0;
}

/* Fade left so text stays readable */
.hero-bg-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #cbc8bc 20%, rgba(203,200,188,.75) 55%, transparent 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-content { max-width: 540px; }

.hero-arabic {
    font-family: 'Amiri', Georgia, serif;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: #3a3525;
    direction: rtl;
    line-height: 1.9;
    margin-bottom: 2px;
    opacity: .8;
    letter-spacing: .01em;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4.8vw, 2.85rem);
    font-weight: 900;
    font-style: italic;
    color: #0d1526;
    line-height: 1.05;
    letter-spacing: -.02em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero-badge {
    display: inline-block;
    background: #01705c;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .73rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 7px 20px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    background: rgba(13,21,38,.1);
    border: 1px solid rgba(13,21,38,.2);
    color: #0d1526;
    font-family: 'Poppins', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ════════════════════════════════
   MAIN — two-column grid
════════════════════════════════ */
.main-content { padding: 36px 0 60px; }

.main-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    align-items: start;
}

/* ════════════════════════════════
   LEFT: Info panel
════════════════════════════════ */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-block {
    background: #ffffff;
    border: 1px solid #e4e0d9;
    border-radius: 14px;
    padding: 24px 22px;
}

.info-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: .98rem;
    font-weight: 800;
    color: #0d1526;
    line-height: 1.35;
    margin-bottom: 8px;
}

.info-text {
    font-size: .855rem;
    color: #6b7280;
    line-height: 1.75;
    margin-bottom: 16px;
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.detail-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: .855rem;
    font-weight: 500;
    color: #1c1c2e;
}

.detail-icon { flex-shrink: 0; }

/* Map */
.map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e4e0d9;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.map-link-overlay {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    color: #01705c;
    background: #f8f6f2;
    padding: 8px 14px;
    text-decoration: none;
    border-bottom: 1px solid #e4e0d9;
    transition: background .15s;
}

.map-link-overlay:hover { background: rgba(1,112,92,.06); }

.map-wrapper iframe { display: block; }

/* WhatsApp */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #25d366;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .03em;
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    transition: background .2s, transform .15s;
    align-self: flex-start;
    -webkit-tap-highlight-color: transparent;
}

.btn-whatsapp:hover  { background: #20c05a; transform: translateY(-1px); color: #ffffff; }
.btn-whatsapp:active { transform: translateY(0); }

/* ════════════════════════════════
   RIGHT: Form card
════════════════════════════════ */
.form-panel {
    position: sticky;
    top: 78px;
}

.form-card {
    background: #ffffff;
    border: 1px solid #e4e0d9;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
    overflow: hidden;
}

/* Tabs */
.mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid #ede9e3;
}

.mode-tab {
    padding: 15px 12px;
    background: transparent;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9ca3af;
    cursor: pointer;
    position: relative;
    transition: color .2s, background .2s;
}

.mode-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 2px;
    background: #01705c;
    transform: scaleX(0);
    transition: transform .22s ease;
    transform-origin: center;
}

.mode-tab.active          { color: #01705c; background: rgba(1,112,92,.04); }
.mode-tab.active::after   { transform: scaleX(1); }
.mode-tab:hover:not(.active) { color: #374151; background: #f8f6f2; }

/* Form body */
.enrol-form { padding: 24px 24px 28px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #374151;
    margin-bottom: 6px;
}

.hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: .7rem;
    text-transform: none;
    letter-spacing: 0;
}

.req { color: #01705c; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border: 1.5px solid #d9d5ce;
    border-radius: 9px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #1c1c2e;
    background: #fdfcfa;
    transition: border-color .18s, box-shadow .18s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #01705c;
    box-shadow: 0 0 0 3px rgba(1,112,92,.12);
    background: #ffffff;
}

.form-group input::placeholder { color: #b0aaa0; }

/* Day checkboxes */
.day-checkboxes {
    display: flex;
    gap: 8px;
}

.day-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    padding: 9px 6px;
    border: 1.5px solid #d9d5ce;
    border-radius: 9px;
    transition: border-color .18s, background .18s, color .18s;
    user-select: none;
    background: #fdfcfa;
    -webkit-tap-highlight-color: transparent;
}

.day-label:has(input:checked) {
    border-color: #01705c;
    background: rgba(1,112,92,.06);
    color: #01705c;
}

.day-label input[type="checkbox"] {
    width: 14px; height: 14px;
    accent-color: #01705c;
    cursor: pointer;
    flex-shrink: 0;
}

/* Payment type — 3-column, never wraps */
.payment-type-radios {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    padding: 9px 6px;
    border: 1.5px solid #d9d5ce;
    border-radius: 9px;
    transition: border-color .18s, background .18s, color .18s;
    user-select: none;
    background: #fdfcfa;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.radio-label:has(input:checked) {
    border-color: #01705c;
    background: rgba(1,112,92,.06);
    color: #01705c;
}

.radio-label input[type="radio"] {
    width: 14px; height: 14px;
    accent-color: #01705c;
    cursor: pointer;
    flex-shrink: 0;
}

/* Reference lookup */
.ref-row { display: flex; gap: 8px; }
.ref-row input { flex: 1; min-width: 0; }

.ref-status {
    font-size: .8rem;
    margin-top: 6px;
    min-height: 1.2em;
    font-family: 'Poppins', sans-serif;
}

.ref-status.success { color: #059669; font-weight: 500; }
.ref-status.error   { color: #dc2626; }

/* Breakdown */
.price-breakdown {
    background: linear-gradient(135deg, rgba(1,112,92,.06) 0%, rgba(1,112,92,.03) 100%);
    border: 1.5px solid rgba(1,112,92,.2);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.breakdown-lines {
    font-family: 'Poppins', sans-serif;
    font-size: .83rem;
    color: #6b7280;
    line-height: 1.85;
    white-space: pre-line;
    margin-bottom: 10px;
}

.breakdown-total {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #01705c;
    border-top: 1px solid rgba(1,112,92,.2);
    padding-top: 10px;
}

/* Pay button */
.btn-pay {
    width: 100%;
    height: 48px;
    background: #01705c;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, transform .15s;
    -webkit-tap-highlight-color: transparent;
}

.btn-pay:hover:not(:disabled) {
    background: #015a4a;
    box-shadow: 0 4px 16px rgba(1,112,92,.3);
    transform: translateY(-1px);
}

.btn-pay:active:not(:disabled) { transform: translateY(0); }
.btn-pay:disabled { opacity: .35; cursor: not-allowed; }

/* Secondary button */
.btn-secondary {
    height: 42px;
    padding: 0 16px;
    background: #f8f6f2;
    color: #01705c;
    font-family: 'Montserrat', sans-serif;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    border: 1.5px solid #01705c;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s;
    -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover { background: rgba(1,112,92,.07); }

/* Errors */
.form-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 9px;
    padding: 10px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: .83rem;
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.site-footer {
    background: #0d1526;
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.06);
}

.site-footer p {
    font-family: 'Poppins', sans-serif;
    font-size: .8rem;
    color: rgba(255,255,255,.35);
}

.site-footer a { color: rgba(255,255,255,.55); text-decoration: none; }
.site-footer a:hover { color: #ffd249; }

/* ════════════════════════════════
   SUCCESS / CANCEL
════════════════════════════════ */
.standalone-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.standalone-card {
    background: #ffffff;
    border: 1px solid #e4e0d9;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,.09);
    max-width: 520px;
    width: 100%;
    padding: 52px 44px;
    text-align: center;
}

.standalone-icon { font-size: 3rem; margin-bottom: 16px; }

.standalone-card h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: #0d1526;
    margin-bottom: 10px;
}

.standalone-card p {
    font-family: 'Poppins', sans-serif;
    color: #6b7280;
    font-size: .88rem;
    line-height: 1.75;
    margin-bottom: 8px;
}

.ref-display {
    display: inline-block;
    background: rgba(1,112,92,.07);
    border: 2px solid rgba(1,112,92,.25);
    color: #01705c;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    padding: 12px 28px;
    border-radius: 10px;
    letter-spacing: .1em;
    margin: 16px 0 10px;
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; }
    .form-panel { position: static; }
}

@media (max-width: 600px) {
    .hero { padding: 38px 0 34px; min-height: auto; }

    .hero-bg-image {
        width: 100%;
        opacity: .14;
    }

    .hero-bg-image::before { display: none; }

    .main-content { padding: 24px 0 44px; }
    .enrol-form   { padding: 18px 18px 22px; }

    .form-row { grid-template-columns: 1fr; gap: 0; }

    .standalone-page { padding: 40px 12px; }
    .standalone-card { padding: 36px 22px; }
    .standalone-card h1 { font-size: 1.3rem; }
    .ref-display { font-size: 1.15rem; padding: 12px 16px; letter-spacing: .06em; }

    .day-checkboxes { gap: 6px; }
    .day-label { font-size: .78rem; padding: 8px 4px; }
    .radio-label { font-size: .78rem; padding: 8px 4px; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 1.7rem; }
    .header-inner { gap: 12px; }
    .nav-cta { padding: 8px 14px; font-size: .68rem; }

    .payment-type-radios { gap: 4px; }
    .radio-label { font-size: .68rem; padding: 8px 2px; }
}

/* ── Children names ───────────────────────────────────────────────────────── */

.children-names-section {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.children-names-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #374151;
    margin-bottom: 2px;
}

.child-name-input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border: 1.5px solid #d9d5ce;
    border-radius: 9px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #1c1c2e;
    background: #fdfcfa;
    transition: border-color .18s, box-shadow .18s;
}

.child-name-input:focus {
    outline: none;
    border-color: #01705c;
    box-shadow: 0 0 0 3px rgba(1, 112, 92, .12);
}

.child-name-input::placeholder {
    color: #b0aba2;
}
