/* CSS Variables */
:root {
    --brand-navy: #12324f;
    --brand-sky: #6ea5d6;
    --brand-gold: #c49a58;
    --ink: #162336;
    --muted: #5f6f82;
    --surface: #ffffff;
    --surface-2: #f3f7fb;
    --line: #dce5ee;
    --success: #2d7f3f;
    --shadow-sm: 0 2px 8px rgba(18, 50, 79, 0.08);
    --shadow-md: 0 10px 26px rgba(18, 50, 79, 0.11);
    --radius: 14px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(180deg, #eef4fb 0%, #f7fafd 220px, #f4f7fb 100%);
    color: var(--ink);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    text-decoration: none;
    color: var(--brand-navy);
    font-size: 20px;
    font-weight: 700;
}

.nav-logo .logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-navy);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-sky);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Search Container */
.search-container {
    background: white;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-sky);
    box-shadow: 0 0 0 3px rgba(110, 165, 214, 0.1);
}

.search-btn {
    margin-left: 8px;
    padding: 12px 24px;
    background: var(--brand-navy);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #0a1f33;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--surface-2);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.search-result-item strong {
    color: var(--brand-navy);
    display: block;
    margin-bottom: 4px;
}

.search-result-item .type {
    font-size: 12px;
    color: var(--muted);
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--brand-navy) 0%, #1b4e78 50%, var(--brand-sky) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 16px;
    font-weight: 700;
}

.tagline {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand-navy);
    color: white;
}

.btn-primary:hover {
    background: #0a1f33;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--brand-sky);
    color: white;
}

.btn-secondary:hover {
    background: #5a92bf;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--brand-navy);
    border: 2px solid var(--brand-navy);
}

.btn-outline:hover {
    background: var(--brand-navy);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-sky) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 40px;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 16px;
    opacity: 0.9;
}

/* Sections */
.service-times {
    padding: 60px 20px;
    background: white;
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
}

.service-times h2,
.upcoming-events h2,
.ministries-preview h2 {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--brand-navy);
}

.times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.time-card {
    background: linear-gradient(135deg, var(--surface-2) 0%, white 100%);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--line);
}

.time-card h3 {
    color: var(--brand-navy);
    margin-bottom: 12px;
}

.time-card .big-time {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-sky);
    margin: 12px 0;
}

/* Events Section */
.upcoming-events {
    padding: 60px 20px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.event-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.event-date {
    display: inline-block;
    background: var(--brand-sky);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.event-card h3 {
    color: var(--brand-navy);
    margin-bottom: 12px;
}

.event-card p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.event-card-large {
    display: flex;
    gap: 20px;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.event-card-large:hover {
    box-shadow: var(--shadow-md);
}

.event-date-badge {
    flex-shrink: 0;
    background: var(--brand-sky);
    color: white;
    padding: 16px;
    border-radius: 8px;
    min-width: 100px;
    text-align: center;
}

.date-text {
    font-weight: 600;
    font-size: 14px;
}

.event-details h3 {
    color: var(--brand-navy);
    margin-bottom: 8px;
}

.event-summary {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

/* Ministries Preview */
.ministries-preview {
    padding: 60px 20px;
    background: linear-gradient(180deg, white 0%, var(--surface-2) 100%);
}

.section-intro {
    text-align: center;
    color: var(--muted);
    margin-bottom: 40px;
}

.ministries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.ministry-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    text-align: center;
    transition: all 0.3s;
}

.ministry-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-sky);
}

.ministry-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--brand-navy);
}

.ministry-card p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.link {
    color: var(--brand-sky);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.link:hover {
    color: var(--brand-navy);
}

/* Ministry Section */
.ministry-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--line);
}

.ministry-section:last-child {
    border-bottom: none;
}

.ministry-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.ministry-text h2 {
    color: var(--brand-navy);
    margin-bottom: 16px;
}

.ministry-text h3 {
    color: var(--brand-navy);
    margin-top: 20px;
    margin-bottom: 12px;
}

.ministry-text ul {
    list-style: none;
    margin-bottom: 16px;
}

.ministry-text li {
    padding: 8px 0;
    color: var(--muted);
    position: relative;
    padding-left: 24px;
}

.ministry-text li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--brand-sky);
    font-weight: bold;
}

.cta-box {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-sky) 100%);
    color: white;
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
}

.cta-box h2 {
    color: white;
    margin-bottom: 12px;
}

/* CTA Section */
.cta-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--brand-navy) 0%, #1b4e78 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 12px;
}

.cta-section p {
    margin-bottom: 24px;
    opacity: 0.95;
}

/* About Sections */
.about-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--line);
}

.about-section h2 {
    color: var(--brand-navy);
    margin-bottom: 20px;
}

