/* =========================================================================
   TAMSYA Website Theme — modern layout, classic typography.
   All colours come from the brand settings (see brandPalette() and the
   :root variables printed in layouts/website_layout.blade.php).
   ========================================================================= */

:root {
    --t-font-body: "Inter", "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --t-font-display: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;

    --t-ink: #1c1f26;
    --t-ink-soft: #4a5160;
    --t-muted: #6b7280;
    --t-line: #e7e3da;
    --t-paper: #fbfaf7;
    --t-surface: #ffffff;

    --t-radius-sm: 8px;
    --t-radius: 14px;
    --t-radius-lg: 22px;
    --t-shadow-sm: 0 1px 2px rgba(17, 24, 39, .06), 0 1px 3px rgba(17, 24, 39, .05);
    --t-shadow: 0 10px 30px -12px rgba(17, 24, 39, .18);
    --t-shadow-lg: 0 24px 60px -20px rgba(var(--t-primary-rgb), .35);
    --t-ease: cubic-bezier(.2, .7, .2, 1);

    /* Subtle eight-point star lattice used on brand surfaces */
    --t-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1'%3E%3Cpath d='M28 6l6.5 15.5L50 28l-15.5 6.5L28 50l-6.5-15.5L6 28l15.5-6.5z'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
    font-family: var(--t-font-body);
    color: var(--t-ink);
    background: var(--t-paper);
    -webkit-font-smoothing: antialiased;
    line-height: 1.65;
}
h1, h2, h3, h4, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--t-font-display);
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--t-ink);
    line-height: 1.15;
}
h5, h6 { font-family: var(--t-font-body); font-weight: 600; }
p { color: var(--t-ink-soft); }
a { color: var(--t-primary); transition: color .2s var(--t-ease); }
a:hover { color: var(--t-primary-dark); }
::selection { background: var(--t-accent); color: var(--t-on-accent); }
img { max-width: 100%; }

.text-brand1 { color: var(--t-primary) !important; }
.bg-brand1 { background-color: var(--t-primary) !important; }
.text-accent { color: var(--t-accent) !important; }
.bg-paper { background: var(--t-paper) !important; }
.bg-light { background-color: var(--t-primary-tint) !important; }
.text-primary { color: var(--t-primary) !important; }
.bg-primary { background-color: var(--t-primary) !important; }
.border-primary { border-color: var(--t-primary) !important; }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: .01em; transition: all .25s var(--t-ease); }
.btn-lg { padding: .8rem 1.9rem; font-size: 1rem; }
.btn-brand-solid,
.btn-primary {
    background: var(--t-primary) !important;
    border: 2px solid var(--t-primary) !important;
    color: var(--t-on-primary) !important;
    box-shadow: 0 8px 20px -10px rgba(var(--t-primary-rgb), .7);
}
.btn-brand-solid:hover, .btn-brand-solid:focus,
.btn-primary:hover, .btn-primary:focus {
    background: var(--t-primary-dark) !important;
    border-color: var(--t-primary-dark) !important;
    color: var(--t-on-primary) !important;
    transform: translateY(-1px);
}
.btn-outline-brand1,
.btn-outline-primary {
    background: transparent !important;
    border: 2px solid var(--t-primary) !important;
    color: var(--t-primary) !important;
}
.btn-outline-brand1:hover, .btn-outline-primary:hover,
.btn-outline-primary.active, .btn-check:checked + .btn-outline-primary {
    background: var(--t-primary) !important;
    color: var(--t-on-primary) !important;
}
.btn-accent {
    background: var(--t-accent); border: 2px solid var(--t-accent); color: var(--t-on-accent);
}
.btn-accent:hover { filter: brightness(.94); color: var(--t-on-accent); transform: translateY(-1px); }
.btn-ghost-light {
    border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; background: rgba(255, 255, 255, .06);
}
.btn-ghost-light:hover { background: #fff; color: var(--t-primary); }
.btn:focus-visible, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 .25rem rgba(var(--t-primary-rgb), .18) !important;
    border-color: var(--t-primary) !important;
}

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: 10px; border-color: var(--t-line); padding: .7rem .95rem; background-color: #fff;
}
.form-control-lg { border-radius: 12px; }
.form-label { font-weight: 600; font-size: .9rem; color: var(--t-ink); }

