/*
Theme Name: Shia Quran Tutors Reader
Theme URI: https://quran.shiaqurantutors.com
Author: Shia Quran Tutors
Description: Minimal theme that provides the header and footer for quran.shiaqurantutors.com. The plugin Shia Quran Reader provides all reader content. All course/blog/contact links point to the main shiaqurantutors.com site.
Version: 3.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: shia-quran-tutors-reader
*/

/* ============================================================
   Design tokens — matched to shiaqurantutors.com
   ============================================================ */
:root {
    --primary: #0a4d4d;
    --primary-dark: #062f2f;
    --primary-light: #1e7a7a;
    --accent: #c8a94a;
    --accent-dark: #a68a36;
    --text: #1a1f2e;
    --muted: #6b7280;
    --bg: #f7f5f0;
    --surface: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.08);
    --radius: 14px;
    --container: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

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

/* ============================================================
   Top bar (phone + email + socials, matches main site)
   ============================================================ */
.site-topbar {
    background: var(--primary-dark);
    color: #cbd5e1;
    font-size: .82rem;
    padding: 8px 0;
}
.site-topbar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.site-topbar a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color .15s;
}
.site-topbar a:hover { color: var(--accent); }
.topbar-contact { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-socials { display: flex; gap: 8px; align-items: center; }
.topbar-socials a {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #cbd5e1;
    transition: all .15s;
}
.topbar-socials a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}
.topbar-socials svg { display: block; }
@media (max-width: 600px) {
    .site-topbar-inner { justify-content: center; text-align: center; }
}

/* ============================================================
   Main header
   ============================================================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 16px;
    max-width: var(--container);
    margin: 0 auto;
}
.site-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
}
.site-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.4rem;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}
.site-logo-text { display: flex; flex-direction: column; gap: 0; }
.site-logo-name { font-size: 1rem; line-height: 1.2; }
.site-logo-tagline { font-size: .72rem; color: var(--muted); font-weight: 400; }

/* Primary nav */
.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    align-items: center;
}
.primary-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: .92rem;
    transition: all .15s;
    display: block;
}
.primary-nav a:hover { background: #f3f4f6; color: var(--primary); }
.primary-nav .current-menu-item a,
.primary-nav .current-page a { background: var(--primary); color: #fff; }
.header-cta {
    background: linear-gradient(135deg, #25d366 0%, #128C7E 100%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 11px 22px !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 14px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.7);
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
    animation: cta-pulse 2.4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}
.header-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform .6s;
}
.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,211,102,.55);
    animation: none;
}
.header-cta:hover::before { transform: translateX(100%); }
.header-cta .cta-icon { display: inline-flex; align-items: center; }
.header-cta svg { display: block; }
@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); }
    50% { box-shadow: 0 4px 14px rgba(37,211,102,.45), 0 0 0 10px rgba(37,211,102,0); }
}

/* Mobile nav toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 11px;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 4px 0;
    transition: all .2s;
}

@media (max-width: 980px) {
    .menu-toggle { display: block; }
    .primary-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #fff;
        border-top: 1px solid var(--border);
        padding: 14px;
        box-shadow: var(--shadow-lg);
        max-height: 80vh;
        overflow-y: auto;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; gap: 2px; align-items: stretch; }
    .primary-nav a { display: block; }
    .site-logo-tagline { display: none; }
}

/* ============================================================
   Footer (matches shiaqurantutors.com structure)
   ============================================================ */
.site-footer {
    background: var(--primary-dark);
    color: #cbd5e1;
    padding: 56px 16px 0;
    margin-top: 64px;
}
.footer-grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 880px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.footer-col h4 {
    color: #fff;
    margin: 0 0 14px;
    font-size: 1rem;
    letter-spacing: .02em;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: .92rem;
    transition: color .15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-col p { font-size: .92rem; line-height: 1.6; margin: 0 0 14px; }

.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.2rem;
}
.footer-brand-text { color: #fff; font-weight: 700; font-size: 1.05rem; }

.footer-socials { display: flex; gap: 10px; margin-top: 14px; }
.footer-socials a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #cbd5e1;
    transition: all .2s;
}
.footer-socials a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}
.footer-socials svg { display: block; }

.footer-wa-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #25d366 !important;
    font-weight: 600 !important;
}
.footer-wa-link:hover { color: #4ade80 !important; }
.footer-wa-icon svg { display: block; }

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: .85rem;
    color: #94a3b8;
}

/* ============================================================
   WhatsApp floating button - large, attention-grabbing
   ============================================================ */
.wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #25d366 0%, #128C7E 100%);
    color: #fff;
    height: 60px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 22px 0 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    box-shadow: 0 6px 24px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,.7);
    z-index: 99;
    transition: all .25s;
    animation: wa-pulse 2s ease-in-out infinite;
}
.wa-float:hover {
    transform: translateY(-2px) scale(1.03);
    color: #fff;
    box-shadow: 0 10px 30px rgba(37,211,102,.6);
    animation: none;
}
.wa-float svg { display: block; }
.wa-float-label { white-space: nowrap; }
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,.55); }
    50% { box-shadow: 0 6px 24px rgba(37,211,102,.5), 0 0 0 18px rgba(37,211,102,0); }
}
@media (max-width: 600px) {
    .wa-float {
        bottom: 16px;
        right: 16px;
        height: 56px;
        padding: 0 18px 0 14px;
        font-size: .9rem;
    }
    .wa-float-label { display: none; }
    .wa-float { padding: 0; width: 56px; justify-content: center; border-radius: 50%; }
}
