/* ==========================================================================
   1. THEME DEFINITION & VARIABLEN (Schwarz, Rot, Gelb/Gold)
   ========================================================================== */
:root {
    --bg-black: #0c0c0c;          /* Tiefschwarz für den Hintergrund */
    --card-bg: #181818;           /* Etwas helleres Schwarz für die Karten */
    --spanish-red: #a81919;       /* Kräftiges, edles Weinrot */
    --spanish-gold: #e5a93b;      /* Warmes Spanisch-Gold/Gelb */
    --text-light: #f5f5f5;        /* Gut lesbares Off-White für Texte */
    --text-muted: #b5b5b5;        /* Grauton für sekundäre Texte */
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   2. GLOBALE EINSTELLUNGEN
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-black);
    color: var(--text-light);
    font-family: var(--font-main);
    line-height: 1.7;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   3. HERO HEADER (Jetzt über die gesamte Bildschirmhöhe / Fullscreen)
   ========================================================================== */
.hero-header {
    background: linear-gradient(rgba(12, 12, 12, 0.30), rgba(12, 12, 12, 0.50)), 
                    url('/pics/4-4-jamon-iberico1-1.jpg') no-repeat center center/cover;
    background-attachment: fixed; 
    min-height: 100vh; /* <-- Von 60vh auf 100vh geändert für die volle Höhe! */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    border-bottom: 4px solid var(--spanish-red);
}

.hero-header h1 {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-light);
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-header .subtitle {
    font-size: 1.5rem;
    color: var(--spanish-gold);
    margin-bottom: 35px;
    font-style: italic;
}

/* Button-Gruppe im Hero */
.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 14px 35px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-red {
    background-color: var(--spanish-red);
    color: #ffffff;
    border: 2px solid var(--spanish-red);
}

.btn-red:hover {
    background-color: transparent;
    color: var(--spanish-red);
}

.btn-gold {
    background-color: transparent;
    color: var(--spanish-gold);
    border: 2px solid var(--spanish-gold);
}

.btn-gold:hover {
    background-color: var(--spanish-gold);
    color: var(--bg-black);
}

/* ==========================================================================
   5. ZWEI-SPALTEN-LAYOUT (Grid)
   ========================================================================== */
.main-content {
    padding: 60px 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Responsive Anpassung: Auf Handys untereinander anzeigen */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    .hero-header h1 {
        font-size: 2.5rem;
    }
}

/* ==========================================================================
   6. CARDS & INHALT
   ========================================================================== */
.restaurant-card {
    background-color: var(--card-bg);
    border: 1px solid #252525;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

.restaurant-card h2 {
    font-size: 2rem;
    color: var(--spanish-gold);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--spanish-red);
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.restaurant-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.restaurant-card p strong {
    color: var(--text-light);
}

.restaurant-card a {
    color: var(--spanish-gold);
    text-decoration: none;
    border-bottom: 2px solid var(--spanish-gold);
    transition: color 0.2s;
}

.restaurant-card a:hover {
    color: #ffffff;
    border-bottom: 1px solid #ffffff;
}

/* ==========================================================================
   7. BILDERGALERIE (Rechte Card)
   ========================================================================== */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4/3;
    border: 1px solid #333;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(80%) grayscale(15%);
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: brightness(100%) grayscale(0%);
}

/* ==========================================================================
   8. BACKEND / EDITIER-MODUS STYLES
   ========================================================================== */
.edit-textarea {
    width: 100%;
    min-height: 300px;
    background-color: #111;
    color: #fff;
    border: 1px solid var(--spanish-gold);
    padding: 15px;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 15px;
}

.btn-save {
    background-color: var(--spanish-gold);
    color: var(--bg-black);
    border: none;
}

.admin-login-link {
    display: inline-block;
    margin-top: 30px;
    font-size: 0.8rem;
    color: #333 !important;
    border: none !important;
}
.admin-login-link:hover {
    color: var(--text-muted) !important;
}

/* ==========================================================================
   9. MAIN NAVIGATION OVERLAY (Jetzt FIXIERT & RESPONSIVE)
   ========================================================================== */
.main-nav {
    position: fixed; /* <-- Fixiert die Leiste am oberen Bildschirmrand */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999; /* Bleibt über allem anderen Inhalt liegen */
    background: rgba(12, 12, 12, 0.75); /* Etwas dunkler, damit Text beim Drüberscrollen lesbar bleibt */
    backdrop-filter: blur(12px);        /* Edler Milchglas-Effekt */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    position: relative;
}

