:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --background: #f8f9fa;
    --white: #ffffff;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    --border-radius: 16px;
    --border-radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Section */
.header-section {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background: var(--gradient-primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    filter: blur(2px);
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.header-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.church-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.9);
    background-size: cover;
    background-position: center;
    margin: 0 auto 2rem;
    box-shadow: var(--shadow-heavy);
    transition: transform 0.3s ease;
}

.church-image:hover {
    transform: scale(1.05);
}

.deanery-title {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.church-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.church-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.back-button:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.back-button svg {
    width: 24px;
    height: 24px;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: -4rem auto 0;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 5;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--background);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.info-value {
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.info-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-value a:hover {
    color: var(--secondary-color);
}

/* Description */
.description-card {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

.description-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Map Card */
.map-card {
    height: 400px;
    padding: 0;
    overflow: hidden;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

.map-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-light);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.action-btn {
    flex: 1;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Resources Gallery */
.resources-gallery {
    margin-top: 2rem;
}

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

.resource-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.resource-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.resource-content {
    padding: 1.5rem;
}

.resource-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.resource-info {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-section {
        height: 50vh;
        min-height: 350px;
    }

    .church-image {
        width: 150px;
        height: 150px;
    }

    .church-title {
        font-size: 2rem;
    }

    .main-content {
        margin-top: -2rem;
        padding: 0 1rem 2rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .quick-actions {
        flex-direction: column;
    }

    .back-button {
        top: 1rem;
        left: 1rem;
        width: 44px;
        height: 44px;
    }

    .card {
        padding: 1.5rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .church-title {
        font-size: 1.75rem;
    }

    .deanery-title {
        font-size: 1rem;
    }

    .church-subtitle {
        font-size: 1.1rem;
    }

    .map-card {
        height: 300px;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Utilities */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--gradient-accent);
    color: white;
}

.highlight {
    background: linear-gradient(120deg, transparent 0%, var(--accent-color) 0%, transparent 100%);
    background-size: 200% 100%;
    transition: background-position 0.3s ease;
}

.highlight:hover {
    background-position: 100% 0;
}
