/*
Theme Name: Alberto Novoa Abogado
Theme URI: https://albertonovoa-abogados.es
Author: Teresa Novoa
Description: V14 - Fix de Enlaces Azules y Menú Móvil Roto.
Version: 14.0
*/

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@300;400;700&display=swap');

:root {
    --novoa-blue: #0B2545;
    --novoa-dark: #061425;
    --novoa-gold: #C5A059;
    --novoa-gray: #F8F9FA;
    --novoa-text: #333;
}

/* =========================================
   1. RESETEO GLOBAL (MATAR ENLACES AZULES)
   ========================================= */
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; background: #fff; }

/* ESTO ELIMINA EL AZUL Y SUBRAYADO EN TODA LA WEB */
a, a:visited, a:hover, a:active {
    text-decoration: none !important;
    color: inherit;
}

/* Tipografía Base */
.novoa-wrapper { font-family: 'Bodoni Moda', serif; color: var(--novoa-text); line-height: 1.6; width: 100%; box-sizing: border-box; overflow-x: hidden; }
.novoa-wrapper p { font-size: 1.125rem; line-height: 1.75; margin-bottom: 1.5rem; }
.novoa-wrapper h1, .novoa-wrapper h2, .novoa-wrapper h3, .novoa-wrapper h4 {
    font-family: 'Bodoni Moda', serif; font-weight: 700; margin-bottom: 1rem; color: var(--novoa-blue);
}
.novoa-section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; }
.novoa-bg-gray { background-color: var(--novoa-gray); }

/* =========================================
   2. HEADER Y MENÚ (DESKTOP)
   ========================================= */
.novoa-nav { 
    position: sticky; top: 0; background: #fff; padding: 12px 28px; z-index: 1000; border-bottom: 1px solid rgba(6,20,37,0.08); 
    display: flex !important; justify-content: space-between !important; align-items: center !important; 
}

