/*
Theme Name: Tilawa Core
Theme URI: https://tilawaacademy.net/
Author: Tilawa Academy
Description: A lightweight, accessible and multilingual-ready custom theme for Tilawa Academy.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: tilawa
*/

:root {
    --navy-950: #071a2f;
    --navy-900: #0a2342;
    --navy-800: #12375f;
    --teal-700: #0f6f68;
    --teal-600: #13847b;
    --teal-100: #dff5f1;
    --gold-500: #d4a735;
    --gold-100: #fff4cf;
    --ink: #172033;
    --muted: #5f6878;
    --line: #dde3e9;
    --surface: #ffffff;
    --surface-soft: #f5f8fa;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --shadow-sm: 0 12px 30px rgba(7, 26, 47, .08);
    --shadow-lg: 0 28px 70px rgba(7, 26, 47, .15);
    --container: 1180px;
}

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

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header {
    top: 32px;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--teal-700);
    text-decoration-thickness: .08em;
    text-underline-offset: .18em;
}

a:hover {
    color: var(--navy-900);
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 .65em;
    color: var(--navy-950);
    font-weight: 800;
    line-height: 1.13;
    letter-spacing: -.035em;
}

h1 {
    font-size: clamp(2.65rem, 6vw, 5.8rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.55rem);
}

h3 {
    font-size: clamp(1.22rem, 2vw, 1.55rem);
}

p {
    margin: 0 0 1.1rem;
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 99999;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    color: #fff;
    background: var(--navy-950);
    border-radius: 8px;
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: none;
}

.top-strip {
    padding: 8px 20px;
    color: #fff;
    background: var(--navy-950);
    font-size: 13px;
    text-align: center;
    letter-spacing: .02em;
}

.site-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    border-bottom: 1px solid rgba(221, 227, 233, .85);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
}

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

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--navy-950);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(145deg, var(--teal-600), var(--navy-900));
    border-radius: 14px 14px 14px 5px;
    box-shadow: 0 9px 22px rgba(15, 111, 104, .22);
    font-size: 20px;
    font-weight: 900;
}

.brand-name {
    font-size: 19px;
    font-weight: 850;
    letter-spacing: -.025em;
}

.custom-logo {
    width: auto;
    max-height: 54px;
}

.primary-navigation {
    display: flex;
    align-items: center;
    gap: 22px;
}

.primary-navigation ul {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 25px;
    list-style: none;
}

.primary-navigation a {
    color: var(--ink);
    font-size: 15px;
    font-weight: 680;
    text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
    color: var(--teal-700);
}

.button,
.wp-element-button,
input[type="submit"] {
    display: inline-flex;
    min-height: 49px;
    padding: 12px 21px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--teal-700);
    border: 1px solid var(--teal-700);
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(15, 111, 104, .17);
    font-weight: 780;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.button:hover,
.wp-element-button:hover,
input[type="submit"]:hover {
    color: #fff;
    background: var(--navy-900);
    border-color: var(--navy-900);
    box-shadow: 0 13px 30px rgba(7, 26, 47, .22);
    transform: translateY(-2px);
}

.button-secondary {
    color: var(--navy-900);
    background: transparent;
    border-color: rgba(10, 35, 66, .28);
    box-shadow: none;
}

