/*
Theme Name: OGAE Romania
Description: Tema custom adaptivă cu meniu full-screen și auto-centrare media.
Author: Gemini
Version: 1.2
*/

:root {
    --bg-dark: #111625;
    --text-light: #ffffff;
    --brand-light-blue: #a6dff5;
    --brand-dark-blue: #00275e;
    --font-main: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================
   HEADER DESKTOP
   ========================================= */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Am scos border-bottom-ul vechi de aici */
}

/* Banda Neon - Vibe Eurovision */
.site-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px; /* Grosimea benzii LED */
    /* Un gradient cu culori tipice de scena: Albastru brand, Roz aprins, Galben logo */
    background: linear-gradient(90deg, var(--brand-light-blue), #ff007f, #f1c40f, var(--brand-light-blue));
    background-size: 300% 100%;
    animation: neon-esc 4s linear infinite;
    /* Efectul de stralucire in afara benzii (glow) */
    box-shadow: 0px 2px 15px rgba(255, 0, 127, 0.6), 
                0px 2px 30px rgba(166, 223, 245, 0.4);
    z-index: 1002;
}

/* Animatia care face culorile sa 'curga' pe banda */
@keyframes neon-esc {
    0% { background-position: 0% 0; }
    100% { background-position: 100% 0; }
}

.site-logo {
    height: 45px;
    width: auto;
}

/* Container pentru Meniu si Butoane pe Desktop */
.header-right-area {
    display: flex;
    align-items: center;
    gap: 40px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: var(--brand-light-blue);
}

/* Styling Butoane Header */
.header-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-light {
    background-color: var(--brand-light-blue);
    color: var(--brand-dark-blue);
}

.btn-light:hover {
    background-color: #ffffff;
}

.btn-dark {
    background-color: var(--brand-dark-blue);
    color: var(--text-light);
    border: 1px solid #1a3c6d;
}

.btn-dark:hover {
    background-color: #001a40;
}

/* Butoane Meniu Ascunse pe Desktop */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    z-index: 1001; /* Ramane deasupra meniului full-screen */
}

.hamburger .close-icon {
    display: none;
}

/* Efect deschidere/inchidere iconita hamburger */
.menu-toggle:checked ~ .hamburger .menu-icon {
    display: none;
}
.menu-toggle:checked ~ .hamburger .close-icon {
    display: block;
}

/* =========================================
   GRID ADAPTIV POSTARI (INDEX)
   ========================================= */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 30px;
}

.post-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 350px;
    border: 2px solid transparent;
    transition: 0.3s;
}

.post-card.featured {
    grid-column: 1 / -1;
    height: 450px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: var(--bg-dark);
}

.post-card.regular {
    border-color: var(--brand-light-blue);
}

.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-title-box {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    
    /* Limităm lățimea pentru a păstra 20px și în dreapta (20 stânga + 20 dreapta = 40) */
    max-width: calc(100% - 40px); 
    box-sizing: border-box; /* Ne asigurăm că padding-ul nu strică dimensiunea calculată */
    word-wrap: break-word; /* Forțează textul lung să treacă pe rândul următor */
}

.post-title-box h2 {
    margin: 0;
    color: var(--brand-dark-blue);
    font-size: 18px;
    text-transform: uppercase;
}

/* =========================================
   POST META (AUTOR, DATA, CATEGORIE)
   ========================================= */
.post-meta {
    display: flex;
    flex-wrap: wrap; /* Pe telefoane mici trece pe rândul următor dacă nu e loc */
    gap: 20px;
    margin-bottom: 30px;
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6); /* Un alb ușor transparent */
    font-weight: 500;
}

.post-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Culoarea iconițelor */
.post-meta .meta-item i {
    color: var(--brand-light-blue);
    font-size: 14px;
}

/* Link-urile (ex: categoriile sunt link-uri în WordPress) */
.post-meta a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
}

.post-meta a:hover {
    color: var(--brand-light-blue);
}

/* =========================================
   HERO SECTION (SINGLE POST)
   ========================================= */
.entry-hero {
    position: relative;
    width: 100%;
    height: 500px; /* Înălțimea maximă cerută */
    overflow: hidden;
    background-color: #000;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Poza ocupă tot spațiul fără să se deformeze */
    display: block;
}

/* Gradientul de la Negru (jos) la Transparent (sus) */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding-bottom: 40px; /* Distanța de jos */
    z-index: 2;
}