.nav-logo a {
    border: none !important;
}
.nav-logo img {
    height: 45px;
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.page-links, .social-links {
    display: flex;
    gap: 20px;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.2s ease;
    border-bottom: none !important;
}

.page-links a:hover {
    color: var(--spanish-gold);
}

.social-links {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 20px;
}

.social-links a:hover {
    color: var(--spanish-red);
}

/* HAMBURGER BUTTON (Standardmäßig auf PCs unsichtbar) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10000;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Verwandelt die drei Striche bei Klick in ein "X" */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================================================
   SMARTPHONE OPTIMIERUNG (Unterbrechen bei 768px Breite)
   ========================================================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex; /* Hamburger aktivieren */
    }

    .nav-menu {
        position: absolute;
        top: 100%; /* Dockt direkt unter der Nav-Leiste an */
        left: 0;
        width: 100%;
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 0;
        
        /* Unsichtbar machen via max-height für eine geschmeidige Animation */
        max-height: 0; 
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Wenn das Menü offen ist, klappt es sanft auf */
    .nav-menu.active {
        max-height: 350px; 
        padding: 25px 0;
    }

    .page-links, .social-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 20px;
    }

    .page-links {
        padding-bottom: 20px;
    }

    /* Der Trennstrich wird auf dem Handy horizontal */
    .social-links {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 0;
        padding-top: 20px;
        width: 80%;
    }
    
    .nav-menu a {
        font-size: 1.1rem; /* Bessere Klickbarkeit auf Touchscreens */
    }
}

/* ==========================================================================
   10. WEITERLESEN (READ MORE) FUNKTION
   ========================================================================== */
.read-more-wrapper {
    position: relative;
}

.read-more-content {
    max-height: 250px; /* Hier stellst du ein, wie viel Text am Anfang sichtbar ist (ca. 1/3) */
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease-in-out; /* Macht das Ausfahren butterweich */
}

/* Der magische "Ausblend-Effekt" am Textende */
.read-more-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    /* Verläuft von transparent zu deiner Karten-Hintergrundfarbe */
    background: linear-gradient(transparent, var(--card-bg));
    transition: opacity 0.3s ease;
    pointer-events: none; /* Verhindert, dass der Schleier Klicks blockiert */
}

/* Wenn der User auf "Weiterlesen" klickt, feuert diese Klasse */
.read-more-wrapper.is-expanded .read-more-content {
    max-height: 1500px; /* Groß genug, damit jeder Text komplett reinpasst */
}

/* Schleier verschwinden lassen, wenn der Text ganz offen ist */
.read-more-wrapper.is-expanded .read-more-content::after {
    opacity: 0;
}

/* Styling für den "Weiterlesen"-Link/Button */
.read-more-btn {
    background: transparent;
    border: none;
    color: var(--spanish-gold);
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    padding: 15px 0 0 0;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.read-more-btn:hover {
    color: #ffffff;
}

/* ==========================================================================
   11. LIGHTBOX (BUGFIX-VERSION: Absolut sicher gegen Layout-Leaks)
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    
    /* ÄNDERUNG: Standardmäßig komplett ausschalten und unsichtbar machen */
    display: none; 
    
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

/* Wird per JS aktiv geschaltet */
.lightbox.is-active {
    /* ÄNDERUNG: Wird erst beim Klick zu einem sichtbaren Flex-Container */
    display: flex !important; 
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border: 3px solid var(--spanish-gold, #f1c40f);
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    border-radius: 4px;
}

/* Schließen-Button oben rechts */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}
.lightbox-close:hover {
    color: var(--spanish-red);
}

/* Diese Klasse ersetzt deine alten Inline-Styles und fixiert das Layout */
.res-content-box {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-light);
    white-space: pre-wrap;
    margin-bottom: 30px;
}

/* Wenn der Editor aktiv ist, erzwingen wir exakt das gleiche Aussehen */
.res-content-box .cms-editable {
    display: block !important;
    line-height: 1.7 !important;
    white-space: pre-wrap !important;
    background: transparent !important;
}

@media (max-width: 768px) {
    /* Wir zwingen die .restaurant-card in den Flex-Modus */
    .contact-page .restaurant-card {
        display: flex;
        flex-direction: column;
        align-items: center;    /* Zentriert alles horizontal */
        text-align: center;     /* Fallback für Text-Elemente */
    }

    /* Überschriften: Stellen sicher, dass sie nicht linksbündig kleben */
    .contact-page .restaurant-card h2 {
        width: 100%;
    }

    /* Buttons: Werden durch die Flex-Card oben automatisch zentriert */
    .contact-page .restaurant-card .hero-buttons {
        justify-content: center;
        width: 100%;
    }
}

/* --- NEUE STYLES FÜR NAV-MITTE --- */
.nav-center-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.call-btn {
    background-color: var(--spanish-red);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.call-btn:hover {
    background-color: var(--spanish-gold);
    color: var(--bg-black);
}

.social-links-inline {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-links-inline a {
    color: var(--text-light); /* Oder var(--spanish-gold) */
    transition: color 0.3s ease;
}

.social-links-inline a:hover {
    color: var(--spanish-gold);
}

/* --- OPTIMIERUNG DER RESPONSIVEN ANSICHT --- */
@media (max-width: 768px) {
    /* Versteckt den Call-Button auf sehr kleinen Bildschirmen teilweise oder passt ihn an */
    .nav-center-actions {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* --- FOOTER STYLES --- */
.main-footer {
    text-align: center;
    padding: 40px 0;
    background-color: var(--bg-black); /* Passend zu deinem Design */
    color: var(--text-light);
}

.main-footer p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--spanish-gold);
}

.admin-login-link {
    font-size: 0.75rem;
    color: #444;
    text-decoration: none;
}