.button-secondary:hover {
    color: #fff;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    place-items: center;
    padding: 0;
    color: var(--navy-950);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
    display: block;
    width: 21px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.menu-toggle-lines {
    position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
    position: absolute;
    left: 0;
    content: "";
}

.menu-toggle-lines::before {
    top: -7px;
}

.menu-toggle-lines::after {
    top: 7px;
}

.mobile-navigation {
    display: none;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(72px, 10vw, 132px) 0;
    background:
        radial-gradient(circle at 88% 14%, rgba(212, 167, 53, .21), transparent 26%),
        radial-gradient(circle at 5% 95%, rgba(19, 132, 123, .15), transparent 30%),
        linear-gradient(135deg, #f9fbfc, #eef7f5);
}

.hero::before {
    position: absolute;
    width: 420px;
    height: 420px;
    top: -225px;
    right: -140px;
    border: 1px solid rgba(15, 111, 104, .16);
    border-radius: 50%;
    content: "";
}

.hero-grid {
    position: relative;
    display: grid;
    align-items: center;
    gap: clamp(44px, 8vw, 100px);
    grid-template-columns: minmax(0, 1.14fr) minmax(300px, .86fr);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 22px;
    padding: 8px 13px;
    align-items: center;
    gap: 8px;
    color: var(--teal-700);
    background: rgba(223, 245, 241, .85);
    border: 1px solid rgba(15, 111, 104, .13);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 860px;
}

.hero h1 span {
    color: var(--teal-700);
}

.hero-copy {
    max-width: 690px;
    color: var(--muted);
    font-size: clamp(1.08rem, 1.7vw, 1.25rem);
}

.hero-actions {
    display: flex;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 13px;
}

.hero-points {
    display: flex;
    margin: 30px 0 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 12px 22px;
    list-style: none;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--navy-800);
    font-size: 14px;
    font-weight: 720;
}

.hero-points li::before {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: #fff;
    background: var(--teal-700);
    border-radius: 50%;
    content: "✓";
    font-size: 12px;
}

.hero-panel {
    position: relative;
    padding: 28px;
    color: #fff;
    background:
        linear-gradient(150deg, var(--navy-950), var(--navy-800));
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-panel::before {
    position: absolute;
    inset: 13px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    content: "";
    pointer-events: none;
}

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

.panel-label {
    color: #b7e4df;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.panel-title {
    margin: 13px 0 24px;
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.lesson-card {
    margin-top: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 17px;
}

.lesson-card strong {
    display: block;
    color: #fff;
    font-size: 16px;
}

.lesson-card span {
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}

.section {
    padding: clamp(76px, 9vw, 118px) 0;
}

.section-soft {
    background: var(--surface-soft);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 45px;
}

.section-heading p {
    max-width: 650px;
    color: var(--muted);
    font-size: 18px;
}

.cards {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    position: relative;
    padding: 30px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.card-number {
    display: inline-grid;
    width: 42px;
    height: 42px;
    margin-bottom: 24px;
    place-items: center;
    color: var(--teal-700);
    background: var(--teal-100);
    border-radius: 13px;
    font-size: 14px;
    font-weight: 850;
}

.card p {
    color: var(--muted);
}

.card-link {
    font-weight: 780;
    text-decoration: none;
}

.steps {
    display: grid;
    gap: 1px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step {
    padding: 34px;
    background: #fff;
}

.step small {
    display: block;
    margin-bottom: 19px;
    color: var(--teal-700);
    font-weight: 850;
    letter-spacing: .08em;
}

.cta-box {
    display: grid;
    padding: clamp(34px, 6vw, 66px);
    align-items: center;
    gap: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 20%, rgba(212, 167, 53, .25), transparent 25%),
        var(--navy-950);
    border-radius: var(--radius-lg);
    grid-template-columns: 1fr auto;
}

.cta-box h2 {
    color: #fff;
}

.cta-box p {
    max-width: 670px;
    color: rgba(255, 255, 255, .73);
}

.cta-box .button {
    color: var(--navy-950);
    background: var(--gold-500);
    border-color: var(--gold-500);
}

.content-wrap {
    width: min(calc(100% - 40px), 900px);
    margin-inline: auto;
    padding: clamp(60px, 8vw, 100px) 0;
}

.page-header {
    padding: 75px 0 55px;
    background:
        linear-gradient(135deg, var(--surface-soft), var(--teal-100));
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.entry-content > * {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
}

.entry-content > .alignwide {
    max-width: 1100px;
}

.entry-content h2 {
    margin-top: 2.2rem;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.entry-content h3 {
    margin-top: 1.8rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
}

.program-grid {
    display: grid;
    max-width: 1050px !important;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.program-box {
    padding: 26px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.tilawa-form {
    max-width: 720px;
    padding: clamp(24px, 5vw, 40px);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
    margin-bottom: 18px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--navy-950);
    font-size: 14px;
    font-weight: 780;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 13px 15px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cbd3dc;
    border-radius: 11px;
    outline: none;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--teal-700);
    box-shadow: 0 0 0 3px rgba(15, 111, 104, .12);
}

.form-field textarea {
    min-height: 135px;
    resize: vertical;
}

.form-status {
    margin-bottom: 20px;
    padding: 13px 16px;
    border-radius: 10px;
}

.form-status-success {
    color: #075f3f;
    background: #dcf7ea;
}

.form-status-error {
    color: #8a2020;
    background: #fee7e7;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
}

.posts-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.post-meta {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    padding: 70px 0 24px;
    color: rgba(255, 255, 255, .72);
    background: var(--navy-950);
}

.footer-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1.4fr 1fr 1fr;
}

.site-footer h2,
.site-footer h3 {
    color: #fff;
}

.site-footer a {
    color: rgba(255, 255, 255, .82);
}

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

.footer-bottom {
    margin-top: 46px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 13px;
}

.not-found {
    padding: 120px 0;
    text-align: center;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 960px) {
    .desktop-navigation,
    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: grid;
    }

    .mobile-navigation {
        padding: 12px 0 22px;
        border-top: 1px solid var(--line);
    }

    .mobile-navigation.is-open {
        display: block;
    }

    .mobile-navigation ul {
        display: grid;
        margin: 0;
        padding: 0;
        gap: 4px;
        list-style: none;
    }

    .mobile-navigation a {
        display: block;
        padding: 11px 3px;
        color: var(--ink);
        font-weight: 700;
        text-decoration: none;
    }

    .hero-grid,
    .cta-box {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 580px;
    }

    .cards,
    .program-grid,
    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body.admin-bar .site-header {
        top: 46px;
    }

    .container,
    .content-wrap {
        width: min(calc(100% - 28px), var(--container));
    }

    .top-strip {
        font-size: 12px;
    }

    .header-inner {
        min-height: 68px;
    }

    .hero {
        padding-top: 65px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .cards,
    .program-grid,
    .posts-grid,
    .steps,
    .footer-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-full {
        grid-column: auto;
    }

    .cta-box {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* BEGIN TILAWA MULTILINGUAL */

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

.language-switcher {
    display: inline-flex;
    padding: 4px;
    align-items: center;
    gap: 3px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.language-switcher a {
    display: inline-flex;
    min-width: 35px;
    min-height: 33px;
    padding: 5px 9px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a.is-current {
    color: #fff;
    background: var(--navy-900);
}

.mobile-language {
    margin: 12px 0 18px;
}

.mobile-language .language-switcher {
    width: 100%;
    justify-content: center;
}

html[dir="rtl"] body {
    font-family:
        Tahoma, Arial, system-ui, sans-serif;
}

html[dir="rtl"] .hero,
html[dir="rtl"] .section,
html[dir="rtl"] .page-header,
html[dir="rtl"] .content-wrap,
html[dir="rtl"] .site-footer {
    text-align: right;
}

html[dir="rtl"] .hero-points,
html[dir="rtl"] .primary-navigation ul {
    padding-right: 0;
}

html[dir="rtl"] .entry-content ul,
html[dir="rtl"] .entry-content ol {
    padding-right: 1.4rem;
    padding-left: 0;
}

html[dir="rtl"] .hp-field {
    right: -9999px !important;
    left: auto !important;
}

@media (max-width: 1050px) {
    .header-language {
        display: none;
    }
}

/* END TILAWA MULTILINGUAL */

/* BEGIN TILAWA GEO PAGES */

.geo-intro {
    margin-bottom: 28px;
    padding: 22px 25px;
    background: var(--teal-100);
    border-inline-start: 5px solid var(--teal-700);
    border-radius: var(--radius-sm);
}

.entry-content .button {
    margin-top: 10px;
}

.entry-content > h2 {
    scroll-margin-top: 110px;
}

.entry-content > ul {
    margin-bottom: 30px;
}

.entry-content > ul li {
    margin-bottom: 8px;
}

/* END TILAWA GEO PAGES */
