/* --- VARIABLES & TEMAS --- */
:root {
    /* COLORES CORPORATIVOS FIJOS */
    --brand-blue: #0F2C4C;
    /* Azul Marino Logo */
    --brand-orange: #E65C00;
    /* Naranja Logo */

    /* VARIABLES DINÁMICAS (Modo Claro - Default) */
    --bg-body: #f8f9fa;
    /* Fondo casi blanco */
    --bg-card: #ffffff;
    /* Tarjetas blancas */
    --bg-nav: rgba(255, 255, 255, 0.95);
    /* Nav clara */
    --bg-footer: #0F2C4C;
    /* Footer siempre oscuro por diseño */

    --text-main: #0F2C4C;
    /* Azul Marino fuerte */
    --text-body: #2d3748;
    /* Gris oscuro legible */
    --text-inverse: #ffffff;
    /* Texto sobre fondos oscuros */

    --shadow: 0 10px 30px rgba(15, 44, 76, 0.08);
    /* Sombra suave */
    --border-color: rgba(15, 44, 76, 0.1);

    --transition: all 0.3s ease;
    --font-main: 'Montserrat', sans-serif;
    --font-tech: 'Roboto Mono', monospace;
}

/* OVERRIDE PARA MODO OSCURO */
[data-theme="dark"] {
    --bg-body: #081b2f;
    /* Fondo Azul Profundo */
    --bg-card: #112240;
    /* Tarjetas Azul Navy */
    --bg-nav: rgba(8, 27, 47, 0.95);

    --text-main: #ffffff;
    --text-body: #cbd5e0;
    /* Gris claro */
    --text-inverse: #ffffff;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .logo-img {
    filter: brightness(0) invert(1);
}

/* Botones en Dark Mode */
[data-theme="dark"] .btn-outline {
    color: #fff;
    border-color: var(--brand-orange);
}

/* =========================================
   7. SERVICE PACKAGES (PHASE 5)
   ========================================= */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 40px;
}

.package-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--brand-orange);
}

.package-card.featured {
    border: 2px solid var(--brand-orange);
}

.package-badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--brand-orange);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: bold;
}

.package-card h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.package-card .target {
    color: var(--brand-blue);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: block;
}

.package-features {
    list-style: none;
    margin-bottom: 30px;
    flex-grow: 1;
    /* Pushes button to bottom */
}

.package-features li {
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
}

.package-features li:last-child {
    border-bottom: none;
}

.package-features li i {
    color: var(--brand-orange);
    margin-right: 10px;
}

.sla-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.05);
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 20px;
}

[data-theme="dark"] .sla-text {
    background: rgba(255, 255, 255, 0.05);
}

