/* 🌙☀️ Modern, mobilbarát CSS két színsémával (light/dark) */
body.light {
    --primary-color: #0c454f;    /* türkiz */
    --secondary-color: #f97316;  /* korall */
    --dark-bg: #f1f5f9;
    --light-bg: #ffffff;
    --text-color: #1e293b;
    --hover-color: #0891b2;
    --shadow-color: rgba(0,0,0,0.15);
    --border-color: #e2e8f0;
}
body.dark {
    --primary-color: #06b6d4;
    --secondary-color: #f97316;
    --dark-bg: #0f172a;
    --light-bg: #1e293b;
    --text-color: #f1f5f9;
    --hover-color: #22d3ee;
    --shadow-color: rgba(0,0,0,0.6);
    --border-color: #334155;
}

/* Globális */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}
header {
    background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
    color: var(--light-bg);
    padding: 0.8rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px var(--shadow-color);
    border-bottom: 3px solid var(--secondary-color);
    display: flex; flex-direction: column; align-items: center;
}
.logo {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    letter-spacing: 2px;
    text-shadow: none;
    animation: fadeIn 1s ease-in;
}
header p { margin: 0.3rem 0 0; font-size: 0.9rem; font-style: italic; }
.menu-toggle, .theme-toggle {
    background: none;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.menu-toggle { position: absolute; top: 0.7rem; right: 0.7rem; padding: 0.4rem 0.8rem; }
.theme-toggle { position: absolute; top: 0.7rem; left: 0.7rem; padding: 0.4rem 0.6rem; }
.menu-toggle:hover, .theme-toggle:hover { background: var(--hover-color); color: #fff; transform: scale(1.1); }

/* Oldalsáv */
.sidebar {
    width: 250px; background: var(--light-bg);
    position: fixed; top: 0; left: -250px; height: 100%;
    transition: left 0.4s; padding-top: 5rem;
    box-shadow: 2px 0 10px var(--shadow-color); z-index: 1000;
    border-right: 2px solid var(--secondary-color);
}
.sidebar.active { left: 0; }
.sidebar a { display: block; padding: 1rem; font-weight: 600; text-decoration: none; color: var(--text-color); border-bottom: 1px solid var(--border-color); transition: 0.3s; }
.sidebar a:hover { background: var(--primary-color); color: #fff; transform: translateX(10px); }

/* Szekciók */
section {
    padding: 2rem; max-width: 1200px; margin: 1.5rem auto;
    background: var(--light-bg); border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}
h2 {
	font-size: 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

/* Kontakt */
.contact-info {
    background: var(--dark-bg); padding: 1.2rem; border-radius: 8px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.1);
}
.contact-info:hover { box-shadow: 0 6px 15px rgba(0,0,0,0.2); }

/* Hirdetőtábla */
#hirdetotabla-board { 
    background: #e2e8f0; /* Ezüstös háttér */
    padding: 1.5rem; 
    border-radius: 12px; 
    color: #1e293b; /* Sötétszürke szöveg */
    border: 3px solid #ef4444; /* Vörös keret */
}
.hirdetotabla-container { display: flex; flex-direction: column; gap: 0.6rem; }
.hirdetotabla {
    background: #fff; /* Fehér háttér a hirdetéseknek */
    padding: 0.8rem; 
    border-radius: 8px; 
    font-size: 1rem; 
    color: #06b6d4; /* Türkiz szöveg */
    opacity: 0; 
    animation: slideInFromLeft 0.6s forwards;
    border: 1px solid #94a3b8; /* Finom szürke keret */
	
}
.hirdetotabla p {margin: 0;}

/* Referenciák */
.reference-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.2rem; }
.reference-box {
    background: var(--light-bg); border: 2px solid var(--primary-color);
    padding: 1.2rem; border-radius: 12px; text-align: center;
    transition: all 0.3s; box-shadow: 0 2px 8px var(--shadow-color);
}
.reference-box:hover { background: var(--primary-color); color: #fff; border-color: var(--secondary-color); transform: scale(1.04); }
.reference-box a { color: red;}
.reference-box a:hover { color: yellow;}
.reference-box p { font-weight: 600; font-size: 1rem; margin-bottom: 0.5rem; }

/* Gomb */
.details-button {
    display: block; width: 80%; max-width: 300px; margin: 1.2rem auto 0;
    padding: 0.7rem 1.2rem; background: var(--secondary-color); color: #fff;
    border-radius: 8px; font-weight: 700; text-align: center;
    transition: 0.3s; box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.details-button:hover { background: var(--primary-color); transform: translateY(-2px); }

/* Footer */
footer {
    background: var(--primary-color);
    color: #fff; text-align: center; padding: 1.5rem;
    letter-spacing: 1px;
}

/* Modal */
.map-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.9); }
.map-content { position: relative; width: 100%; height: 100%; }
.map-close {
    position: absolute; top: 15px; right: 20px;
    background: var(--secondary-color); color: #fff;
    border: none; font-size: 1.5rem; border-radius: 50%;
    width: 40px; height: 40px; cursor: pointer;
    z-index: 2100; transition: 0.3s;
}
.map-close:hover { background: var(--primary-color); }

/* Térkép konténer */
#map {
    width: 100%;
    height: 100%;
    background-color: #ccc; /* Hátteret ad a betöltés idejére */
}