/* ---------- Section heading (classic ornament) ---------- */
.section-title { text-align: center; }
.section-title h1, .section-title h2, .section-title h3 {
    text-transform: none !important;
    color: var(--t-ink) !important;
    font-weight: 700 !important;
    margin-bottom: .75rem !important;
}
.section-title .lead { font-size: 1.05rem; color: var(--t-muted) !important; }
.section-eyebrow {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--t-font-body); font-size: .76rem; font-weight: 700;
    letter-spacing: .22em; text-transform: uppercase; color: var(--t-accent);
    margin-bottom: .75rem;
}
.section-eyebrow::before, .section-eyebrow::after {
    content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6;
}
.section-title h1::after, .section-title h2::after, .section-title h3::after {
    content: ""; display: block; width: 72px; height: 10px; margin: 1rem auto 0;
    background:
        linear-gradient(var(--t-accent), var(--t-accent)) left center / 28px 1px no-repeat,
        linear-gradient(var(--t-accent), var(--t-accent)) right center / 28px 1px no-repeat,
        linear-gradient(45deg, transparent 40%, var(--t-accent) 40%, var(--t-accent) 60%, transparent 60%) center / 10px 10px no-repeat;
}
.section { padding: 5.5rem 0; }
.section-sm { padding: 3.5rem 0; }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--t-primary-deep) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: .82rem; padding: .45rem 0 !important;
}
.topbar, .topbar a, .topbar small, .topbar .topbar-contact-item { color: rgba(255, 255, 255, .82) !important; }
.topbar a:hover { color: #fff !important; }
.topbar .icon { color: var(--t-accent) !important; margin-right: .4rem; }
.topbar .status-badge { font-weight: 600; font-size: .68rem; letter-spacing: .04em; }
.topbar .status-badge.open { background: rgba(34, 197, 94, .18) !important; color: #86efac !important; }
.topbar .status-badge.closed { background: rgba(239, 68, 68, .18) !important; color: #fca5a5 !important; }
.topbar-socials a {
    display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    margin-left: .5rem !important; transition: background .2s;
}
.topbar-socials a:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Navbar ---------- */
.navbar-custom {
    background: rgba(255, 255, 255, .92) !important;
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid rgba(17, 24, 39, .06);
    padding: .65rem 0 !important;
    transition: box-shadow .3s var(--t-ease), padding .3s var(--t-ease);
}
.navbar-custom.is-scrolled { box-shadow: 0 10px 30px -18px rgba(17, 24, 39, .35); padding: .4rem 0 !important; }
.navbar-custom .navbar-brand img { max-height: 54px; transition: max-height .3s var(--t-ease); }
.navbar-custom.is-scrolled .navbar-brand img { max-height: 44px; }
.navbar-custom .nav-link {
    position: relative; font-weight: 600; font-size: .93rem;
    color: var(--t-ink) !important; padding: .55rem .9rem !important;
}
.navbar-custom .nav-link::after {
    content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem; height: 2px;
    background: var(--t-accent) !important; border-radius: 2px;
    transform: scaleX(0); transform-origin: center; transition: transform .25s var(--t-ease);
}
.navbar-custom .nav-link:hover, .navbar-custom .nav-link.active { color: var(--t-primary) !important; }
.navbar-custom .nav-link:hover::after, .navbar-custom .nav-link.active::after { transform: scaleX(1); }
.navbar-custom .dropdown-toggle::after { border: none !important; }
.navbar-custom .dropdown-menu {
    border: 1px solid var(--t-line); border-radius: var(--t-radius); padding: .5rem;
    box-shadow: var(--t-shadow); min-width: 14rem;
}
.navbar-custom .dropdown-item { border-radius: 8px; padding: .55rem .85rem; font-weight: 500; color: var(--t-ink); }
.navbar-custom .dropdown-item:hover, .navbar-custom .dropdown-item.active {
    background: var(--t-primary-soft) !important; color: var(--t-primary) !important;
}
.navbar-custom .navbar-toggler { border: 1px solid var(--t-line); border-radius: 10px; padding: .45rem .6rem; }
.navbar-custom .navbar-cta .btn { padding: .5rem 1.15rem; font-size: .88rem; }
@media (max-width: 991.98px) {
    .navbar-custom .navbar-collapse {
        margin-top: .75rem; padding: .75rem; border-radius: var(--t-radius);
        background: #fff; border: 1px solid var(--t-line); box-shadow: var(--t-shadow);
    }
    .navbar-custom .nav-link::after { display: none; }
    .navbar-custom .nav-link.active { background: var(--t-primary-soft); border-radius: 8px; }
    .navbar-custom .mobile-cta { display: flex !important; }
}

/* ---------- Page header (inner pages) ---------- */
.page-hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        var(--t-pattern),
        radial-gradient(1200px 400px at 85% -10%, rgba(var(--t-accent-rgb), .35), transparent 60%),
        linear-gradient(135deg, var(--t-primary-deep), var(--t-primary) 70%);
    padding: 5rem 0 4.5rem;
}
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: .5rem; }
.page-hero p { color: rgba(255, 255, 255, .82); max-width: 640px; margin: 0 auto; font-size: 1.06rem; }
.page-hero .breadcrumb { justify-content: center; margin: 1.25rem 0 0; font-size: .85rem; }
.page-hero .breadcrumb-item, .page-hero .breadcrumb-item a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.page-hero .breadcrumb-item.active { color: var(--t-accent); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .4); }
.page-hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
    background: var(--t-paper); clip-path: ellipse(60% 100% at 50% 100%);
}

