/* 
 * Southcity Narrative - Design System
 * Based on DESIGN.md and screen.png
 */

:root {
    /* Colors */
    --clay-terracotta: #1c412f;
    --warm-ochre: #274c3a;
    --warm-paper: #fcf9f6;
    --soft-sand: #f0eee9;
    --on-surface: #32332f;
    --on-surface-variant: #5f5f5b;
    --surface-variant: #e3e3dd;
    --white: #ffffff;
    --clay-dim: #274c3a;

    /* Spacing */
    --space-xs: 4px;
    --space-base: 8px;
    --space-sm: 12px;
    --space-md: 24px;
    --space-lg: 48px;
    --space-xl: 80px;

    /* Layout */
    --container-max: 1280px;
    --gutter: 48px;

    /* Radius */
    --rounded-sm: 0.25rem;
    --rounded-default: 0.5rem;
    --rounded-md: 0.75rem;
    --rounded-lg: 1rem;
    --rounded-xl: 1.5rem;
    --rounded-full: 9999px;

    /* Shadows */
    --shadow-ambient: 0px 12px 32px rgba(161, 64, 19, 0.08);
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--white);
    color: var(--on-surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
.display-font {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.display {
    font-size: clamp(40px, 8vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(48px, 6vw, 64px);
    font-weight: 700;
    color: #1a1a1a;
}

h2 {
    font-size: clamp(32px, 4vw, 40px);
    font-weight: 700;
}

h3 {
    font-size: 28px;
    font-weight: 700;
}

h4 {
    font-size: 18px;
    font-weight: 700;
}

.body-lg {
    font-size: 20px;
    line-height: 1.6;
    color: #4a4a4a;
}

.body-md {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
}

.label-caps {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.0;
}

/* Layout Structure */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }
}

section {
    padding: var(--space-xl) 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: var(--space-xl);
}

.grid-2-1-rev {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
    gap: var(--space-xl);
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
}

/* Prevent grid children from overflowing on small screens */
.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.grid-2-1 > *,
.grid-2-1-rev > *,
.grid-1-2 > *,
.hero-split > *,
.events-page-grid > * {
    min-width: 0;
}

.gap-md {
    gap: var(--space-md);
}

/* Header & Nav */
header {
    background: var(--white);
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px;
    padding-top: 10px;
}

nav ul {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    align-items: center;
}

nav ul li a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--clay-terracotta);
}

/* Keep Plan Your Visit button white on hover */
nav ul li a.btn-primary:hover {
    color: var(--white);
}

/* ─── Admin Dropdown Navigation ────────────────────────────────────────── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown .dropdown-arrow {
    font-size: 10px;
    transition: transform 0.25s ease;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border: 1px solid #f0f0f0;
    border-radius: var(--rounded-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: var(--space-xs) 0;
    min-width: 180px;
    z-index: 1001;
    list-style: none;
    margin-top: 8px;
}

/* Invisible bridge — keeps hover alive while moving from trigger to menu */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--on-surface);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
    background: var(--warm-paper);
    color: var(--clay-terracotta);
}

.dropdown-menu li a i {
    width: 16px;
    text-align: center;
    color: var(--clay-terracotta);
    font-size: 13px;
}

/* ─── Mobile Menu Toggle (Hamburger) ──────────────────────────────────── */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--on-surface);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ─── Mobile Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background: var(--white);
        padding: var(--space-md);
        gap: 0;
        overflow-y: auto;
        z-index: 999;
    }

    nav ul.open {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        font-size: 15px;
        border-bottom: 1px solid #f5f5f5;
    }

    /* Add spacing before the Plan Your Visit button in mobile menu */
    nav ul li:last-child {
        margin-top: var(--space-md);
    }
    nav ul li:last-child a {
        border-bottom: none;
    }

    /* Mobile dropdown */
    .nav-dropdown {
        position: static;
    }

    .nav-dropdown .dropdown-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 14px 16px;
        font-size: 15px;
        border-bottom: 1px solid #f5f5f5;
        cursor: pointer;
    }

    .dropdown-menu {
        display: none;
        position: static;
        transform: none;
        left: auto;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-top: 0;
        padding: 0;
        background: var(--warm-paper);
    }

    .nav-dropdown:hover .dropdown-menu {
        display: none;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 12px 16px 12px 44px;
        border-bottom: 1px solid #eee;
        font-size: 14px;
    }
}

/* Hero Section */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-left {
    padding-right: var(--space-lg);
}

/* Reversed hero — image left, text right */
.hero-reversed .hero-left {
    order: 2;
    padding-right: 0;
    padding-left: var(--space-lg);
}