.about-section p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.value-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    text-align: center;
}

.value-card h3 {
    color: var(--brand-navy);
    margin-bottom: 12px;
}

.value-card p {
    font-size: 14px;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.leader-card {
    background: transparent;
    padding: 10px 6px 8px;
    border-radius: 0;
    border: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.leader-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    margin: 2px auto 8px;
    border: 2px solid #e7eef6;
    background: var(--surface-2);
}

.leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leader-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #7f94aa;
    background: linear-gradient(135deg, #edf4fb, #dde9f5);
}

.leader-info {
    width: 100%;
}

.leader-info h3 {
    color: var(--brand-navy);
    margin-bottom: 2px;
    font-size: 14px;
    line-height: 1.3;
}

.leader-role {
    color: var(--brand-sky);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.35;
}

.leader-bio {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 6px;
}

.leader-email {
    font-size: 12px;
    color: var(--brand-sky);
    text-decoration: none;
}

.leader-email:hover {
    text-decoration: underline;
}

.contact-info {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.contact-info p {
    margin-bottom: 12px;
}

/* Giving Page */
.giving-methods,
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.method-card,
.impact-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: all 0.3s;
}

.method-card:hover,
.impact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-sky);
}

.method-card h3,
.impact-card h3 {
    color: var(--brand-navy);
    margin-bottom: 12px;
}

.method-card p,
.impact-card p {
    color: var(--muted);
    font-size: 14px;
}

.method-card .btn {
    margin-top: 16px;
}

/* Sermons List */
.sermons-list {
    display: grid;
    gap: 20px;
}

.sermon-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s;
}

.sermon-card:hover {
    box-shadow: var(--shadow-md);
}

.sermon-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 12px;
}

.sermon-header h3 {
    color: var(--brand-navy);
    margin: 0;
}

.sermon-header a {
    text-decoration: none;
    color: var(--brand-navy);
    transition: color 0.3s;
}

.sermon-header a:hover {
    color: var(--brand-sky);
}

.sermon-date {
    background: var(--surface-2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.sermon-summary {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-box,
.contact-form-box {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.info-item {
    margin-bottom: 30px;
}

.info-item h3 {
    color: var(--brand-navy);
    margin-bottom: 12px;
}

.info-item p {
    color: var(--muted);
    margin: 0;
}

.info-item a {
    color: var(--brand-sky);
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

.map-placeholder {
    margin-top: 30px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
}

.contact-form-box h2 {
    color: var(--brand-navy);
    margin-bottom: 20px;
}

/* Forms */
.contact-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    color: var(--ink);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-sky);
    box-shadow: 0 0 0 3px rgba(110, 165, 214, 0.1);
}

.form-note {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
}

/* Footer */
.footer {
    background: var(--ink);
    color: white;
    padding: 60px 20px 30px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 16px;
    color: var(--brand-sky);
}

.footer-section p {
    margin-bottom: 12px;
    opacity: 0.8;
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--brand-sky);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
        box-shadow: var(--shadow-sm);
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-link {
        padding: 16px 20px;
        border-bottom: 1px solid var(--line);
    }

    .nav-link.active::after {
        display: none;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 10px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .tagline {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header p {
        font-size: 14px;
    }

    .times-grid,
    .events-grid,
    .ministries-grid,
    .values-grid,
    .giving-methods,
    .impact-grid,
    .sermons-list {
        grid-template-columns: 1fr;
    }

    .leadership-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .leader-photo {
        width: 74px;
        height: 74px;
        margin-bottom: 6px;
    }

    .event-card-large {
        flex-direction: column;
    }

    .event-date-badge {
        min-width: auto;
    }

    .ministry-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .search-input,
    .search-btn {
        display: block;
        width: 100%;
        margin-top: 8px;
    }

    .search-btn {
        margin-left: 0;
    }

    .footer-container {
        gap: 20px;
    }

    .hero {
        padding: 50px 20px;
    }

    .service-times,
    .upcoming-events,
    .ministries-preview {
        padding: 40px 20px;
    }

    .ministry-section {
        padding: 20px 0;
    }

    .cta-box {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .tagline {
        font-size: 14px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .service-times h2,
    .upcoming-events h2,
    .ministries-preview h2 {
        font-size: 24px;
    }

    .ministry-card h3,
    .method-card h3,
    .impact-card h3 {
        font-size: 16px;
    }

    .leadership-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .leader-photo {
        width: 68px;
        height: 68px;
    }

    .leader-info h3 {
        font-size: 13px;
    }

    .leader-role {
        font-size: 10px;
    }

    .contact-info-box,
    .contact-form-box {
        padding: 20px;
    }

    .footer {
        padding: 40px 20px 20px;
    }
}