/* ADMIN.PHP STÍLUSAI */
.login-body {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1549692520-acc6669e2321?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
}
.login-body header, .login-body footer {
    background: none;
    box-shadow: none;
    border-bottom: none;
    color: #fff;
}
.login-container {
    padding: 2rem;
    max-width: 600px;
    margin: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.login-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: var(--text-color);
}
.admin-section {
    padding: 2rem;
    max-width: 900px;
    margin: 1.5rem auto;
    background: var(--light-bg);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    text-align: left;
}
.login-form, .crud-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}
.login-form label, .crud-form label {
    width: 100%;
    text-align: left;
    font-weight: 600;
}
.login-form input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    border-radius: 6px;
    box-sizing: border-box;
}

.admin-section h2 { text-align: left; }
.crud-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 2px solid #000; /* Fekete szegély */
    border-radius: 6px;
    background-color: var(--dark-bg);
    color: var(--text-color);
    box-sizing: border-box;
}
.crud-form button, .login-form button, .logout-button {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}
.crud-form button:hover, .login-form button:hover, .logout-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}
.announcement-table-container {
    overflow-x: auto;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
}
table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--light-bg);
}
th, td {
    text-align: left;
    padding: 1rem;
    border: 1px solid #000; /* Fekete szegély a táblázathoz */
}
thead tr {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}
tbody tr:nth-child(even) {
    background-color: var(--dark-bg);
}
td:first-child { width: 70%; }
.button-cell {
    width: 30%;
    white-space: nowrap;
}
.update-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.update-form textarea {
    min-height: 50px;
    background-color: var(--dark-bg);
    color: var(--text-color);
    border: 2px solid #000; /* Fekete szegély */
    padding: 0.5rem;
    border-radius: 6px;
}
.button-group {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.update-button {
    background-color: var(--primary-color);
}
.update-button:hover {
    background-color: var(--hover-color);
}
.delete-button {
    background-color: #ef4444; /* Piros a törléshez */
}
.delete-button:hover {
    background-color: #dc2626;
}
.logout-button {
    display: inline-block;
    margin-top: 2rem;
    background-color: #94a3b8; /* Szürke szín */
}
.logout-button:hover {
    background-color: #64748b;
}
.no-hirdetotabla {
    color: var(--text-color);
    font-style: italic;
    padding: 1rem;
}

/* Animációk */
@keyframes slideInFromLeft { from {transform:translateX(-100%);opacity:0;} to {transform:translateX(0);opacity:1;} }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }

/* Mobil */
@media (max-width:768px) {
    header { flex-direction: row; justify-content: space-between; align-items: center; padding: 0.8rem 1rem; }
    header p { display:none; }
    .logo { font-size: 1.4rem; }
    section, #hirdetotabla-board { padding: 1rem; }
    .hirdetotabla { font-size: 1rem; }
    .login-section { padding: 1.5rem; }
    .announcement-table-container {
        border: none;
        box-shadow: none;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead {
        display: none;
    }
    tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }
    td {
        border-bottom: 1px solid var(--border-color);
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    td:last-child {
        border-bottom: none;
    }
    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 1rem;
        font-weight: bold;
        text-align: left;
        color: var(--primary-color);
    }
    .button-group {
        justify-content: flex-end;
    }
    .update-form textarea {
        width: 100%;
        box-sizing: border-box;
    }
}