/* Transición suave para el cambio de color */
.logo-img {
    transition: filter 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- UTILIDADES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

/* Fondo alternativo para separar secciones */
.bg-alt {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.highlight-orange {
    color: var(--brand-orange);
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.btn-primary {
    background-color: var(--brand-orange);
    color: #fff;
}

.btn-primary:hover {
    background-color: #cc5200;
    box-shadow: 0 5px 15px rgba(230, 92, 0, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    color: var(--brand-blue);
    /* Color base en modo claro */
    border: 2px solid var(--brand-orange);
    background: transparent;
}

/* Excepción para botones sobre fondo oscuro (Hero) */
.hero-btns .btn-outline {
    color: #fff;
}

.btn-outline:hover {
    background-color: var(--brand-orange);
    color: #fff;
}

/* Textos */
h1,
h2,
h3,
h4 {
    color: var(--text-main);
}

.subtitle {
    font-family: var(--font-tech);
    color: var(--brand-orange);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.line-orange {
    width: 60px;
    height: 4px;
    background: var(--brand-orange);
    margin-top: 15px;
    border-radius: 2px;
}

/* --- NAVBAR --- */
.navbar {
    background: var(--bg-nav);
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-img {
    max-height: 50px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-orange) !important;
    border-bottom: 2px solid var(--brand-orange);
    padding-bottom: 5px;
}

.btn-nav {
    background-color: var(--brand-blue);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 4px;
}

.btn-nav:hover {
    background-color: var(--brand-orange);
}

/* Theme Toggle Button */
.theme-switch {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.2rem;
    margin-left: 20px;
    padding: 5px;
    transition: var(--transition);
}

.theme-switch:hover {
    color: var(--brand-orange);
    transform: rotate(15deg);
}

.lang-switch {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 15px;
    padding: 2px 8px;
    transition: var(--transition);
    font-family: var(--font-tech);
}

.lang-switch:hover {
    color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1002;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* Hamburger Animation */
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- HERO & HEADERS (CONTRASTE MEJORADO) --- */
.hero,
.page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 90px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax */
    background-color: #0F2C4C;
    /* Color de fondo de carga */
}

/* Alturas */
.hero {
    height: 85vh;
}

.hero.hero-productos,
.hero.hero-servicios,
.hero.hero-radio,
.hero.hero-contacto,
.page-header {
    /* Contacto usa page-header, lo igualamos o cambiamos clase en HTML */
    height: 50vh;
}

/* Imágenes específicas */
.hero-home {
    background-image: url('assets/hero-home.jpg');
}

.hero-servicios {
    background-image: url('assets/hero-servicios.jpg');
}

.hero-productos {
    background-image: url('assets/hero-productos.jpg');
}

/* 
   Las imágenes de Radio y Contacto se definen 
   directamente en el HTML para facilitar la edición.
*/

/* Si no tienes una imagen específica para page-bg, usa una por defecto */

/* OVERLAY AGRESIVO PARA CONTRASTE */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradiente fuerte: Oscuro arriba y abajo, semi transparente al centro */
    background: linear-gradient(to bottom,
            rgba(8, 27, 47, 0.9) 0%,
            rgba(0, 0, 0, 0.6) 50%,
            rgba(8, 27, 47, 0.9) 100%);
    z-index: 1;
}

/* CONTENIDO HERO */
.hero-btns {
    margin-top: 30px;
}

.hero-content,
.page-header .container,
.reveal {
    position: relative;
    z-index: 2;
    /* Sobre el overlay */
}

/* TEXTO BLANCO FORZADO CON SOMBRA */
.hero h1,
.hero p,
.hero .subtitle,
.page-header h1,
.page-header p,
.page-header .subtitle {
    color: #ffffff !important;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
    /* Sombra negra fuerte */
}

/* Fondo sutil para párrafos largos en el hero si es necesario */
.hero p,
.page-header p {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 4px;
    display: inline-block;
    /* border-left: 3px solid var(--brand-orange); REMOVED per user request */
}

/* ... existing code ... */

.copyright {
    color: #7a8b9a;
    text-align: center;
    /* Added for centering */
    margin-top: 20px;
}

/* --- CARDS & GRID --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    text-decoration: none;
    display: block;
    color: inherit;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-bottom: 4px solid var(--brand-orange);
}

.feature-icon {
    font-size: 3rem;
    color: var(--brand-orange);
    margin-bottom: 25px;
}

/* --- SERVICIOS & DETALLES --- */
.service-detail-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    scroll-margin-top: 140px;
    /* Adjusted for better spacing below navbar */
}

.service-txt ul li {
    color: var(--text-body);
    margin-bottom: 10px;
}

.service-txt ul li i {
    color: var(--brand-orange);
    margin-right: 10px;
}

/* --- PRODUCTOS (NUEVO ESTILO PARA IMÁGENES) --- */
.product-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-img-box {
    height: 220px;
    /* Altura fija */
    background: #ffffff;
    /* Fondo blanco siempre */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

/* Manejo de imágenes reales */
.product-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-box img {
    transform: scale(1.05);
    /* Zoom al pasar el mouse */
}

/* Iconos de fallback (si usas iconos en vez de fotos) */
.product-img-box i {
    color: #ccc;
    font-size: 5rem;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-cat {
    color: var(--brand-orange);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.product-info h4 {
    margin: 10px 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* --- CONTACTO & MAPA --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.contact-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

/* MAPA */
.map-container iframe {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* FORMULARIO */
.form-block {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

input,
select,
textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 4px;
    font-family: var(--font-main);
    margin-bottom: 20px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-orange);
}

/* --- FAQ ACCORDION --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    transition: var(--transition);
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--brand-orange);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--brand-orange);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding: 0 25px;
    color: var(--text-body);
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 25px 25px;
}

/* --- LOCATION SECTION --- */
.location-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 768px) {
    .location-wrapper {
        grid-template-columns: 1fr;
    }
}

/* --- FOOTER --- */
footer {
    background: var(--brand-blue);
    padding: 80px 0 30px;
    border-top: 4px solid var(--brand-orange);
    color: #fff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col h4 {
    color: #fff;
}

.footer-col a {
    color: #b0c4de;
    display: block;
    /* Stack vertically */
    margin-bottom: 8px;
    /* Add spacing */
    text-decoration: none;
    /* Ensure no underline if not hover */
}

.footer-col a:hover {
    color: var(--brand-orange);
}

.copyright {
    color: #7a8b9a;
    text-align: center;
    margin-top: 20px;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 20px;
    display: block;
}

.footer-col.info {
    max-width: 350px;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        /* Show hamburger on mobile */
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 90px;
        flex-direction: column;
        width: 100%;
        background-color: var(--bg-nav);
        padding: 40px 0;
        transition: 0.3s;
        border-bottom: 2px solid var(--brand-orange);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1.2rem 0;
    }

    .nav-link {
        margin-left: 0;
        font-size: 1.1rem;
        display: block;
    }

    .theme-switch {
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: 1.5rem;
        /* Larger icon on mobile */
    }

    .lang-switch {
        margin-left: 0;
        margin-top: 1rem;
        font-size: 1.1rem;
        /* Larger text on mobile */
        padding: 8px 20px;
        /* Better touch target */
        width: fit-content;
        margin-right: auto;
        margin-left: auto;
    }

    .contact-wrapper,
    .service-detail-item {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        padding: 10px;
        /* Reduce padding on mobile */
    }

    .hero {
        background-attachment: scroll;
        height: 60vh;
    }
}

/* Animaciones */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- SOCIAL ICONS --- */
.socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.socials a {
    font-size: 2.5rem !important;
    /* Force overrides */
    display: inline-block !important;
    /* Override footer block rule */
    margin-right: 0;
    margin-bottom: 0;
    color: #fff;
    transition: var(--transition);
}

.socials a:hover {
    color: var(--brand-orange);
    transform: scale(1.1);
}

/* --- CATALOG UI REFINEMENTS --- */
.search-container input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container input:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 20px rgba(255, 117, 34, 0.15);
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn:hover {
    border-color: var(--brand-orange);
    color: var(--brand-orange);
    transform: translateY(-3px);
    background: rgba(255, 117, 34, 0.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #fff;
    box-shadow: 0 10px 25px rgba(255, 117, 34, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 992px) {
    .custom-card {
        grid-column: span 1;
    }
}

/* --- WHATSAPP FLOATING BUTTON --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* --- ADVANCED FILTERS UI --- */
.advanced-filters-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: var(--shadow);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--brand-orange);
    display: inline-block;
    padding-bottom: 5px;
}

.filter-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

.filter-input:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 10px rgba(230, 92, 0, 0.1);
    outline: none;
}

/* Custom Checkbox Style */
.brand-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.brand-checkbox-label:hover {
    background: rgba(230, 92, 0, 0.05);
}

.brand-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-orange);
    cursor: pointer;
    margin: 0;
    /* Override generic margin */
}

/* Align Filter Toggle Button */
.btn-filter-toggle {
    margin-top: 25px;
    border-radius: 50px;
    /* Match filter-btn */
    padding: 10px 30px;
}