@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Zen+Kaku+Gothic+New:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #003366;
    /* Deep Blue - assuming a classic/trustworthy color */
    --accent-color: #c5a059;
    /* Gold - often associated with 100th anniversaries/Catholic themes */
    --bg-color: #f8f9fa;
    --text-color: #333333;
    --header-bg: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-main: 'Zen Kaku Gothic New', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: var(--font-main);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
.site-header {
    background-color: #468c66;
    /* Approximate green from logo - adjust as needed */
    box-shadow: var(--shadow-sm);
    height: auto;
    /* Allow it to grow */
    min-height: 50vh;
    /* Minimum height is 50% of viewport */
    padding: 2rem 1rem;
    /* Add padding to prevent content touching edges */
    box-sizing: border-box;
    /* Ensure padding is included in width/height */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Changed from sticky to relative as 50vh sticky might be too much */
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    /* Stack logo and title vertically for a hero look */
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}

.logo-container {
    flex-shrink: 0;
}

.site-logo {
    height: 225px;
    /* Increased logo size (150px * 1.5) */
    width: auto;
    display: block;
    /* border-radius: 50%; Removed to show original shape */
}

.title-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.site-title {
    font-size: 3rem;
    /* Increased font size */
    font-weight: 700;
    color: #ffffff;
    /* White text for contrast on green */
    margin: 0;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Text shadow for better readability */
}

.site-subtitle {
    font-size: 1.25rem;
    /* Increased subtitle size */
    color: rgba(255, 255, 255, 0.9);
    /* Off-white for subtitle */
    margin-top: 1rem;
    font-weight: 400;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#map-container {
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    margin-top: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    /* Subtle gradient background */
    border-radius: 20px;
    /* Soften edges */
    padding: 40px;
    /* Add some spacing inside the background */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
    /* Inner shadow for depth */
}

#svg-holder svg {
    width: 80vw;
    /* Increased width as requested */
    max-width: 1400px;
    /* Increased max-width to allow it to get bigger */
    height: auto;
    display: block;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
    /* Enhanced shadow */
    margin: 0 auto;
    /* Ensure centering */
}

/* Region Label Styles */
.region-label {
    font-size: 18px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    user-select: none;
    fill: #fff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: var(--font-main);
}

/* Footer (Optional) */
.site-footer {
    text-align: center;
    padding: 1rem;
    color: #999;
    font-size: 0.875rem;
    margin-top: auto;
}

/* Navigation Buttons Styles */
.nav-buttons-container {
    display: flex;
    background-color: #ffffff;
    border-radius: 50px;
    /* Fully rounded pill shape */
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    /* Space between buttons and map */
    position: relative;
    z-index: 10;
    margin-top: -25px;
    /* Pull up slightly to overlap header or just sit nicely */
}

.nav-btn {
    background: none;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    border-radius: 40px;
    /* Inner buttons also rounded */
    transition: all 0.3s ease;
    font-family: var(--font-main);
    min-width: 120px;
}

.nav-btn.active {
    background-color: var(--primary-color);
    /* Active state color */
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-btn:hover:not(.active) {
    background-color: #f0f0f0;
    color: #333;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .site-logo {
        height: 60px;
    }

    .main-content {
        padding: 1rem;
    }
}

/* Sub-page Specific Styles */
.sub-page-header {
    height: auto;
    min-height: 120px;
    padding: 1rem 0;
    position: relative;
    /* Needed for absolute positioning of back button if inside header, but we might need to move HTML too */
}

.sub-page-header .header-content {
    flex-direction: row;
    /* Horizontal layout */
    gap: 1.5rem;
    position: relative;
    /* To position back button relative to content width if desired, or use header */
    justify-content: center;
    /* Keep center */
}

.sub-page-header .site-logo {
    height: 80px;
    /* Smaller logo */
    padding: 5px;
}

.sub-page-header .site-title {
    font-size: 1.8rem;
    /* Smaller title */
    text-align: left;
}