/* Logo */
.novoa-logo { color: var(--novoa-blue) !important; font-size: 1rem; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.logo-badge { 
    width: 36px !important; height: 36px !important; padding: 3px; border-radius: 6px; 
    box-shadow: 0 1px 6px rgba(0,0,0,0.08); display: inline-flex !important; align-items: center; justify-content: center;
}
.logo-badge img { width: 100% !important; height: 100% !important; object-fit: contain; }

/* Menú Desktop - Enlaces */
.novoa-menu { display: flex !important; gap: 30px; align-items: center; }
.novoa-menu a { 
    color: var(--novoa-blue) !important; 
    font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; 
    border-bottom: none; text-decoration: none !important;
}
.novoa-menu a:hover { color: var(--novoa-gold) !important; }

/* Ocultar Hamburguesa en Desktop */
.menu-toggle { display: none !important; }


/* =========================================
   3. COMPONENTES DE PÁGINA (DESKTOP)
   ========================================= */

/* HERO */
.novoa-hero { background-color: var(--novoa-blue); background-size: cover; background-position: center top; color: #fff; min-height: 70vh; display: flex; align-items: center; padding: 0 5%; }
.novoa-hero h1 { font-size: 3.5rem; margin-bottom: 1rem; line-height: 1.1; color: #fff; text-shadow: 2px 2px 10px rgba(0,0,0,0.8); }

/* BOTONES */
.novoa-btn { 
    background-color: var(--novoa-gold) !important; color: #fff !important; 
    padding: 16px 40px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; 
    display: inline-block; border: 1px solid var(--novoa-gold) !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); border-radius: 10px; text-decoration: none !important;
}

/* STATS */
.novoa-stats { 
    display: flex !important; justify-content: center !important; flex-wrap: wrap; gap: 60px; text-align: center; 
    background-color: var(--novoa-blue); color: #fff; padding: 40px 20px; 
}
.novoa-stat-item h3 { color: var(--novoa-gold) !important; font-size: 2.5rem; margin: 0; }

/* GRIDS */
.novoa-about-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.novoa-about-img { width: 100% !important; max-height: 450px !important; object-fit: cover !important; box-shadow: 20px 20px 0px var(--novoa-gold); height: auto !important; }

.novoa-services-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important; gap: 30px !important; }
.novoa-card { background: #fff; padding: 40px 30px; border-top: 4px solid var(--novoa-blue); box-shadow: 0 5px 20px rgba(0,0,0,0.05); height: 100% !important; display: flex !important; flex-direction: column; }

/* NOTICIAS */
.novoa-news-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; gap: 40px !important; margin-top: 40px; width: 100% !important; }
.novoa-news-card { background: #fff; border: 1px solid #eee; display: flex; flex-direction: column; height: 100% !important; text-decoration: none !important; }
.novoa-news-img { width: 100% !important; height: 220px !important; object-fit: cover !important; margin: 0 !important; }
.novoa-news-link { color: var(--novoa-blue) !important; font-weight: 700; text-decoration: none !important; }

/* FOOTERS */
.novoa-prefooter { background-color: var(--novoa-blue); color: #fff; padding: 80px 20px; text-align: center !important; border-top: 5px solid var(--novoa-gold); }
.novoa-prefooter .novoa-btn { background-color: transparent !important; border-color: #fff !important; color: #fff !important; }

.novoa-footer { background-color: var(--novoa-dark); color: #eee !important; padding: 60px 20px; font-size: 0.9rem; }
.novoa-footer-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; gap: 40px !important; max-width: 1100px; margin: 0 auto; }
.novoa-footer h4 { color: #fff !important; text-transform: uppercase; margin-bottom: 20px; font-weight: 700; }
.novoa-footer p, .novoa-footer a { color: #eee !important; text-decoration: none !important; }


/* SINGLE POST */
.single-header { text-align: center; padding: 60px 20px; background: var(--novoa-gray); }
.single-thumbnail { max-width: 900px !important; max-height: 350px !important; width: 100% !important; object-fit: contain !important; margin: 0 auto 30px !important; display: block !important; }
.single-content strong, .single-content b { color: var(--novoa-gold) !important; font-weight: 700 !important; }
.single-content img { max-height: 300px !important; object-fit: contain !important; width: auto !important; display: block !important; margin: 15px auto !important; }


/* =========================================
   4. RESPONSIVE / MÓVIL (Max-width: 768px)
   ========================================= */
/* =========================================
   RESPONSIVE / MÓVIL (Max-width: 768px)
   ========================================= */
@media (max-width: 768px) { 
    
    /* 1. NAVEGACIÓN MÓVIL */
    .novoa-nav { 
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative;
        padding: 12px 20px;
    }
    
    /* Logo se mantiene a la izquierda */
    .novoa-logo {
        order: 1;
        font-size: 0.9rem;
    }
    /* 2. BOTÓN HAMBURGUESA (Visible y Estilizado) */
    .menu-toggle { 
        display: flex !important; /* Visible en móvil */
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 1px solid var(--novoa-blue); /* Borde para verlo mejor */
        border-radius: 4px;
        padding: 0;
        cursor: pointer;
        z-index: 1001;
        order: 2; /* A la derecha */
    }

    /* Dibujo de las 3 líneas */
    .hamburger-box { width: 24px; height: 24px; display: inline-block; position: relative; }
    .hamburger-inner {
        display: block; top: 50%; margin-top: -2px;
    }
    .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
        width: 24px; height: 3px; background-color: var(--novoa-blue); border-radius: 4px; position: absolute; transition: transform 0.15s ease;
    }
    .hamburger-inner::before, .hamburger-inner::after { content: ""; display: block; }
    .hamburger-inner::before { top: -8px; }
    .hamburger-inner::after { bottom: -8px; }

    /* Estado Activo (X) */
    .menu-toggle[aria-expanded="true"] .hamburger-inner { transform: rotate(45deg); }
    .menu-toggle[aria-expanded="true"] .hamburger-inner::before { top: 0; opacity: 0; }
    .menu-toggle[aria-expanded="true"] .hamburger-inner::after { bottom: 0; transform: rotate(-90deg); }


    /* 3. MENÚ DESPLEGABLE (Cerrado por defecto) */
    .novoa-menu { 
        display: none !important; /* Oculto por defecto en móvil */
        flex-direction: column;
        width: 100%;
        background: #fff;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 10px 0;
        gap: 0;
    }
    
    /* CRÍTICO: Solo se muestra si tiene la clase .is-active */
    .novoa-menu.is-active { 
        display: flex !important;
        flex-direction: column !important;
    }

    .novoa-menu a { 
        padding: 15px 20px !important; 
        border-bottom: 1px solid #f0f0f0 !important; 
        width: 100% !important; 
        display: block !important; 
        font-size: 1.1rem !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    /* 4. AJUSTES GENERALES MÓVIL */
    .novoa-footer, .novoa-section { padding-left: 20px !important; padding-right: 20px !important; }
    .novoa-about-grid, .novoa-services-grid, .novoa-news-grid, .novoa-footer-grid { grid-template-columns: 1fr !important; gap: 30px !important; }
    .novoa-stats { gap: 30px !important; }
    .novoa-hero h1 { font-size: 2.2rem !important; }
    .logo-badge { width: 30px !important; height: 30px !important; }
    
    /* Botones */
    .novoa-btn { padding: 14px 25px !important; width: auto !important; margin: 0 auto; display: table; }
}