:root {
    --color-bg: #F9F7F2;
    --color-primary: #0F172A;
    --color-primary-light: #243452;
    --color-accent: #C6A87C;
    --color-accent-dark: #A58B65;
    --color-text: #334155;
    --color-white: #FFFFFF;
    --color-border: #E2E8F0;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-lg) 0;
}

.bg-white {
    background-color: var(--color-white);
}

.bg-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-accent);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    color: var(--color-white);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.btn-accent:hover {
    background-color: var(--color-accent-dark);
}

/* Header & Nav */
header {
    background-color: var(--color-white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-primary);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    /* Default hero style - can be overridden inline or with specific classes */
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-align: center;
    position: relative;
}

.hero-content h1 {
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
    opacity: 0.9;
}

.hero-btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Cards & Grid */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.card {
    background-color: var(--color-white);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    /* Default alignment */
    display: block;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

.card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.card-icon {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    display: block;
}

/* Notice List */
.notice-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.notice-list li {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notice-list li:before {
    content: '•';
    color: var(--color-accent);
    font-size: 2rem;
    line-height: 0.5;
}

/* Gallery Strip */
.gallery-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gallery-strip img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.gallery-strip img:hover {
    opacity: 0.8;
}

/* History Grid Styles */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.history-card {
    background: var(--color-white);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-accent);
    text-align: center;
    /* Center align by default */
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.history-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.history-year {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-xs);
    display: block;
    line-height: 1;
}

.history-text {
    color: var(--color-text);
    font-size: 0.95rem;
}

.history-button-container {
    text-align: center;
    margin-top: var(--spacing-md);
}

/* Gallery Grid Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--color-bg);
    aspect-ratio: 1;
    /* Square for clean grid */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    color: var(--color-white);
    font-size: 2rem;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--color-accent);
}

/* Placeholder Video */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 2rem;
}

.video-container iframe,
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    flex-direction: column;
}

/* Journey Cards (History Section) */
.journey-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: var(--spacing-md);
    position: relative;
}

.journey-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    flex: 1 1 200px;
    max-width: 220px;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.journey-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--color-accent);
}

.journey-card::after {
    content: '→';
    position: absolute;
    right: -1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--color-accent);
    font-weight: bold;
}

.journey-card:last-child::after {
    display: none;
}

.journey-year-badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

.journey-card h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.journey-card p {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
}

/* Mobile: Stack journey cards vertically */
@media (max-width: 768px) {
    .journey-container {
        flex-direction: column;
        align-items: center;
    }

    .journey-card {
        max-width: 100%;
        width: 100%;
    }

    .journey-card::after {
        content: '↓';
        right: auto;
        left: 50%;
        top: auto;
        bottom: -1.2rem;
        transform: translateX(-50%);
    }
}

/* Mass Schedule Tabs */
.tabs-container {
    max-width: 800px;
    margin: 0 auto;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
}

/* Unified Tab Style for both Mass and Filters */
.tab-btn,
.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-text);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    position: relative;
    opacity: 0.7;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    /* Pull down to overlap container border */
    border-radius: 0;
}

.tab-btn:hover,
.filter-btn:hover {
    opacity: 1;
    color: var(--color-primary);
}

.tab-btn.active,
.filter-btn.active {
    opacity: 1;
    color: var(--color-primary);
    font-weight: 600;
    border-bottom-color: var(--color-accent);
}

/* Remove old pseudo-element styles if present */
.tab-btn.active::after,
.filter-btn.active::after {
    display: none;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-pane.active {
    display: block;
}

/* Filter Container Specifics */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Event Card Styles */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.event-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
}

.event-date-badge {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    text-align: center;
}

.event-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.event-details {
    padding: 1.5rem;
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.event-meta {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Schedule Cards */
.schedule-group {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.schedule-group h3 {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent-dark);
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--color-border);
}

.schedule-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.schedule-time {
    font-weight: 600;
    color: var(--color-primary);
    min-width: 100px;
}

.sunday-highlight {
    border: 2px solid var(--color-accent);
    background-color: #FDFBF7;
    /* Very light warm tint */
}

/* Timeline Container */
.timeline {
    position: relative;
    max-width: 900px;
    margin: var(--spacing-md) auto;
    padding: var(--spacing-md) 0;
}

/* Notice Items */
.notice-container {
    max-width: 800px;
    margin: 0 auto;
}

.notice-item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notice-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.notice-item.important,
.notice-item[data-category="important"] {
    border-left: 4px solid var(--color-accent);
}

.notice-date {
    font-size: 0.85rem;
    color: #888;
    display: block;
    margin-bottom: 0.5rem;
}

.notice-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* Mobile adjustments for Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd) {
        text-align: left;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after,
    .timeline-item:nth-child(even)::after {
        left: 20px;
    }
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.footer-section h4 {
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.footer-section p {
    margin-bottom: var(--spacing-xs);
    opacity: 0.9;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-primary-light);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        flex-direction: column;
        align-items: center;
        padding: var(--spacing-md) 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .section {
        padding: var(--spacing-md) 0;
    }

    /* Gallery Mobile */
    .gallery-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}