/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */
:root {
    --primary-color: #C3975D;
    --primary-dark: #644400;
    --bg-color: #C3975D;
    --text-color: #644400;
    --max-width: 1000px;
}

/* ==========================================================================
   RESET & TYPOGRAPHY
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: "Switzerland", "Swiss 721", Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-dark);
    transition: color 0.2s;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid #9a1313;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-top {
    background-color: var(--primary-dark);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo-area img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    object-fit: contain;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.2;
    white-space: nowrap;
}

.header-bottom {
    background-color: #644400;
    padding: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0;
}

.main-nav a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 15px 20px;
    display: inline-block;
    position: relative;
    transition: background-color 0.2s, color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: #C3975D;
}

/* Phone menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
}

/* ==========================================================================
   MAIN CONTENT & PAGE-SPECIFIC ELEMENTS
   ========================================================================== */
.main-content {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-margin-top: 140px;
}

/* --- Main page specific elements --- */
.welcome-text {
    text-align: center;
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.event-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.event-caption {
    font-size: 1.1rem;
    color: #4c1130;
    font-family: Garamond, "Times New Roman", serif;
}

/* --- Hivatal page specific elements --- */
.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: #644400;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    background-color: var(--primary-dark);
    color: #C3975D;
}

.info-section {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    scroll-margin-top: 120px;
}

.info-section h3 {
    font-size: 1.6rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    text-decoration: underline;
}

.info-section p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.back-to-top {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.back-to-top img {
    width: 80px;
    transition: transform 0.2s;
}

.back-to-top:hover img {
    transform: translateY(-5px);
}

.map-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Linkek page specific elements --- */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
    padding-bottom: 40px;
}

.external-link-btn {
    display: block;
    width: 100%;
    max-width: 600px;
    background-color: var(--primary-color);
    color: #644400;
    padding: 16px 24px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.external-link-btn:hover {
    background-color: var(--primary-dark);
    color: #C3975D;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* --- Gyülekezeti alkalmak specific elements --- */
.schedule-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.schedule-list li {
    background-color: #C3975D;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.schedule-title {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.schedule-time {
    color: var(--text-color);
    font-size: 1rem;
}

@media (min-width: 600px) {
    .schedule-list li {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .schedule-title {
        margin-bottom: 0;
    }
    
    .schedule-time {
        text-align: right;
    }
}

/* --- Egyházközség page specific elements --- */
.info-section.align-left {
    text-align: left;
    max-width: 100%;
}

.info-section.align-left h3 {
    text-decoration: none;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 600px) {
    .data-grid {
        grid-template-columns: 1fr 1fr; 
    }
}

.data-grid h4 {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.image-gallery a {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-gallery a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.image-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* --- Közérdekű információk page specific elements --- */
.button-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 40px auto;
}

.button-grid .btn {
    flex: 0 0 auto;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--primary-color);
    color: var(--primary-dark);
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.social-links {
    margin-bottom: 20px;
}

.social-links svg {
    width: 40px;
    height: 40px;
    fill: #557dbc;
    background: #C3975D;
    border-radius: 50%;
}

.copyright {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.8;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Only elements that MUST change on small screens)
   ========================================================================== */
@media (max-width: 900px) {
/* Fejléc mobilon */
    .header-top {
        flex-wrap: wrap;
    }

    .logo-area {
        width: calc(100% - 50px);
    }

    .menu-toggle {
        display: block;
    }

    .header-bottom {
        padding: 0;
    }

    .main-nav {
        display: none;
        width: 100%;
        padding: 0;
    }

    .main-nav.show {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        background-color: #5c3e00;
        padding: 0;
        border-radius: 0;
    }

    .main-nav a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .site-title {
        font-size: 1.1rem;
        white-space: normal;
    }
}