/* css/style.css */

/* Alapbeállítások */
:root {
    --primary-color: #c00; /* Tűzoltóság piros */
    --secondary-color: #333;
    --text-color: #444;
    --light-bg: #f8f8f8;
    --white: #fff;
    --dark-grey: #222;
    --border-radius: 5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    overflow-x: hidden; /* Megakadályozza a vízszintes görgetést */
}

main.main-content {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Top Title */
.top-title {
    background-color: var(--dark-grey);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-img {
    height: 40px;
    margin-right: 15px;
}

/* Contact Bar */
.contact-bar {
    background-color: #f4f4f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 40px;
    border-bottom: 1px solid #ddd;
}

.social-icons .icon-btn {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons .icon-btn:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.emergency-wrapper {
    display: flex;
    gap: 10px;
}

.emergency, .emergencyyellow {
    font-weight: bold;
    padding: 5px 15px;
    border-radius: var(--border-radius);
    color: var(--white);
    font-size: 1.1rem;
}

.emergencyyellow {
    background-color: #ffc107;
    color: var(--dark-grey);
}

.emergency {
    background-color: var(--primary-color);
}

/* Header */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-left a, .nav-right a, .dropdown-toggle {
    color: var(--secondary-color);
    font-weight: bold;
    text-decoration: none;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-left a:hover, .nav-right a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-left a::after, .nav-right a:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-left a:hover::after, .nav-right a:not(.dropdown-toggle):hover::after {
    width: 100%;
}

.crest {
    flex-shrink: 0;
}

.crest img {
    height: 60px;
    transition: transform 0.3s ease;
}

.crest img:hover {
    transform: scale(1.1);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-container.nav-active .nav-left,
.nav-container.nav-active .nav-right {
    display: flex;
}

.dropdown-content a {
    color: var(--secondary-color);
    padding: 12px 16px;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown.open .dropdown-content {
    display: block;
}

/* Main Content */
.main-content {
    padding-top: 0; /* A header sticky, így nem kell padding-top */
}

.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), #cc0000;
    color: var(--white);
    text-align: center;
    padding: 100px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 520px;
}

.tabor-hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), #cc0000;
    color: var(--white);
    text-align: center;
    padding: 90px 20px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 520px;
}

.tabor-hero h1 {
    font-size: 3.2rem;
    margin-bottom: 18px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.75);
}

.tabor-hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 760px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.hero-buttons .button {
    min-width: 180px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}

.modal h3 {
    margin-bottom: 18px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0,0,0,0.08);
    border-radius: 50%;
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.modal-close:hover {
    background: rgba(0,0,0,0.12);
}

.form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label,
.form-fullwidth,
.form-checkbox {
    display: block;
}

.form-grid input,
.form-grid textarea,
.form-fullwidth input,
.form-fullwidth textarea,
.form-fullwidth label,
.form-checkbox input {
    width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font: inherit;
}

.honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.form-fullwidth label {
    margin-top: 20px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    font-weight: 600;
}

.form-errors,
.form-success,
.documents-saved {
    border-radius: var(--border-radius);
    padding: 18px 22px;
    margin-bottom: 24px;
}

.form-errors {
    background-color: #ffe7e7;
    border: 1px solid #f1b4b4;
    color: #7f2727;
}

.form-success,
.documents-saved {
    background-color: #e8f7ea;
    border: 1px solid #b8ddb8;
    color: #254d26;
}

.year-gallery {
    margin-top: 40px;
}

.year-gallery h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.year-gallery-block {
    margin-bottom: 40px;
}

.tabor-year-embed {
    margin-top: 24px;
    margin-bottom: 24px;
}

.tabor-year-embed h4 {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.tabor-embed-content {
    overflow-x: auto;
}

.tabor-embed-content iframe {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .tabor-hero {
        padding: 80px 20px 40px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 800px;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #a30000; /* Sötétebb piros */
    text-decoration: none;
}

.content-section {
    padding: 60px 20px;
    background-color: var(--white);
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.content-section:nth-of-type(even) {
    background-color: var(--light-bg);
}

.content-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--secondary-color);
    position: relative;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.content-section p {
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: justify;
}

.content-section ul {
    max-width: 800px;
    margin: 0 auto;
    list-style: disc;
    padding-left: 20px;
}

.content-section ul li {
    margin-bottom: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 20px;
}

.service-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.service-item h3 {
    color: var(--primary-color);
    font-size: 1.7rem;
    margin-bottom: 15px;
}

.service-item p {
    font-size: 1rem;
    color: var(--text-color);
    text-align: center; /* Középre igazítás a szolgáltatás leírásánál */
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.image-item {
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.image-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.book-card {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.book-cover {
    position: relative;
    min-height: 360px;
    background: linear-gradient(180deg, #fff 0%, #f4f4f4 100%);
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 16px 45px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover .book-cover,
.book-card:focus-visible .book-cover {
    transform: translateY(-4px);
    box-shadow: 0 22px 55px rgba(0,0,0,0.14);
}

.book-cover img {
    width: 100px;
    height: auto;
    margin-bottom: 28px;
}

.book-label {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    margin-top: 12px;
}

.modal-fullwidth {
    width: 100%;
    max-width: 920px;
}

.image-item figcaption {
    padding: 12px 14px;
    color: var(--secondary-color);
    font-size: 0.95rem;
    text-align: left;
}

.image-gallery-empty {
    background-color: #fff7f7;
    border: 1px solid #f1d4d4;
    padding: 18px 20px;
    border-radius: var(--border-radius);
    color: #7f3a3a;
    font-style: italic;
    text-align: center;
    margin-top: 20px;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 3000;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
}

/* Footer */
.site-footer {
    background-color: var(--dark-grey);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-footer p {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--white);
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-grey);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.7s ease-out, visibility 0.7s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(640px, 95vw);
    gap: 24px;
}

.loading-logo {
    width: min(240px, 45vw);
    max-width: 240px;
    height: auto;
}

.loading-text {
    font-size: clamp(1rem, 1.8vw, 1.8rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-align: center;
    width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.spinner {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Reszponzív design */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        align-items: stretch;
        padding: 0 20px 15px;
        gap: 15px;
    }

    .contact-bar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 12px 20px;
        text-align: center;
    }

    .contact-bar .social-icons,
    .contact-bar .emergency-wrapper {
        justify-content: center;
        width: 100%;
    }

    .hamburger {
        display: flex;
        align-self: flex-end;
    }

    .nav-left,
    .nav-right {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 10px 0;
    }

    .nav-container.nav-active .nav-left,
    .nav-container.nav-active .nav-right {
        display: flex;
    }

    .nav-left a,
    .nav-right a,
    .dropdown-toggle {
        padding: 12px 0;
        border-top: 1px solid #eee;
        width: 100%;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border-radius: 0;
        width: 100%;
    }

    .dropdown-content a {
        padding-left: 20px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.5rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .content-section h2 {
        font-size: 1.8rem;
    }

    .loading-content h1 {
        font-size: 2rem;
    }
}
