/**
 * @file style.css
 * @description Modern, high-performance, compact styling for Török Söröző with dark luxury & glow effects.
 */

/* =================================================================ati
   1. ALAP VÁLTOZÓK ÉS RESET
   ================================================================ */
:root {
    --bg-main: #0c0907;
    --bg-card: #17110e;
    --bg-card-hover: #211914;
    --primary-brown: #2d1e15;

    --accent-gold: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.35);

    --text-main: #f3f4f6;
    --text-muted: #9ca3af;

    --border-subtle: rgba(245, 158, 11, 0.15);
    --border-glow: rgba(245, 158, 11, 0.5);
    --border-input: rgba(245, 158, 11, 0.3);
    --border-table: rgba(245, 158, 11, 0.2);
    --table-row-divider: rgba(255, 255, 255, 0.04);

    --table-bg: #17110e;
    --table-th-bg: rgba(245, 158, 11, 0.1);
    --category-bg: rgba(35, 27, 14, 0.5);

    --radius-sm: 6px;
    --radius-md: 10px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --floating-logo-height: 120px;
    --floating-logo-height-hover: 128px;
    --floating-logo-z-index: 999;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* ITT A VÁLTOZTATÁS: min-width helyett 100% szélesség és overflow kezelés */
    width: 100%;
    overflow-x: hidden;
}

/* Reszponzív skálázás kis képernyőn */
@media (max-width: 768px) {
    html {
        /* Ahogy szűkül a képernyő, úgy csökken a rem alapegység is (pl. 16px-ről lefelé) */
        font-size: clamp(12px, 2.5vw, 16px);
    }
}

/* =================================================================
   2. FEJLÉC, NAVIGÁCIÓ ÉS LEBEGŐ LOGÓ
   ================================================================ */
.floating-logo-container {
    position: fixed;
    top: 4px;
    right: 25px;
    z-index: var(--floating-logo-z-index);
    pointer-events: auto;
}

.floating-logo {
    height: var(--floating-logo-height);
    width: auto;
    filter: drop-shadow(0 0 15px var(--accent-glow));
    transition: var(--transition);
    display: block;
}

.floating-logo:hover {
    height: var(--floating-logo-height-hover);
    transform: scale(1.08);
    filter: drop-shadow(0 0 22px var(--accent-gold));
}

header {
    background-color: rgba(23, 17, 14, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 998;
}

header .container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
}

nav a:hover, nav a.active {
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.08);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* =================================================================
   3. TARTALOM KONTÉNER ÉS ALAP ELEMEK
   ================================================================ */
main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0.5rem auto;
    padding: 0 1rem;
    margin-bottom: 120px;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    border-left: 3px solid var(--accent-gold);
    padding-left: 0.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
    transition: var(--transition);
}

.btn:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 18px var(--accent-glow);
    transform: translateY(-1px);
}

.form-control {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.88rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* =================================================================
   4. HERO ÉS FŐOLDALI HÍREK
   ================================================================ */
.hero-section {
    background: linear-gradient(145deg, var(--bg-card), var(--primary-brown));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    font-size: 1.8rem;
    color: var(--accent-gold);
    margin-bottom: 0.6rem;
    text-shadow: 0 0 12px var(--accent-glow);
}

.hero-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 800px;
    margin-bottom: 1.2rem;
}

.news-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.news-row-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    transition: var(--transition);
}

.news-row-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.12);
    transform: translateY(-2px);
    background-color: var(--bg-card-hover);
}

.news-image-wrapper {
    flex: 0 0 160px;
    max-width: 160px;
    overflow: hidden;
    border-right: 1px solid var(--border-subtle);
}

.news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.news-row-card:hover .news-image-wrapper img {
    transform: scale(1.04);
}

.news-row-card .news-content {
    flex: 1;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
}

.news-content .date {
    font-size: 0.75rem;
    color: var(--accent-gold);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.news-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.news-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 0.8rem;
}

