/* --- ALAPBEÁLLÍTÁSOK ÉS VÁLTOZÓK --- */
:root {
    --primary-color: #0f3460;      /* Mély mediterrán tengerkék */
    --secondary-color: #16537e;    /* Világosabb kék */
    --accent-color: #d97706;       /* Meleg naplemente narancs/arany */
    --accent-hover: #b45309;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --radius: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- FEJLÉC ÉS SPANYOL ZÁSZLÓS BADGE --- */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-align: center;
    padding: 50px 20px;
}

header .brand-badge {
    display: inline-block;
    background: #f1bf00;            /* Spanyol sárga háttér */
    color: #0f3460;                /* Sötét betűszín */
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 700;
    border: 3px solid #aa151b;     /* Spanyol piros keret */
    box-shadow: inset 0 0 0 2px #aa151b; 
}

header h1 {
    font-size: 2.3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header h2 {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 25px;
}

/* --- IDŐPONTFOGLALÓ OPCIÓK ÉS HÉT VÁLASZTÓ --- */
.booking-options {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.option-button {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.option-button.active, .option-button:hover {
    background-color: #aa151b;      /* Spanyol piros */
    color: var(--white);
    border: 2px solid #f1bf00;      /* Spanyol sárga keret */
}

.weekNav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    font-weight: 600;
    color: var(--white);
}

.weekNav button {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.weekNav button:hover {
    background-color: #aa151b;
    border-color: #f1bf00;
}

#currentWeekLabel {
    font-size: 1.1rem;
}

/* --- NAPTÁR RÁCS ÉS IDŐPONT SLOTOK (5 oszlopos, ultra lapos elrendezés) --- */
#calendarGrid {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px; 
    align-items: start;
}

#calendarGrid > div {
    background: var(--bg-light);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* A nap fejléce */
.day-header {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 3px 2px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

/* Időpont slotok - szinkronizálva a nap fejlécek lapos méretével */
.time-slot {
    background: var(--white);
    border: 1px solid #cbd5e1;
    padding: 3px 4px; 
    text-align: center;
    border-radius: 4px;
    margin: 3px 0; 
    font-size: 0.85rem; 
    transition: all 0.15s ease;
    color: var(--text-dark);
    position: relative;
}

/* Múltbeli nap fejléc */
.past-day .day-header {
    background: #e2e8f0 !important;
    opacity: 0.7;
}

/* Múltbeli szabad időpont */
.time-slot.past-time {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    opacity: 0.5;
    cursor: not-allowed;
}

.time-slot.past-time::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(200, 200, 200, 0.2) 5px,
        rgba(200, 200, 200, 0.2) 10px
    );
    pointer-events: none;
}

/* Múltbeli foglalt időpont */
.time-slot.past-booked {
    background: #fecaca !important;
    opacity: 0.6;
    cursor: not-allowed;
    border: 1px solid #f87171 !important;
}

.time-slot.past-booked::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 5px,
        rgba(255, 255, 255, 0.3) 5px,
        rgba(255, 255, 255, 0.3) 10px
    );
    pointer-events: none;
}

/* Jövőbeli foglalt időpont */
.time-slot.booked:not(.past-booked) {
    background: #f87171;
    color: white;
    cursor: not-allowed;
    opacity: 0.9;
    font-weight: 500;
}

/* Hover effekt csak a foglalható időpontoknál (Asztali gép) */
@media (hover: hover) {
    .time-slot:not(.booked):not(.past-time):not(.past-booked):hover {
        background: #f1bf00;
        color: var(--primary-color);
        border-color: #aa151b;
        transform: scale(1.02);
        cursor: pointer;
    }
}

/* Tooltip szövegek */
.time-slot.past-time:hover::before,
.time-slot.past-booked:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

/* --- GOMBOB ÉS MODÁL DIALÓGUSOK --- */
.btn1 {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1rem;
    text-align: center;
    background-color: #f1bf00;      
    color: #0f3460;                 
    border: 2px solid #aa151b;      
    box-shadow: 0 4px 12px rgba(170, 21, 27, 0.25);
}

@media (hover: hover) {
    .btn1:hover {
        background-color: #aa151b;      
        color: var(--white);            
        border: 2px solid #f1bf00;      
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(241, 191, 0, 0.35);
    }
}

.btn1:active {
    background-color: #aa151b;      
    color: var(--white);            
    border: 2px solid #f1bf00;      
    transform: scale(0.98);
}

/* Modális ablak */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.modal-content {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius);
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.modal-close {
    position: absolute;
    top: 15px; right: 20px;
    cursor: pointer;
    font-size: 22px;
    color: var(--text-muted);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.modal-content label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.modal-content input, .modal-content textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 35px 20px;
    font-size: 0.95rem;
    margin-top: 40px;
}

footer a {
    color: var(--white);
    text-decoration: underline;
}

/* --- RESZPONZIVITÁS KISEBB KÉPERNYŐKRE --- */
@media (max-width: 1024px) {
    #calendarGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #calendarGrid {
        grid-template-columns: 1fr;
    }
}