.hero-reversed .hero-right {
    order: 1;
}

.hero-split-img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: var(--rounded-lg);
}

/* Ministries List */
.ministries-list h2 {
    color: var(--clay-terracotta);
}

.mini-item {
    display: flex;
    gap: var(--space-md);
    transition: all 0.3s ease;
    padding: 12px;
    border-radius: var(--rounded-md);
}

.mini-item:hover {
    background: var(--white);
    transform: translateX(10px);
    box-shadow: var(--shadow-ambient);
}

.mini-item:hover .mini-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--clay-terracotta);
    color: var(--white);
}

.mini-icon {
    width: 48px;
    height: 48px;
    background: #fffcf9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clay-terracotta);
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Cards */
.card {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--rounded-lg);
    border: 1px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(161, 64, 19, 0.12);
    border-color: var(--warm-ochre);
}

.featured-main {
    height: 350px;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url('../assets/latest_sermons.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--white);
    border: none;
}

.card-badge {
    align-self: flex-start;
    background: var(--clay-terracotta);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

/* Events List */
.event-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.event-item:hover {
    padding-left: 15px;
    background: linear-gradient(to right, #fffcf9, transparent);
    border-bottom-color: var(--clay-terracotta);
}

.event-item:hover .event-date {
    transform: scale(1.1);
}

.event-date {
    font-size: 12px;
    font-weight: 800;
    color: var(--clay-terracotta);
    width: 60px;
    transition: transform 0.3s ease;
}

/* Join Section */
.join-card {
    position: relative;
    height: 500px;
    border-radius: var(--rounded-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.join-card:hover {
    transform: translateY(-5px);
}

.join-card:hover .join-img {
    transform: scale(1.1);
}

.join-card:hover .join-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.join-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.join-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.4s ease;
}

.join-content {
    position: relative;
    z-index: 1;
    padding: var(--gutter);
}

/* Mission Section */
.mission-centered {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* Hero Actions (button pairs) */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
    }

    .hero-actions .btn {
        width: auto;
        min-width: 200px;
        margin-left: 0 !important;
    }

    .hero-left {
        padding-right: 0;
        padding-left: 0;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 var(--space-lg);
    border-radius: var(--rounded-full);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 24px rgba(161, 64, 19, 0.15);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--clay-terracotta);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--clay-dim);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #ddd;
    color: #1a1a1a;
}

.btn-secondary:hover {
    border-color: #1a1a1a;
}

.btn-white {
    background: var(--white);
    color: #1a1a1a;
}

.btn-outline-white {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

/* Utility Classes */
.text-clay {
    color: var(--clay-terracotta);
}

.text-white {
    color: var(--white);
}

.bg-soft {
    background-color: #fcf9f6;
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.text-center {
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* ─── Ministries Page ──────────────────────────────────────────────────── */
.ministries-page-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.ministry-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-lg);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    min-height: 320px;
}

.ministry-card:not([style*="background-image"]) {
    /* Default white background for cards without images */
    background: var(--white);
}

.ministry-card[style*="background-image"] {
    border: none;
    color: var(--white);
}

.ministry-card[style*="background-image"] .label-caps.text-clay {
    color: var(--white) !important;
}

.ministry-card[style*="background-image"] .body-md {
    color: var(--white) !important;
}

.ministry-card[style*="background-image"] a.text-clay {
    color: var(--white) !important;
}

.ministry-card[style*="background-image"] a.text-clay:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.ministry-card:hover {
    transform: translateY(-6px);
    border-color: var(--warm-ochre);
}

.ministry-card[style*="background-image"]:hover {
    border-color: var(--warm-ochre);
}

.ministry-card-icon {
    width: 56px;
    height: 56px;
    background: #fffcf9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clay-terracotta);
    font-size: 24px;
    margin-bottom: var(--space-md);
    transition: all 0.3s ease;
}

.ministry-card:hover .ministry-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--clay-terracotta);
    color: var(--white);
}

.ministry-card h3 {
    font-size: 22px;
    margin-bottom: var(--space-sm);
}

.ministry-card[style*="background-image"] h3 {
    color: var(--white);
}

@media (max-width: 768px) {
    .ministries-page-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Admin Panel ───────────────────────────────────────────────────────── */
.admin-settings {
    padding: var(--space-xl) 0;
    max-width: 900px;
    margin: 0 auto;
}

.admin-settings h2 {
    color: var(--on-surface);
    margin-bottom: var(--space-md);
}

.admin-settings h2 i {
    color: var(--clay-terracotta);
    margin-right: var(--space-sm);
}

.admin-settings > .form-actions {
    margin-top: var(--space-lg);
}

.settings-card {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--rounded-lg);
    border: 1px solid #f0f0f0;
    margin-bottom: var(--space-md);
    transition: all 0.3s ease;
}

.settings-card:hover {
    border-color: var(--warm-ochre);
}

.settings-card h3 {
    font-size: 20px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.settings-card h3 i {
    color: var(--clay-terracotta);
}

.hint {
    font-size: 14px;
    color: var(--on-surface-variant);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.form-actions .btn {
    height: 44px;
    padding: 0 var(--space-md);
    font-size: 13px;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #ddd;
    color: #1a1a1a;
}

.btn-secondary:hover {
    border-color: #1a1a1a;
}

.btn-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 var(--space-md);
    border-radius: var(--rounded-full);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: #f0f0f0;
    color: #bbb;
    cursor: not-allowed;
    border: none;
}

.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 12px;
}

/* Role badges */
.role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: var(--rounded-full);
    color: var(--white);
    vertical-align: middle;
}