/* ---------- Cards ---------- */
.card { border: 1px solid var(--t-line); border-radius: var(--t-radius); box-shadow: var(--t-shadow-sm); }
.t-card {
    background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius);
    box-shadow: var(--t-shadow-sm); transition: transform .35s var(--t-ease), box-shadow .35s var(--t-ease);
}
.t-card:hover, .hover-lift:hover { transform: translateY(-6px); box-shadow: var(--t-shadow); }
.initiative-card {
    border-radius: var(--t-radius) !important; border: 1px solid var(--t-line) !important;
    box-shadow: var(--t-shadow-sm) !important; overflow: hidden; background: #fff;
}
.initiative-card:hover { box-shadow: var(--t-shadow) !important; }
.initiative-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; height: auto !important; }

/* ---------- Home: hero carousel ---------- */
.home-hero { position: relative; }
.home-hero .carousel { border-radius: var(--t-radius-lg); overflow: hidden; box-shadow: var(--t-shadow-lg); }
.home-hero .carousel-indicators [data-bs-target] { width: 28px; height: 4px; border-radius: 4px; }
.home-hero .carousel-control-prev, .home-hero .carousel-control-next { width: 7%; }
.home-hero .carousel-control-prev-icon, .home-hero .carousel-control-next-icon {
    width: 46px; height: 46px; border-radius: 50%; background-color: rgba(0, 0, 0, .35); background-size: 45%;
}

/* ---------- Home: about + president ---------- */
.about-band {
    position: relative; border-radius: var(--t-radius-lg); overflow: hidden; color: #fff;
    background:
        var(--t-pattern),
        radial-gradient(800px 300px at 0% 0%, rgba(var(--t-accent-rgb), .28), transparent 60%),
        linear-gradient(135deg, var(--t-primary-deep), var(--t-primary));
    box-shadow: var(--t-shadow-lg);
}
.about-band .about-copy { padding: 3.25rem; }
.about-band h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 2.9rem); }
.about-band p { color: rgba(255, 255, 255, .85); font-size: 1.04rem; text-align: justify; }
.about-band .section-eyebrow { color: var(--t-accent); }
.about-band .about-facts { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin: 1.75rem 0; }
.about-band .about-facts div { border-left: 2px solid var(--t-accent); padding-left: .85rem; }
.about-band .about-facts strong { display: block; font-family: var(--t-font-display); font-size: 1.7rem; color: #fff; line-height: 1.1; }
.about-band .about-facts span { font-size: .8rem; color: rgba(255, 255, 255, .7); text-transform: uppercase; letter-spacing: .08em; }

.president-card {
    position: relative; margin: 2rem; background: #fff; border-radius: var(--t-radius);
    padding: .75rem .75rem 1.4rem; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .55); text-align: center;
}
.president-card::before {
    content: ""; position: absolute; inset: -10px; border: 1px solid rgba(var(--t-accent-rgb), .6);
    border-radius: calc(var(--t-radius) + 8px); pointer-events: none;
}
.president-card .president-photo {
    aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: top center;
    border-radius: calc(var(--t-radius) - 4px); background: var(--t-primary-soft);
}
.president-card .president-badge {
    display: inline-block; margin-top: -1.1rem; position: relative;
    background: var(--t-accent); color: var(--t-on-accent);
    font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    padding: .35rem .9rem; border-radius: 999px;
}
.president-card h5 { font-family: var(--t-font-display); font-size: 1.45rem; margin: .7rem 0 .1rem; color: var(--t-ink); }
.president-card small { color: var(--t-muted); }