.entry-title {
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

/* Meta-ul de sub titlu în Hero */
.post-meta-hero {
    display: flex;
    gap: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
}

.post-meta-hero .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta-hero i {
    color: var(--brand-light-blue);
}

.post-meta-hero a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-meta-hero a:hover {
    color: var(--brand-light-blue);
}

/* Ajustări pentru conținutul de sub Hero */
.single-content-body {
    padding-top: 40px;
    line-height: 1.8;
}

/* RESPONSIVE HERO */
@media (max-width: 768px) {
    .entry-hero {
        height: 350px; /* Mai mic pe mobil */
    }
    .entry-title {
        font-size: 28px;
    }
    .post-meta-hero {
        flex-direction: column;
        gap: 10px;
    }
}

/* =========================================
   CENTRARE AUTOMATĂ (SINGLE POST MEDIA)
   ========================================= */
.single-content img,
.single-content iframe,
.content-body img,
.content-body iframe {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}

.single-content iframe,
.content-body iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 800px;
    border-radius: 10px;
    border: none;
}

/* =========================================
   PAGINARE FINĂ
   ========================================= */
.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 50px 0;
}

.custom-pagination a,
.custom-pagination span {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
}

.nav-arrow {
    background: var(--brand-light-blue);
    color: var(--brand-dark-blue) !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* =========================================
   FOOTER GRID & SOCIAL
   ========================================= */
.site-footer {
    background: #0a0d16;
    padding: 60px 0 30px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
}

.footer-col h4 {
    color: var(--brand-light-blue);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.social-links {
    display: flex;
    gap: 15px;
    font-size: 24px;
}

.social-links a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.social-links a:hover {
    color: var(--brand-light-blue);
}

/* Design Meniu Footer */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 2.2;
}

.footer-menu li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    transition: 0.3s;
}

.footer-menu li a:hover {
    color: var(--brand-light-blue);
    padding-left: 5px;
}

/* =========================================
   MEDIA QUERIES (MENIU MOBIL FULL SCREEN)
   ========================================= */
@media (max-width: 992px) {
    /* Afisam iconita hamburger */
    .hamburger {
        display: block;
    }

    /* Transformam containerul din dreapta in ecran complet ascuns */
    .header-right-area {
        position: fixed;
        top: 0;
        right: -100%; /* Ascuns in afara ecranului la dreapta */
        width: 100vw;
        height: 100vh;
        background: rgba(17, 22, 37, 0.98); /* Fundal overlay */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 50px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 999; /* Sub iconita hamburger care ramane fixa */
    }

    /* Cand bifezi hamburgerul, meniul gliseaza pe ecran */
    .menu-toggle:checked ~ .header-right-area {
        right: 0;
    }

    /* Ajustari font si pozitie in meniul full-screen */
    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .main-navigation a {
        font-size: 24px; /* Linkuri mari pe mobil */
    }

    /* Ajustari butoane in meniul full-screen */
    .header-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        gap: 20px;
    }

    .header-buttons .btn {
        text-align: center;
        width: 100%;
        padding: 15px;
        font-size: 16px;
        box-sizing: border-box;
    }
}

/* =========================================
   MEDIA QUERIES (TELEFOANE MICI)
   ========================================= */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-card.featured {
        height: 350px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* =========================================
   SEARCH MODAL & ICON
   ========================================= */
.search-icon-btn {
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.search-icon-btn:hover { 
    color: var(--brand-light-blue); 
}

/* Fundalul Modalului */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 22, 37, 0.98);
    backdrop-filter: blur(10px);
    z-index: 2000; /* Peste orice alt element */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Efectul de afișare când iconița e apăsată */
.search-toggle:checked ~ .search-modal {
    opacity: 1;
    visibility: visible;
}

/* Butonul X pentru închidere */
.close-search {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: 0.3s;
}

.close-search:hover { 
    color: #ff007f; /* Accent roz-neon specific designului tău */
}

/* Animația conținutului */
.search-modal-content {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
    transform: translateY(-30px);
    transition: transform 0.4s ease;
}

.search-toggle:checked ~ .search-modal .search-modal-content {
    transform: translateY(0);
}

.search-modal-content h2 {
    color: var(--brand-light-blue);
    margin-bottom: 30px;
    font-size: 28px;
    text-transform: uppercase;
}

/* Suprascrierea designului formularului pentru Modal */
.search-modal .search-box {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 10px;
    transition: border-color 0.3s;
}

.search-modal .search-box:focus-within {
    border-bottom-color: var(--brand-light-blue);
}

.search-modal .search-field {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    width: 100%;
    outline: none;
    font-family: var(--font-main);
}

.search-modal .search-field::placeholder { 
    color: rgba(255, 255, 255, 0.3); 
}

.search-modal .search-submit {
    background: transparent;
    border: none;
    color: var(--brand-light-blue);
    font-size: 24px;
    cursor: pointer;
    transition: 0.3s;
}

.search-modal .search-submit:hover { 
    color: white; 
}