/*
Theme Name: Wayne SDA Church
Theme URI: https://www.waynesda.org
Author: Your Name/Church Team
Description: A custom, responsive theme built for the Wayne Seventh-day Adventist Church.
Version: 1.0
Text Domain: waynesda
*/

/* CSS Reset & Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-light: #f9f9f9;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}
nav a {
    color: #d1d8e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
nav a:hover {
    color: white;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.giving-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}
.giving-link i {
    color: #2ecc71;
    font-size: 1.2rem;
}
.giving-link:hover {
    color: #2ecc71;
}
.btn-prayer {
    padding: 10px 20px;
    background-color: transparent;
    color: white;
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-prayer:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('https://images.unsplash.com/photo-1438232992991-995b7058bbb3?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2rem;
}
.btn {
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}
.btn:hover {
    background-color: #2980b9;
}

/* Main Content Sections */
.section {
    padding: 5rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}
.bg-light {
    background-color: var(--bg-light);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}
.card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Ministries Section */
.ministry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}
.ministry-tile {
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.ministry-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--secondary-color);
}
.ministry-tile i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}
.ministry-tile h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

/* Adventist Connect Style Footer */
.adventist-footer {
    background-color: #fafafa;
    color: #333;
    padding: 4rem 20px 3rem;
    border-top: 1px solid #eaeaea;
}
.adventist-footer a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}
.adventist-footer a:hover {
    text-decoration: underline;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}
.church-info .church-name {
    color: #5c264a;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.church-info p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}
.footer-nav {
    display: flex;
    gap: 6rem;
    padding-top: 0.5rem;
}
.nav-column {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.nav-column a {
    font-weight: bold;
    font-size: 0.95rem;
}
.footer-divider {
    height: 1px;
    background-color: #eaeaea;
    width: 100%;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer-branding p {
    font-size: 0.85rem;
    color: #555;
    margin-top: 0.5rem;
}
.sda-logo {
    height: 45px;
    margin-bottom: 1rem;
    display: block;
}
.footer-legal-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.2rem;
}
.footer-legal-links a {
    font-size: 0.85rem;
    color: #666;
}

/* Modal Overlay & Content Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: #777;
    cursor: pointer;
    border: none;
    background: none;
}
.close-modal:hover {
    color: var(--accent-color);
}
.modal-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}
.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}
.submit-btn:hover {
    background-color: #2980b9;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    .nav-actions {
        margin-top: 10px;
    }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .footer-top, .footer-nav, .footer-bottom { flex-direction: column; }
    .footer-nav { gap: 1.5rem; }
    .footer-bottom { align-items: flex-start; }
}

/* =========================================================
   Gutenberg Block Layout Controls
   ========================================================= */

/* 1. Constrain and center all standard blocks */
.site-main > *:not(.alignwide):not(.alignfull) {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* 2. Allow "Wide" blocks to be slightly wider */
.site-main > .alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* 3. Force "Full Width" blocks to break out and touch the screen edges */
.site-main > .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* 4. Keep the text INSIDE full-width backgrounds safely centered */
.alignfull > .wp-block-group__inner-container,
.alignfull .wp-block-cover__inner-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* --- Mobile Responsive Navigation --- */

/* 1. Hide the hamburger button on computer screens */
.wsda-menu-toggle {
    display: none;
    background: #ffffff; /* Solid white background */
    color: var(--primary-color, #00458a); /* Keeps the icon your theme's blue */
    border: 2px solid #ffffff;
    border-radius: 4px;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 6px 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); /* Soft drop shadow so it pops on any background */
    transition: all 0.2s ease;
}

/* Optional: Add a subtle 'press' effect when tapped */
.wsda-menu-toggle:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 2. Mobile Rules (Triggers on phones and small tablets) */
@media (max-width: 850px) {
    
    /* Show the hamburger button */
    .wsda-menu-toggle {
        display: inline-block;
        order: 2; /* Puts it in the middle/right of the flexbox */
        margin: 0 10px;
    }
    
    /* Ensure the Give button stays visible and pushes to the side */
    .nav-actions {
        order: 3;
    }

    /* Hide the text links by default and convert them into a dropdown box */
    .wsda-nav-links {
        display: none;
        position: absolute;
        top: 100%; /* Positions it directly below the header */
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 15px 0;
        border-top: 1px solid #eee;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 9999;
    }

    /* When the JavaScript adds the "toggled" class, reveal the menu! */
    .wsda-nav-links.toggled {
        display: block;
    }

    /* Format the list items vertically */
    .wsda-nav-links ul {
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .wsda-nav-links li {
        width: 100%;
        border-bottom: 1px solid #f5f5f5;
    }

    .wsda-nav-links li:last-child {
        border-bottom: none;
    }

    .wsda-nav-links a {
        display: block;
        padding: 12px 20px;
        color: #333;
        text-decoration: none;
        font-weight: bold;
    }

    .wsda-nav-links a:hover {
        background: #f4f7fa;
        color: var(--primary-color, #00458a);
    }
}