.role-superadmin {
    background: #9f403d;
}

.role-admin {
    background: var(--clay-terracotta);
}

.role-user {
    background: var(--on-surface-variant);
}

/* Alert message types */
.alert-success {
    background: #eaf7e7;
    color: #2d6a2d;
    border: 1px solid #b8e0b3;
}

/* Form selects and textareas */
.form-group select,
.form-group textarea {
    width: 100%;
    height: 52px;
    padding: 0 var(--space-md);
    border: 2px solid #eee;
    border-radius: var(--rounded-md);
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    color: var(--on-surface);
    background: var(--warm-paper);
    transition: all 0.3s ease;
    outline: none;
}

.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--clay-terracotta);
    box-shadow: 0 0 0 4px rgba(161, 64, 19, 0.1);
    background: var(--white);
}

.form-group textarea {
    height: auto;
    padding: var(--space-sm) var(--space-md);
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    appearance: auto;
}

.form-group small {
    display: block;
    font-size: 12px;
    color: var(--on-surface-variant);
    margin-top: 4px;
}

/* Asset preview */
.asset-preview {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--warm-paper);
    border-radius: var(--rounded-sm);
    margin-bottom: var(--space-sm);
}

.asset-preview img {
    border-radius: 4px;
    border: 1px solid #eee;
}

.asset-preview span {
    font-size: 13px;
    color: var(--on-surface-variant);
}

/* Admin tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table thead th {
    padding: 12px 16px;
    border-bottom: 2px solid #eee;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--on-surface-variant);
    text-align: left;
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--on-surface);
}

.admin-table tbody tr:hover {
    background: var(--warm-paper);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table code {
    font-size: 12px;
    background: var(--warm-paper);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Password wrap for admin pages */
.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap input {
    padding-right: 48px;
}

.password-wrap .pwd-toggle {
    position: absolute;
    right: 4px;
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    border-radius: var(--rounded-sm);
    transition: color 0.3s ease;
    font-size: 16px;
}

.password-wrap .pwd-toggle:hover {
    color: var(--on-surface-variant);
}

/* Create user form toggle */
.create-form.open,
.sermon-form.open,
.event-form.open {
    display: block !important;
}

/* ─── Forms ─────────────────────────────────────────────────────────────── */
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: var(--space-xl) 0;
}

.form-card {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--rounded-lg);
    border: 1px solid #f0f0f0;
    width: 100%;
    box-shadow: var(--shadow-ambient);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.form-card:hover {
    box-shadow: 0 24px 48px rgba(161, 64, 19, 0.12);
    border-color: var(--warm-ochre);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--on-surface-variant);
    margin-bottom: var(--space-xs);
}

/* Input wrapper with icon */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap .input-icon {
    position: absolute;
    left: 16px;
    font-size: 16px;
    color: #bbb;
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 1;
}

.input-wrap:focus-within .input-icon {
    color: var(--clay-terracotta);
}

.form-group input {
    width: 100%;
    height: 52px;
    padding: 0 var(--space-md) 0 44px;
    border: 2px solid #eee;
    border-radius: var(--rounded-md);
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    color: var(--on-surface);
    background: var(--warm-paper);
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--clay-terracotta);
    box-shadow: 0 0 0 4px rgba(161, 64, 19, 0.1);
    background: var(--white);
}

.form-group input::placeholder {
    color: #bbb;
}