/* ---------- CTA bands ---------- */
.cta-band {
    border-radius: var(--t-radius-lg); padding: 2.75rem; color: #fff; position: relative; overflow: hidden;
    background: var(--t-pattern), linear-gradient(120deg, var(--t-primary), var(--t-primary-dark));
    box-shadow: var(--t-shadow-lg);
}
.cta-band.cta-accent { background: var(--t-pattern), linear-gradient(120deg, var(--t-primary-dark), var(--t-primary-deep)); }
.cta-band h3 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: rgba(255, 255, 255, .82); margin-bottom: 0; }
.cta-band .cta-icon {
    width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem;
    background: rgba(255, 255, 255, .1); color: var(--t-accent); flex-shrink: 0;
}
.donate-banner, .about-section { border-radius: var(--t-radius-lg) !important; }

/* ---------- News ---------- */
.card-news-featured { border-radius: var(--t-radius) !important; }
.card-news-featured img { aspect-ratio: 16 / 9; object-fit: cover; }
.news-category-badge {
    background: var(--t-primary-soft) !important; color: var(--t-primary) !important;
    border-radius: 999px !important; font-weight: 600 !important; font-size: .72rem !important;
    letter-spacing: .04em; text-decoration: none;
}
.news-secondary-item { padding: 1rem; border-radius: var(--t-radius); transition: background .2s; }
.news-secondary-item:hover { background: #fff; box-shadow: var(--t-shadow-sm); }
.news-secondary-item .news-thumb { border-radius: 10px !important; object-fit: cover; }
.news-secondary-item h6 a { color: var(--t-ink) !important; }
.news-secondary-item h6 a:hover { color: var(--t-primary) !important; }

/* ---------- Tabs ---------- */
#initiativesTab { gap: .5rem; }
#initiativesTab .nav-link {
    border: 1px solid var(--t-line) !important; border-radius: 999px !important; color: var(--t-ink-soft) !important;
    font-weight: 600; padding: .55rem 1.35rem; background: #fff;
}
#initiativesTab .nav-link.active { background: var(--t-primary) !important; color: var(--t-on-primary) !important; border-color: var(--t-primary) !important; }