.sub-page-header .site-subtitle {
    font-size: 0.9rem;
    text-align: left;
    margin-top: 0.25rem;
}

/* Current Location Label */
.current-location-label {
    font-family: var(--font-main);
    font-size: 2.25rem;
    /* Increased by 1.5x (1.5 * 1.5 = 2.25) */
    font-weight: 700;
    color: #333;
    margin: 2rem 0 1.5rem;
    /* Adjusted margin */
    padding-bottom: 0.75rem;
    /* Thicker padding */
    border-bottom: 5px solid var(--accent-color);
    /* Thicker border */
    display: inline-block;
}

/* Back Button */
.back-button {
    position: absolute;
    left: 2rem;
    /* Position in header left */
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    /* Semi-transparent white on green header */
    color: white;
    border: 2px solid white;
    border-radius: 50px;
    /* Rounded rectangle */
    padding: 10px 20px;
    min-width: 80px;
    /* Width for about 4 chars */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 100;
    font-family: var(--font-main);
    font-size: 1rem;
}

.back-button:hover {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-50%) scale(1.05);
    /* Keep vertical center and scale */
}

/* Ensure map container is relative for absolute positioning of back button */
#map-container {
    position: relative;
}

/* Header Navigation Group (for church.php) */
.header-nav-group {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.header-nav-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 50px;
    height: 50px;
    /* Fixed height */
    box-sizing: border-box;
    /* Ensure border is included in height */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    font-size: 1rem;
    cursor: pointer;
}

.header-nav-btn.back {
    padding: 0 20px;
    min-width: 80px;
}

.header-nav-btn.home {
    width: 50px;
    /* Circle */
    min-width: 50px;
    /* Prevent shrinking */
    border-radius: 50%;
    padding: 0;
}

.header-nav-btn.home svg {
    width: 24px;
    height: 24px;
    display: block;
    /* Remove extra space */
}

.header-nav-btn:hover {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

/* Content Grid & Cards */
.content-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    width: 100%;
    margin-bottom: 3rem;
}

.content-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    justify-content: center;
    align-items: center;
    width: fit-content;
    /* Fit content so the card wraps the media size */
    max-width: 95vw;
    /* Prevent overflow on small screens */
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.content-title {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.content-description {
    font-family: var(--font-main);
    font-size: 1rem;
    color: #555;
    margin: 0 0 1.5rem 0;
    text-align: center;
    line-height: 1.5;
}

/* Media Styles */
.church-main-image {
    width: 50vw;
    max-width: 800px;
    /* Reasonable max width */
    height: auto;
    border-radius: 10px;
    display: block;
    object-fit: cover;
}

.media-iframe {
    border: none;
    border-radius: 10px;
    display: block;
}

.square-iframe {
    width: 70vw;
    height: 39.375vw;
    /* 16:9 aspect ratio of 70vw */
    max-width: 1000px;
    max-height: 562.5px;
}

.video-iframe {
    width: 70vw;
    height: 39.375vw;
    /* 16:9 aspect ratio of 70vw */
    max-width: 1000px;
    max-height: 562.5px;
}

.map-iframe {
    width: 70vw;
    height: 39.375vw;
    /* 16:9 aspect ratio of 70vw */
    max-width: 1000px;
    max-height: 562.5px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .content-card {
        padding: 1rem;
        width: 90vw;
    }

    .church-main-image {
        width: 100%;
    }

    .square-iframe,
    .video-iframe,
    .map-iframe {
        width: 100%;
        height: 56.25vw;
        /* 16:9 aspect ratio for mobile (100vw width) */
    }
}

/* Not Ready Message */
.not-ready-message {
    width: 70vw;
    max-width: 800px;
    padding: 3rem;
    text-align: center;
    background-color: #f8f9fa;
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 10px;
    border: 2px dashed #ddd;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

@media (max-width: 768px) {
    .not-ready-message {
        width: 90vw;
        padding: 2rem;
        font-size: 1rem;
    }
}