/* Password toggle button */
.pwd-toggle {
    position: absolute;
    right: 4px;
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    border-radius: var(--rounded-sm);
    transition: color 0.3s ease;
    font-size: 16px;
}

.pwd-toggle:hover {
    color: var(--on-surface-variant);
}

/* Disabled button state */
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: none;
}

.alert {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--rounded-md);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.alert-error {
    background: #fff0ee;
    color: #9f403d;
    border: 1px solid #ffcdc7;
}

/* Footer */
footer {
    background-color: #fcf9f6;
    padding: var(--space-xl) 0 var(--space-lg);
    border-top: 1px solid #eee;
}

footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-lg);
}

footer .logo img {
    height: 100px;
    margin-bottom: var(--space-md);
}

footer .logo h2 {
    font-size: 24px;
    color: var(--clay-terracotta);
    margin-bottom: var(--space-sm);
}

footer h4 {
    margin-bottom: var(--space-md);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: var(--space-sm);
}

footer ul li a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.footer-bottom {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid #eee;
    text-align: center;
    color: #999;
    font-size: 12px;
}

/* Responsive */
/* ─── Events Grid ──────────────────────────────────────────────────────── */
.events-page-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.event-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.event-card:hover {
    transform: translateY(-6px);
    border-color: var(--warm-ochre);
}

.event-card.past {
    opacity: 0.75;
}

.event-card.past:hover {
    opacity: 1;
}

.event-card-img {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.event-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--warm-paper), var(--soft-sand));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: var(--clay-terracotta);
    opacity: 0.3;
}

.event-card-img img {
    width: 100%;
    height: 100%;
    object-fit: fit;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.event-card:hover .event-card-img img {
    transform: scale(1.08);
}

.event-card-body {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
}

.event-card-date {
    text-align: center;
    width: 56px;
    flex-shrink: 0;
}

.event-card-date-num {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--clay-terracotta);
}

.event-card-date-mon {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clay-terracotta);
    margin-top: 2px;
}

.event-card-info {
    flex: 1;
    min-width: 0;
}

.event-card-info h3 {
    font-size: 20px;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.event-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: var(--space-sm);
    font-size: 13px;
    color: var(--on-surface-variant);
}

.event-card-meta span i {
    width: 16px;
    color: var(--clay-terracotta);
    margin-right: 4px;
}

.event-card-details {
    padding: 0 var(--space-md) var(--space-md);
    border-top: 1px solid #f0f0f0;
    margin-top: 0;
    padding-top: var(--space-md);
}

.event-card-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: var(--space-sm);
    font-size: 14px;
    color: var(--on-surface-variant);
}

.event-card-contact span i {
    width: 16px;
    color: var(--clay-terracotta);
    margin-right: 4px;
}

@media (max-width: 768px) {
    .events-page-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Sermons Grid ─────────────────────────────────────────────────────── */
.sermons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.sermon-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sermon-card-img {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.sermon-card-img img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sermon-card:hover .sermon-card-img img {
    transform: scale(1.1);
}

.sermon-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--warm-paper), var(--soft-sand));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--clay-terracotta);
    opacity: 0.3;
}

.sermon-date-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--clay-terracotta);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--rounded-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sermon-card-body {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sermon-card-body h3 {
    font-size: 20px;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.sermon-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.sermon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 var(--space-md);
    border-radius: var(--rounded-full);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
}

.sermon-btn-yt {
    background: #ff0000;
    color: var(--white);
}

.sermon-btn-yt:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.25);
}

.sermon-audio-wrap {
    width: 100%;
}

.sermon-audio-player {
    width: 100%;
    height: 40px;
    border-radius: var(--rounded-full);
    outline: none;
}

.sermon-audio-player::-webkit-media-controls-panel {
    background: var(--warm-paper);
    border-radius: var(--rounded-full);
}

@media (max-width: 1024px) {
    .sermons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .sermons-grid {
        grid-template-columns: 1fr;
    }
}

/* Bank Detail */
.bank-detail {
    padding: var(--space-sm) 0;
}

@media (max-width: 1024px) {

    .hero-split,
    .grid-2,
    .grid-3,
    .grid-2-1,
    .grid-2-1-rev,
    .grid-1-2 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .hero-left {
        padding-right: 0;
        padding-left: 0;
    }

    .hero-actions {
        justify-content: center;
        width: 100%;
    }

    .hero-actions .btn {
        margin-left: 0 !important;
    }

    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    footer .container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    #find-us .card {
        padding: var(--space-sm);
    }

    #find-us .container {
        padding: 0 12px;
    }
}