/* ---------- Leaders ---------- */
.leader-tile {
    background: #fff; border: 1px solid var(--t-line); border-radius: var(--t-radius); overflow: hidden;
    height: 100%; display: flex; flex-direction: column;
    transition: transform .35s var(--t-ease), box-shadow .35s var(--t-ease);
}
.leader-tile:hover { transform: translateY(-6px); box-shadow: var(--t-shadow); }
.leader-tile .leader-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--t-primary-soft); }
.leader-tile .leader-photo img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s var(--t-ease);
}
.leader-tile:hover .leader-photo img { transform: scale(1.05); }
.leader-tile .leader-rank {
    position: absolute; top: .75rem; left: .75rem; background: rgba(255, 255, 255, .92); color: var(--t-primary);
    font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: .3rem .65rem; border-radius: 999px;
}
.leader-tile .leader-contacts {
    position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: .5rem; padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent);
    transform: translateY(100%); transition: transform .3s var(--t-ease);
}
.leader-tile:hover .leader-contacts, .leader-tile:focus-within .leader-contacts { transform: translateY(0); }
.leader-tile .leader-contacts a {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--t-primary);
}
.leader-tile .leader-contacts a.wa { color: #16a34a; }
.leader-tile .leader-body { padding: 1.1rem 1rem 1.3rem; text-align: center; }
.leader-tile .leader-body h5 { font-family: var(--t-font-display); font-size: 1.3rem; margin-bottom: .2rem; color: var(--t-ink); }
.leader-tile .leader-body .position { color: var(--t-primary); font-weight: 600; font-size: .88rem; margin: 0; }
.leader-tile .leader-body .dept { color: var(--t-muted); font-size: .8rem; }

.leader-spotlight {
    background: #fff; border: 1px solid var(--t-line); border-radius: var(--t-radius-lg);
    overflow: hidden; box-shadow: var(--t-shadow);
}
.leader-spotlight .spot-photo { position: relative; min-height: 360px; height: 100%; background: var(--t-primary-soft); }
.leader-spotlight .spot-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.leader-spotlight .spot-body { padding: 3rem; }
.leader-spotlight .spot-body h3 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: .25rem; }
.leader-spotlight .spot-body .position { color: var(--t-primary); font-weight: 700; letter-spacing: .02em; }
.leader-spotlight blockquote {
    font-family: var(--t-font-display); font-style: italic; font-size: 1.3rem; color: var(--t-ink-soft);
    border-left: 3px solid var(--t-accent); padding-left: 1.1rem; margin: 1.5rem 0;
}
.term-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.term-switch .btn { border: 1px solid var(--t-line); background: #fff; color: var(--t-ink-soft); }
.term-switch .btn.active { background: var(--t-primary); color: var(--t-on-primary); border-color: var(--t-primary); }
.rank-divider {
    display: flex; align-items: center; gap: 1rem; margin: 3rem 0 1.5rem; color: var(--t-muted);
    font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.rank-divider::before, .rank-divider::after { content: ""; flex: 1; height: 1px; background: var(--t-line); }

/* ---------- Donate ---------- */
.donate-wrap { margin-top: -3rem; position: relative; z-index: 2; }
.donate-aside {
    border-radius: var(--t-radius-lg); color: #fff; padding: 2.5rem; height: 100%;
    background: var(--t-pattern), linear-gradient(160deg, var(--t-primary), var(--t-primary-deep));
    box-shadow: var(--t-shadow-lg);
}
.donate-aside h3 { color: #fff; }
.donate-aside p, .donate-aside li { color: rgba(255, 255, 255, .85); }
.donate-aside .impact-item { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.1rem; }
.donate-aside .impact-item i {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
    background: rgba(255, 255, 255, .1); color: var(--t-accent);
}
.donate-aside .impact-item strong { color: #fff; display: block; }
.donate-aside .ayah {
    font-family: var(--t-font-display); font-style: italic; font-size: 1.15rem; line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 1.25rem; margin-top: 1.5rem; color: rgba(255, 255, 255, .9);
}
.donate-card { border-radius: var(--t-radius-lg); border: 1px solid var(--t-line); background: #fff; box-shadow: var(--t-shadow); }
.donate-card .nav-pills { background: var(--t-primary-tint); padding: .35rem; border-radius: 999px; display: inline-flex; }
.donate-card .nav-pills .nav-link { border-radius: 999px; color: var(--t-ink-soft); font-weight: 600; padding: .55rem 1.2rem; }
.donate-card .nav-pills .nav-link.active { background: var(--t-primary) !important; color: var(--t-on-primary) !important; box-shadow: var(--t-shadow-sm); }
.donate-step-label {
    display: flex; align-items: center; gap: .6rem; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--t-muted); margin: 1.5rem 0 .85rem;
}
.donate-step-label span {
    width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; letter-spacing: 0;
    background: var(--t-primary-soft); color: var(--t-primary);
}
.currency-switcher .btn-group { background: var(--t-primary-tint); padding: .25rem; border-radius: 999px; }
.currency-switcher .btn { border: none !important; border-radius: 999px !important; padding: .4rem 1rem; color: var(--t-ink-soft); font-weight: 600; }
.currency-switcher .btn-check:checked + .btn { background: #fff !important; color: var(--t-primary) !important; box-shadow: var(--t-shadow-sm); }
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; }
@media (max-width: 575.98px) { .amount-grid { grid-template-columns: repeat(2, 1fr); } }
.amount-grid .btn {
    border-radius: 14px !important; padding: .9rem .5rem; font-size: 1.05rem; font-weight: 700;
    border: 1.5px solid var(--t-line) !important; background: #fff !important; color: var(--t-ink) !important; box-shadow: none;
}
.amount-grid .btn:hover { border-color: var(--t-primary) !important; color: var(--t-primary) !important; }
.amount-grid .btn.btn-primary { background: var(--t-primary) !important; border-color: var(--t-primary) !important; color: var(--t-on-primary) !important; }
.custom-amount-wrap { position: relative; }
.custom-amount-wrap .currency-tag {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--t-muted); font-size: .9rem;
}
.custom-amount-wrap input { padding-left: 4.2rem !important; }
.pay-option {
    display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: 14px; cursor: pointer;
    border: 1.5px solid var(--t-line); background: #fff; height: 100%; transition: all .2s var(--t-ease);
}
.pay-option i { font-size: 1.5rem; color: var(--t-muted); width: 32px; text-align: center; }
.pay-option strong { display: block; color: var(--t-ink); }
.pay-option small { color: var(--t-muted); }
.mt-payment-selector:checked + .pay-option { border-color: var(--t-primary); background: var(--t-primary-tint); box-shadow: 0 0 0 3px rgba(var(--t-primary-rgb), .12); }
.mt-payment-selector:checked + .pay-option i { color: var(--t-primary); }
.donate-summary {
    display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-radius: 12px;
    background: var(--t-primary-tint); border: 1px dashed rgba(var(--t-primary-rgb), .3); margin-top: 1.25rem;
}
.donate-summary strong { font-size: 1.35rem; color: var(--t-primary); font-family: var(--t-font-display); }
.manual-payment-option { border-radius: 14px !important; border: 1px solid var(--t-line) !important; transition: box-shadow .2s; }
.manual-payment-option:hover { box-shadow: var(--t-shadow-sm); }
.manual-payment-option .bank-mark {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: .8rem;
    background: var(--t-primary-soft); color: var(--t-primary); flex-shrink: 0;
}
.secure-note { font-size: .8rem; color: var(--t-muted); }

/* Payment confirmation modal */
.pay-modal .modal-content { border: 0; border-radius: var(--t-radius-lg); overflow: hidden; }
.pay-modal .pay-modal-head {
    background: var(--t-pattern), linear-gradient(135deg, var(--t-primary), var(--t-primary-deep));
    color: #fff; padding: 1.5rem 1.5rem 1.25rem; text-align: center; position: relative;
}
.pay-modal .pay-modal-head h5 { color: #fff; margin: 0; font-family: var(--t-font-display); font-size: 1.6rem; }
.pay-modal .pay-modal-head .btn-close { position: absolute; right: 1rem; top: 1rem; filter: invert(1); opacity: .7; }
.pay-modal .pay-amount { font-size: .95rem; color: rgba(255, 255, 255, .8); margin-top: .25rem; }
.pay-ring { position: relative; width: 132px; height: 132px; margin: 0 auto 1.25rem; }
.pay-ring svg { transform: rotate(-90deg); }
.pay-ring .ring-bg { stroke: var(--t-primary-soft); }
.pay-ring .ring-fg { stroke: var(--t-primary); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.pay-ring .ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.pay-ring .ring-center i { font-size: 2rem; color: var(--t-primary); animation: t-pulse 1.6s ease-in-out infinite; }
.pay-ring .ring-center small { display: block; font-weight: 700; color: var(--t-ink); margin-top: .2rem; font-variant-numeric: tabular-nums; }
@keyframes t-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .75; } }
.pay-steps { list-style: none; padding: 0; margin: 1.25rem 0 0; text-align: left; }
.pay-steps li { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; color: var(--t-muted); font-size: .92rem; }
.pay-steps li .dot {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: .75rem;
    border: 2px solid var(--t-line); color: transparent; background: #fff;
}
.pay-steps li.done { color: var(--t-ink); }
.pay-steps li.done .dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.pay-steps li.active { color: var(--t-ink); font-weight: 600; }
.pay-steps li.active .dot { border-color: var(--t-primary); border-top-color: transparent; animation: t-spin .9s linear infinite; }
@keyframes t-spin { to { transform: rotate(360deg); } }
.pay-result-icon { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; font-size: 2.6rem; }
.pay-result-icon.success { background: #dcfce7; color: #16a34a; animation: t-pop .45s var(--t-ease); }
.pay-result-icon.error { background: #fee2e2; color: #dc2626; animation: t-pop .45s var(--t-ease); }
.pay-result-icon.warn { background: #fef3c7; color: #d97706; }
@keyframes t-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Downloads / partners ---------- */
.download-card, .partner-card { border-radius: var(--t-radius) !important; border: 1px solid var(--t-line) !important; background: #fff !important; }
.partner-card img { filter: grayscale(100%); opacity: .75; transition: all .3s var(--t-ease); }
.partner-card:hover img { filter: none; opacity: 1; }
.google-map-section iframe { border-radius: var(--t-radius-lg); border: 0; width: 100%; min-height: 380px; box-shadow: var(--t-shadow); }

/* ---------- Footer ---------- */
.footer-modern {
    background: var(--t-pattern), linear-gradient(180deg, var(--t-primary-deep), #0b0d12) !important;
    color: rgba(255, 255, 255, .72) !important; margin-top: 0 !important;
}
.footer-modern p, .footer-modern a { color: rgba(255, 255, 255, .72) !important; }
.footer-modern a:hover { color: #fff !important; }
.footer-modern .footer-heading { color: #fff !important; font-family: var(--t-font-display); font-size: 1.35rem; font-weight: 700; }
.footer-modern .footer-heading::after { background: var(--t-accent) !important; }
.footer-modern .contact-info p i { color: var(--t-accent) !important; }
.footer-modern .social-icons .btn-social {
    width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .18) !important; background: transparent !important; color: #fff !important;
}
.footer-modern .social-icons .btn-social:hover { background: var(--t-accent) !important; border-color: var(--t-accent) !important; color: var(--t-on-accent) !important; }
.footer-modern .copyright { border-top: 1px solid rgba(255, 255, 255, .08) !important; background: transparent !important; padding: 1.25rem 0 !important; font-size: .85rem; }
.footer-modern .newsletter-input { border-radius: 999px 0 0 999px !important; border: 0; }
.footer-modern .newsletter-btn { border-radius: 0 999px 999px 0 !important; background: var(--t-accent) !important; color: var(--t-on-accent) !important; border: 0 !important; }

.back-to-top {
    background: var(--t-primary) !important; border: 0 !important; border-radius: 50% !important;
    box-shadow: var(--t-shadow); color: var(--t-on-primary) !important;
}

/* ---------- Utilities ---------- */
.rounded-xl { border-radius: var(--t-radius-lg) !important; }
.text-balance { text-wrap: balance; }
.empty-state { padding: 4rem 1rem; text-align: center; color: var(--t-muted); }
.empty-state i { font-size: 2.5rem; color: var(--t-primary-soft); margin-bottom: 1rem; display: block; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Bootstrap 5.0 has no fw-semibold */
.fw-semibold { font-weight: 600 !important; }

/* Bootstrap SVG icons with the old blue baked in (CSS variables can't enter data URIs): use neutral versions */
.form-switch .form-check-input:focus:not(:checked) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,.35%29'/%3e%3c/svg%3e");
}
.accordion-button:not(.collapsed) { color: var(--t-primary); background-color: var(--t-primary-tint); }
.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Legacy template blocks (style.css) that hardcoded blue gradients */
.appointment { background: var(--t-pattern), linear-gradient(120deg, var(--t-primary), var(--t-primary-dark)) !important; }
.container.facts .facts-text { background: var(--t-pattern), linear-gradient(var(--t-primary), var(--t-primary-dark)) !important; }

/* Bootstrap row gutters (g-5) are wider than the container padding on phones; never allow sideways scrolling.
   "clip" (unlike "hidden") keeps the sticky navbar working. */
html, body { overflow-x: clip; max-width: 100%; }

/* ---------- Footer newsletter band ---------- */
.newsletter-band {
    position: relative; overflow: hidden; border-radius: var(--t-radius-lg, 22px); padding: 1.75rem 2rem;
    background: linear-gradient(120deg, rgba(var(--t-primary-rgb), .55), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .12); color: #fff;
}
.newsletter-band h4 { color: #fff; font-family: var(--t-font-display); font-weight: 700; }
.newsletter-band p { color: rgba(255, 255, 255, .78) !important; }
.newsletter-band .newsletter-star { position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; background: var(--t-accent); opacity: .12; }
.newsletter-fields { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter-fields .form-control { flex: 1 1 180px; min-width: 0; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .1); color: #fff; padding: .65rem 1.1rem; }
.newsletter-fields .form-control::placeholder { color: rgba(255, 255, 255, .6); }
.newsletter-fields .form-control:focus { background: rgba(255, 255, 255, .16); border-color: var(--t-accent); box-shadow: none; color: #fff; }
.newsletter-fields .newsletter-btn { flex: 0 0 auto; border-radius: 999px !important; padding: .65rem 1.4rem; font-weight: 600; }
.newsletter-msg { min-height: 1.25rem; color: rgba(255, 255, 255, .85); }
.newsletter-msg.is-error { color: #ffd2cc; }
@media (max-width: 575.98px) {
    .newsletter-band { padding: 1.4rem 1.1rem; }
    .newsletter-fields .newsletter-btn { width: 100%; }
}
