
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; overflow-x: hidden; color: #333; background-color: #fff; }
body.no-scroll { overflow: hidden; }


.hero-penal {
    position: relative;
    height: 100vh; 
    width: 100%;
    /* REEMPLAZA CON TU IMAGEN DE FONDO */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('penalfondoardiles.webp') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1; 
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    padding: 0 20px;
}

.titulo-elegante {
    font-family: 'Playfair Display', serif; 
    font-size: 5rem; /* Un poco más grande para "Derecho Penal" */
    color: #ffffff; 
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6);
}

.subtitulo-limpio {
    font-family: 'Open Sans', sans-serif; 
    font-size: 1.4rem;
    color: #b6b4bb;
    margin-bottom: 400px;
    font-weight: 400;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
}

/* =========================================================
   3. BARRA DE NAVEGACIÓN
   ========================================================= */
.navbar {
    position: absolute; top: 40px; left: 0;   
    background-color: rgba(13, 18, 43, 0.7); /* Azul muy oscuro/transparente */
    backdrop-filter: blur(4px); 
    padding: 12px 40px 12px 20px;
    border-radius: 0 8px 8px 0; 
    display: flex; align-items: center; z-index: 100;
}
.logo-container { display: none; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { color: #ffffff; text-decoration: none; font-size: 14px; font-weight: 400; font-family: 'Open Sans', sans-serif; transition: color 0.3s ease; }
.nav-links a:hover { color: #eab332; }

/* =========================================================
   4. BOTÓN HERO
   ========================================================= */
.btn-conocer {
    display: inline-block; background-color: #eab332; color: #ffffff;
    border: none; cursor: pointer; font-family: 'Open Sans', sans-serif;
    padding: 16px 45px; border-radius: 8px; font-size: 1.2rem;
    font-weight: 600; transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-conocer:hover { background-color: #d19f2a; transform: translateY(-2px); }

/* =========================================================
   5. SECCIÓN OCULTA (Se despliega)
   ========================================================= */
.seccion-oculta {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background-color: transparent; 
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
    width: 100%;
    position: relative;
    z-index: 10;
    top: -60px; /* Sube la sección para superponerse al Hero */
    margin-bottom: -60px;
}

.seccion-oculta.activa {
    max-height: 2000px; /* Suficiente espacio para que se expanda */
    opacity: 1;
}

.servicio-container {
    background-color: #ffffff;
    border-radius: 60px 60px 0 0; 
    padding: 80px 8%;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

/* Layout de 2 Columnas */
.penal-layout {
    display: flex;
    justify-content: space-between;
    gap: 50px;
}

/* COLUMNA IZQUIERDA */
.penal-col-izquierda {
    flex: 1.1;
    display: flex;
    flex-direction: column;
}

.bloque-24-7 {
    margin-bottom: 50px;
}
.bloque-24-7 h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 500; /* Medium */
    font-size: 2.2rem;
    color: #a39b84;
    line-height: 1;
    margin-bottom: 5px;
}
.bloque-24-7 p {
    font-family: 'Poppins', sans-serif;
    font-weight: 300; /* Light */
    font-size: 0.85rem;
    color: #666;
    line-height: 1.3;
}

.titulo-penal {
    font-family: 'Poppins', sans-serif;
    font-weight: 500; /* Medium */
    font-size: 3.5rem;
    color: #1a1a1a;
    line-height: 1.1;
    margin-bottom: 10px;
}
.highlight-gold { color: #c5a059; }

.subtitulo-penal {
    font-family: 'Poppins', sans-serif;
    font-weight: 500; /* Medium */
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 30px;
}

.textos-descripcion p {
    font-family: 'Poppins', sans-serif;
    font-weight: 300; /* Light */
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

.lista-servicios {
    list-style-type: none;
    margin-top: 15px;
    margin-bottom: 40px;
}
.lista-servicios li {
    font-family: 'Poppins', sans-serif;
    font-weight: 300; /* Light */
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}
.lista-servicios li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: #555;
}

.bloque-grupo {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto; /* Empuja el bloque hacia abajo */
}
.icono-circular {
    width: 120px;
    height: 120px;
    border-radius: 1%;
    padding: 10px;
    object-fit: contain;
}
.bloque-grupo p {
    font-family: 'Poppins', sans-serif;
    font-weight: 300; /* Light */
    font-size: 0.85rem;
    color: #666;
    max-width: 300px;
}

/* COLUMNA DERECHA */
.penal-col-derecha {
    flex: 0.9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Alinea hacia abajo para que el botón quede al final */
}

.img-estatua {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    margin-bottom: 30px;
}

.btn-consulta {
    display: inline-block;
    background-color: #eab332;
    color: #ffffff;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500; /* Medium */
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.3;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-consulta:hover {
    background-color: #d19f2a;
    transform: translateY(-2px);
}
/* =========================================================
   6. FOOTER Y BOTÓN FLOTANTE
   ========================================================= */
.floating-btn { position: fixed; bottom: 40px; right: 30px; background-color: #eab332; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0px 5px 20px rgba(234, 179, 50, 0.4); z-index: 1000; transition: all 0.3s ease; }
.floating-btn:hover { background-color: #d19f2a; transform: scale(1.1); }

.site-footer { background-color: #030614; color: #ffffff; padding-top: 150px; }
.footer-container { max-width: 1300px; margin: 0 auto; padding: 0 5%; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr; gap: 40px; margin-bottom: 30px; }
.brand-col { display: flex; flex-direction: column; align-items: center; }
.footer-logo-container { position: relative; height: 100px; width: 100%; display: flex; justify-content: center; align-items: center; margin-bottom: 15px; }
.footer-logo { position: absolute; height: 320px; width: auto; top: 80%; left: 10%; transform: translate(-50%, -50%); }
.footer-phone { font-weight: 500; font-size: 24px; letter-spacing: 0.5px; margin-top: 50px; margin-left: -300px; }
.col-title { font-weight: 300; font-size: 14px; margin-bottom: 25px; color: #ffffff; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 15px; }
.footer-links a { color: #ffffff; text-decoration: none; font-weight: 300; font-size: 13px; transition: color 0.3s ease; }
.footer-links a:hover { color: #ff7826; }
.footer-social { display: flex; justify-content: flex-end; gap: 15px; padding-bottom: 30px; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #ffffff; border-radius: 50%; color: #ffffff; text-decoration: none; transition: all 0.3s ease; }
.social-icon:hover { background-color: #ff7826; border-color: #ff7826; transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 20px 0; }
.footer-bottom-content { max-width: 1300px; margin: 0 auto; padding: 0 5%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; }
.copyright, .developer { font-weight: 300; font-size: 12px; color: rgba(255, 255, 255, 0.7); margin: 0; }
.developer { color: rgba(255, 255, 255, 0.4); }

/* =========================================================
   7. MEDIA QUERIES (RESPONSIVE) - ADAPTADO A DERECHO PENAL
   ========================================================= */

/* --- LAPTOPS Y SURFACE PRO HORIZONTAL (1025px a 1600px) --- */
@media screen and (min-width: 1025px) and (max-width: 1600px) {
    .footer-top { grid-template-columns: 1fr 1fr 1.2fr; gap: 20px; }
    .footer-logo { 
        height: 260px; 
        left: 50%; 
        top: 60%; 
        /* SOLUCIÓN: Evita que la imagen del logo bloquee los clicks de los enlaces en laptops */
        pointer-events: none; 
    }
    .footer-phone { margin-left: 0; font-size: 22px; text-align: center; width: 100%; }
    
    /* Aseguramos que los links estén por encima y reciban el click */
    .footer-links a, .social-icon {
        position: relative;
        z-index: 60;
    }
}


/* --- 2. LAPTOPS CON ESCALA 125% Y PANTALLAS DE POCA ALTURA (Hasta 1440px o < 850px alto) --- */
@media screen and (max-width: 1440px), screen and (max-height: 850px) {
    .hero-content { padding-top: 40px; }
    .titulo-elegante { font-size: 3.8rem; margin-top: 60px; }
    .subtitulo-limpio { font-size: 1.2rem; margin-bottom: 10vh; }
    .btn-conocer { padding: 12px 35px; font-size: 1.1rem; }

    /* FIX LOGO LAPTOP 125% */
    .brand-col { align-items: center; }
    .footer-logo-container { height: auto; margin-bottom: 10px; display: flex; justify-content: center; }
    .footer-logo { position: static; height: 180px; transform: none; }
    .footer-phone { margin-top: 10px; margin-left: 0; text-align: center; }
}

/* --- 3. LAPTOPS PEQUEÑAS (Hasta 1200px) --- */
@media screen and (max-width: 1200px) {
    .titulo-elegante { font-size: 4rem; }
    .penal-layout { gap: 40px; }
    .titulo-penal { font-size: 2.8rem; }
    .img-estatua { max-width: 320px; }
        .footer-top { gap: 20px; }
}

/* --- 4. TABLETS Y PANTALLAS MEDIANAS (Hasta 1024px) --- */
@media screen and (max-width: 1024px) {
    .seccion-oculta.activa { max-height: 3500px; }
    
    /* Configuración de Flex para apilar y reordenar */
    .servicio-container { display: flex; flex-direction: column; align-items: center; padding: 50px 5% 80px 5%; border-radius: 40px 40px 0 0; }
    .penal-layout { display: contents; }
    .penal-col-izquierda, .penal-col-derecha { display: contents; }

    /* ORDEN MÓVIL (El botón y la imagen de la estatua van al final) */
    .bloque-24-7 { order: 1; align-self: center; text-align: center; width: 100%; margin-bottom: 20px; }
    .titulo-penal { order: 2; text-align: center; width: 100%; margin-top: 10px; font-size: 2.5rem; }
    .subtitulo-penal { order: 3; text-align: center; width: 100%; margin-bottom: 30px; }
    .textos-descripcion { order: 4; text-align: center; width: 100%; margin-bottom: 20px;}
    .lista-servicios { order: 5; width: 100%; margin-bottom: 40px; }
    .bloque-grupo { order: 6; flex-direction: column; text-align: center; width: 100%; margin-bottom: 50px; }
    .img-estatua { order: 7; width: 100%; max-width: 350px; margin-bottom: 30px; align-self: center; }
    .btn-consulta { order: 8; align-self: center; margin-bottom: 20px; }
    
    /* FIX FOOTER TABLET */
    .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
    .brand-col { grid-column: 1 / -1; text-align: center; } 
    .footer-logo-container { height: auto; margin-bottom: 20px; }
    .footer-logo { position: static; height: 180px; transform: none; } 
    .footer-phone { margin-top: 10px; margin-left: 0; text-align: center; }
    /* SOLUCIÓN AL CORTE: Añadimos espacio inferior para salvar la barra del navegador y el botón de WhatsApp */
    .footer-bottom { padding: 20px 0 90px 0; }
}

/* --- 5. TELÉFONOS MÓVILES (Hasta 768px) --- */
@media screen and (max-width: 768px) {
    body.no-scroll { overflow: hidden; }
    
    .navbar { top: 0; width: 100%; height: 80px; padding: 0 20px; justify-content: space-between; background-color: rgba(13, 18, 43, 0.95); border-radius: 0; }
    .logo-container { display: block; z-index: 200; }
    
    .hamburger-menu { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 38px; height: 38px; cursor: pointer; z-index: 200; position: relative; }
    .hamburger-menu span { display: block; height: 2px; width: 22px; background-color: #ffffff; border-radius: 2px; transition: all 0.3s ease; position: absolute; }
    .hamburger-menu span:nth-child(1) { transform: translateY(-7px); }
    .hamburger-menu span:nth-child(2) { transform: translateY(0); }
    .hamburger-menu span:nth-child(3) { transform: translateY(7px); }
    .hamburger-menu.active span:nth-child(1) { transform: translateY(0) rotate(45deg); }
    .hamburger-menu.active span:nth-child(2) { opacity: 0; }
    .hamburger-menu.active span:nth-child(3) { transform: translateY(0) rotate(-45deg); }
    
    .nav-links { position: fixed; top: 0; left: -100%; width: 100%; height: 100vh; background-color: rgba(13, 18, 43, 0.98); flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 100px 0 0 0; margin: 0; gap: 0; transition: left 0.4s ease; z-index: 100; overflow-y: auto; }
    .nav-links.active { left: 0; }
    .nav-links > li { border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
    .nav-links a { display: flex; justify-content: space-between; align-items: center; padding: 18px 25px; font-size: 16px; width: 100%; }
    
    /* Mostrar/Ocultar Menús PC vs Móvil (Por si actualizas el HTML con el dropdown) */
    .nav-item-desktop { display: none !important; }
    .nav-item-mobile { display: block !important; }

    .dropdown-content { position: relative; display: none; background-color: rgba(0,0,0,0.3); min-width: 100%; margin-top: 0; padding: 0; border-radius: 0; box-shadow: none; top: 0; }
    .dropdown-content a { padding: 15px 25px 15px 45px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .dropdown.active .dropdown-content { display: block; }
    .dropdown.active .arrow { transform: rotate(180deg); }

    .titulo-elegante { font-size: 3.2rem; margin-top: 40px; }
    .subtitulo-limpio { font-size: 1rem; margin-bottom: 80px; }
    .icono-circular { width: 80px; height: 80px; }
    
    .seccion-oculta.activa { max-height: 4000px; } 

    /* FIX FOOTER MÓVIL */
    .site-footer { padding-top: 80px; padding-bottom: 0; }
    .footer-top { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .brand-col { align-items: center; }
    .footer-logo-container { height: auto; margin-bottom: 10px; }
    .footer-logo { position: static; height: auto; max-width: 160px; transform: none; }
    .footer-phone { margin-top: 10px; margin-left: 0; font-size: 20px; }
    .footer-social { justify-content: center; padding-bottom: 20px; }
    
    /* Espacio para salvar barra de navegador y botón de Whatsapp */
    .footer-bottom { padding: 20px 0 20px 0; }
}

/* --- 6. CELULARES MUY PEQUEÑOS (Hasta 480px) --- */
@media screen and (max-width: 480px) {
    .titulo-elegante { font-size: 2.5rem; }
    .btn-conocer { padding: 12px 25px; font-size: 1rem; width: 100%; }
    .servicio-container { padding: 40px 5% 60px 5%; border-radius: 30px 30px 0 0; }
    .bloque-24-7 h3 { font-size: 1.8rem; }
    .titulo-penal { font-size: 1.8rem; }
    .textos-descripcion p, .lista-servicios li { font-size: 0.9rem; }
    .btn-consulta { padding: 12px 20px; font-size: 1rem; width: 100%; }
    .floating-btn { width: 50px; height: 50px; bottom: 20px; right: 20px; }
}