@media (max-width: 650px) {
    .news-row-card {
        flex-direction: column;
    }
    .news-image-wrapper {
        flex: auto;
        max-width: 100%;
        height: 180px;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
}

/* =================================================================
   5. ITALLAP STÍLUSOK
   ================================================================ */
.simple-menu-container {
    max-width: 800px;
    margin: 0.5rem auto;
    padding: 0 1rem;
}

.simple-menu-container h1 {
    color: var(--accent-gold);
    margin-bottom: 0.8rem;
    font-size: 1.8rem;
}

.filter-form {
    margin-bottom: 1rem;
}

.simple-select {
    background: var(--table-bg);
    color: var(--text-main);
    border: 1px solid var(--border-input);
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    width: 100%;
    max-width: 260px;
}

.simple-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--table-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-table);
}

.simple-table th, .simple-table td {
    padding: 2px 2px 2px 30px;
    text-align: left;
    color: var(--text-main);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--table-row-divider);
}

.simple-table th {
    background: var(--table-th-bg);
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.8rem;
}

.simple-table tr:last-child td {
    border-bottom: none;
}

.category-row td {
    background: var(--category-bg);
    color: var(--accent-gold);
    padding: 6px 1px 2px 16px;
    font-size: 1.2rem;
    font-weight: bold;
}

.right { text-align: right; white-space: nowrap; }
.center { text-align: center; white-space: nowrap; }

/* =================================================================
   6. GALÉRIA STÍLUSOK
   ================================================================ */
/*.gallery-container {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.gallery-container h1 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}*/

.gallery-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.album-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    background: rgba(245, 158, 11, 0.05);
    padding: 0.8rem 1rem;
    border-left: 3px solid var(--accent-gold);
    border-radius: var(--radius-sm);
}

.gallery-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 2rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) var(--bg-card);
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 0 calc(50% - 140px);
    width: max-content;
}

.gallery-item {
    flex: 0 0 280px;
    height: 320px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform: scale(0.85);
    opacity: 0.6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item.active-center {
    transform: scale(1.1);
    opacity: 1;
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    z-index: 1000;
}

/* Modális Felugró Ablak (Modal) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 9, 7, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-box {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}

.lightbox-box img {
    max-width: 80vw;
    max-height: 80vh;
    display: block;
    border-radius: var(--radius-sm);
}

.lightbox-box .modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--bg-main);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 20;
}

/* =================================================================
   7. FIX LÁBLÉC ÉS HÍRLEVÉL
   ================================================================ */
.footer-section {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(23, 17, 14, 0.92);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-subtle);
    padding: 0.5rem 1rem;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    /*flex-wrap: wrap;*/
}

.footer-info {
    color: var(--text-muted);
}

.footer-info strong {
    color: var(--accent-gold);
}

.footer-section a.map-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a.map-link:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 8px var(--accent-glow);
}

.newsletter-form {
    display: flex;
    gap: 0.3rem;
}

.newsletter-form input {
    background: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.6rem;
    color: var(--text-main);
    font-size: 0.8rem;
    max-width: 170px;
    outline: none;
    transition: var(--transition);
}

.newsletter-form input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-glow);
}

.newsletter-form .btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.newsletter-msg {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.newsletter-msg.success { color: #34d399; }
.newsletter-msg.error { color: #f87171; }

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 0.4rem;
    padding-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
}

/* --- ADMIN BEJELENTKEZÉS STÍLUSOK --- */
.admin-login-body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #17110e 0%, #0c0907 100%);
    margin: 0;
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-header h2 {
    color: var(--accent-gold);
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    text-shadow: 0 0 10px var(--accent-glow);
    border-left: none;
    padding-left: 0;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-card .form-group {
    margin-bottom: 1.2rem;
}

.login-card label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.login-card .form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
}

.login-btn {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.alert.error {
    background-color: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #f87171;
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1.2rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.2rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
}

.login-footer a {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: var(--transition);
}

.login-footer a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 8px var(--accent-glow);
}