/* =========================================================================
   Philadelphia Anglican Church - Modern Stylesheet
   Replaces: Old table-based layout and absolute positioning
   Architecture: Flexbox, CSS Grid, Responsive Design
   ========================================================================= */

/* --- CSS Variables / Design Tokens --- */
:root {
    --primary-color: #8B3A3A; /* Warm Terracotta / Dark Red-Brown */
    --primary-light: #CD5C5C; /* Indian Red */
    --accent-color: #FDF3E7; /* Soft Peach / Cream */
    --accent-dark: #D2A679; /* Warm Sand/Tan */
    --text-main: #4A3A34; /* Dark Warm Brown */
    --text-light: #705A50; /* Lighter Warm Brown */
    --bg-main: #FAFAF7; /* Very light warm off-white */
    --white: #ffffff;
    --border-radius: 16px;
    --box-shadow: 0 8px 24px rgba(139, 58, 58, 0.08);
    --transition-speed: 0.3s;
    --font-heading: 'Noto Sans TC', sans-serif;
    --font-body: 'Noto Sans TC', sans-serif;
}

/* --- Base Reset & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
}

/* --- Common UI Components --- */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(139, 58, 58, 0.12);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 30px; /* Pill shape */
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
}

.btn-lang {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: var(--white);
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(139, 58, 58, 0.2);
}

.btn-lang:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(139, 58, 58, 0.3);
}

/* --- Layout Structure --- */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
}

.logo img {
    max-height: 80px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform var(--transition-speed);
}

.social-icon:hover img {
    transform: scale(1.1);
}

.news-button img {
    height: 40px;
    transition: transform var(--transition-speed);
}

.news-button:hover img {
    transform: scale(1.05);
}

/* --- Navigation --- */
.navbar {
    background-color: rgba(253, 243, 231, 0.85); /* Semitransparent warm accent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(139, 58, 58, 0.08); /* Warm subtle shadow */
}


.nav-links {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.nav-links a {
    color: var(--primary-color);
    padding: 0.75rem 1.2rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.nav-links a:hover, .nav-links a.active {
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

/* --- Main Content Container --- */
.main-content {
    max-width: 1100px; /* Slightly wider for the grid */
    margin: 2rem auto;
    padding: 0 1rem;
}

/* --- Layout Grids --- */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 900px) {
    .grid-2col {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    
    .grid-2col > .card {
        margin-bottom: 0;
        height: 100%; /* Stretch cards */
        display: flex;
        flex-direction: column;
    }
}

/* --- Welcome Section --- */
.welcome-section {
    text-align: center;
    background: linear-gradient(to bottom, #ffffff, var(--accent-color));
    border-bottom: 3px solid var(--accent-dark);
}

.welcome-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.mission-statement {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 1.5rem 0;
}

.bible-verse {
    border-left: 5px solid var(--primary-light);
    background-color: var(--white);
    padding: 2rem;
    margin: 2.5rem auto;
    max-width: 800px;
    text-align: left;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.verse-title {
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.verse-text {
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.inline-icon {
    display: inline;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 5px;
}

/* --- Info Section (Easy Updates) --- */
.update-highlight {
    border-top: 4px solid var(--primary-light);
}

.info-list h3 {
    margin-top: 1.5rem;
    border-bottom: 2px solid var(--accent-dark);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.info-list ul {
    list-style-type: none;
    margin-left: 0;
    margin-top: 1rem;
}

.info-list ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.info-list ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.info-list ul ul {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.info-list ul ul li::before {
    content: '-';
    color: var(--text-light);
}

.update-date {
    color: #c0392b;
    font-size: 1.1rem;
}

.divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 2rem 0;
}

.donation-info {
    font-weight: 500;
    color: var(--text-main);
    background: var(--accent-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px dashed var(--accent-dark);
}

/* --- Location & Meeting Times --- */
.location-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.meeting-times h4 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.address {
    margin-top: 1.5rem;
    background: var(--accent-color);
    padding: 1rem;
    border-radius: var(--border-radius);
}

/* --- Media Section --- */
.media-section {
    text-align: center;
}

.bilingual-notice {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 1.5rem 0;
    color: var(--primary-color);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.video-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.video-item p {
    margin-top: 1rem;
    font-weight: 500;
}

.creche-info {
    margin-top: 3rem;
    text-align: left;
}

.creche-info h4 {
    margin: 1.5rem 0;
    color: var(--text-main);
}

/* --- Map Section --- */
.map-section {
    position: relative;
}

.directions {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.back-to-top {
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-top img {
    display: inline;
    width: 24px;
    vertical-align: middle;
}

/* --- Footer --- */
footer {
    background-color: #e0e0e0;
    padding: 3rem 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.footer-links-grid a {
    color: #444;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    display: block;
}

.footer-links-grid a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ccc;
    text-align: right;
}

/* --- Media Queries (Responsiveness) --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .logo img {
        max-height: 60px;
    }

    .nav-links {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.8rem 1rem;
        box-shadow: inset 0 -1px 4px rgba(0,0,0,0.05);
    }
    
    .nav-links::-webkit-scrollbar {
        display: none; /* Hide scrollbar for a cleaner look */
    }

    .nav-links a {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.6rem 1rem;
        border-radius: 20px;
        background-color: #f0f0f0;
        margin-right: 0.5rem;
    }

    .nav-links a.active, .nav-links a:hover {
        background-color: var(--primary-color);
        color: var(--white);
    }
    .location-section {
        grid-template-columns: 1fr;
    }

    .welcome-section h2 {
        font-size: 1.8rem;
    }
}
