/*
Theme Name: Telecsis Core
Author: Miguel Angel Caravaca Perez
Version: 1.4
Description: Versión final blindada con Flexbox para evitar colapsos en las columnas y responsive corregido.
*/

/* --- 1. VARIABLES Y CONFIGURACIÓN BASE --- */
:root {
    --primary: #0A192F;         /* Azul oscuro corporativo */
    --accent: #0056b3;          /* Azul de acción */
    --urgent: #ce1212;          /* Rojo urgencias */
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-gray: #e1e1e1;
    --header-height: 6.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--text-light);
    -webkit-font-smoothing: antialiased;
}

html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
}

/* --- 2. HEADER (Logo y Menú) --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    min-height: var(--header-height);
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img, 
.custom-logo-link img {
    height: auto !important;
    max-height: 4.8rem !important;
    width: auto !important;
    display: block;
}

.nav-main ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-main a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.3s ease;
}

.btn-catalog {
    background: var(--accent) !important;
    color: #ffffff !important;
    padding: 0.8rem 1.5rem !important;
    border-radius: 4px;
    font-weight: 700;
}

/* --- 3. CONTENIDO GENERAL Y ENLACES --- */
.entry-content, .page-content {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.entry-title {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
}

.entry-content p a, .entry-content li a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 86, 179, 0.2);
    transition: all 0.3s ease;
}

.entry-content p a:hover, .entry-content li a:hover {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background-color: rgba(10, 25, 47, 0.05);
}

/* --- 4. SISTEMA ESTRUCTURAL FLEXBOX (BLINDADO) --- */
.tlc-seccion-contacto {
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.tlc-intro-contacto {
    margin-bottom: 35px;
    border-left: 5px solid var(--accent);
    padding-left: 25px;
}

.tlc-intro-contacto h2 {
    color: var(--accent) !important;
    font-size: 2.2rem !important;
    margin-bottom: 10px !important;
    text-align: left;
}

/* Base Flexbox para evitar el colapso de columnas */
.tlc-grid-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
}

.tlc-col-principal {
    flex: 1;
    min-width: 320px; /* En pantallas pequeñas fuerza el salto a la siguiente línea */
}

.tlc-col-sidebar {
    width: 380px;
    flex-shrink: 0; /* Evita que la barra lateral se encoja */
}

/* --- 5. COMPONENTES: CONTACTO Y TARJETAS --- */
.tlc-tarjeta {
    background: #ffffff;
    border: 1px solid var(--border-gray);
    padding: 30px;
    border-radius: 4px;
    margin-bottom: 25px;
    border-top: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.tlc-tarjeta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.tlc-tarjeta h4 {
    margin-top: 0 !important;
    color: var(--text-dark) !important;
    text-transform: uppercase;
    font-size: 1.1rem !important;
    letter-spacing: 0.5px;
}

.tlc-tarjeta-dark { border-top-color: var(--primary); }

.tlc-btn-web {
    display: inline-block;
    background: var(--accent);
    color: #ffffff !important;
    padding: 12px 25px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 15px;
    text-transform: uppercase;
    transition: 0.3s;
    text-align: center;
}

.tlc-btn-web:hover {
    background: var(--primary);
}

/* --- 6. BLOQUE ROJO Y BOTÓN DE URGENCIAS (PÁGINA CONTACTO) --- */
.tlc-bloque-rojo {
    background-color: var(--urgent) !important;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(206, 18, 18, 0.3);
    position: sticky;
    top: 8rem;
    z-index: 10;
}

.tlc-bloque-rojo,
.tlc-bloque-rojo h3,
.tlc-bloque-rojo p,
.tlc-bloque-rojo strong {
    color: #ffffff !important;
}

.tlc-btn-parte-urgente {
    display: block;
    background-color: #ffffff !important;
    color: var(--urgent) !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    padding: 15px 20px;
    margin: 25px 0 10px 0 !important;
    border-radius: 6px;
    text-decoration: none !important;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.tlc-btn-parte-urgente:hover {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.tlc-info-adicional {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tlc-info-adicional strong {
    color: #ffffff !important;
}

/* --- 7. ÁREA DE VALIDACIÓN (PÁGINA PARTE URGENTE) --- */
.tlc-panel-validacion {
    background: #ffffff;
    border: 1px solid var(--border-gray);
    border-top: 4px solid var(--urgent);
    border-radius: 4px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.tlc-panel-validacion h3 {
    color: var(--primary) !important;
    font-size: 1.4rem !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    font-weight: 700;
}

.tlc-form-group {
    margin: 25px 0;
}

.tlc-form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.tlc-input-codigo {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    border: 2px solid var(--border-gray);
    border-radius: 4px;
    background: #f9f9f9;
    color: var(--primary);
    text-transform: uppercase;
    transition: border-color 0.3s;
}

.tlc-input-codigo:focus {
    border-color: var(--accent);
    outline: none;
    background: #fff;
}

.tlc-enlaces-ayuda {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tlc-enlaces-ayuda a {
    color: var(--accent) !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s;
}

.tlc-enlaces-ayuda a:hover {
    color: var(--primary) !important;
    text-decoration: underline !important;
}

.tlc-panel-marketing {
    background: var(--primary);
    color: var(--text-light);
    border-radius: 6px;
    padding: 35px 25px;
    box-shadow: 0 4px 20px rgba(10, 25, 47, 0.15);
}

.tlc-panel-marketing h3 {
    color: var(--text-light) !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tlc-panel-marketing p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.tlc-lista-modalidades {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 25px 0 !important;
}

.tlc-lista-modalidades li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.tlc-lista-modalidades li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 900;
}

.tlc-btn-marketing {
    display: block;
    background-color: var(--accent) !important;
    color: var(--text-light) !important;
    text-align: center;
    padding: 14px 20px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: background-color 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.tlc-btn-marketing:hover {
    background-color: #003d7a !important;
}

/* --- 8. FOOTER (Estilo Lineal) --- */
.site-footer {
    background-color: var(--primary);
    color: #ffffff;
    padding: 3rem 5%;
    margin-top: 8rem;
    border-top: 5px solid var(--accent);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info-block {
    text-align: left;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
    color: #ffffff;
    text-transform: uppercase;
}

.footer-info-block p {
    font-size: 0.85rem;
    color: #ffffff;
    line-height: 1.5;
    margin-bottom: 0.2rem;
    opacity: 0.95;
}

.footer-legal-box {
    text-align: right;
    color: #ffffff;
}

.footer-nav {
    margin-bottom: 0.4rem;
}

.footer-nav a {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: 0.3s;
}

.footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-separator {
    margin: 0 0.4rem;
    opacity: 0.4;
}

.footer-copy {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.footer-notary {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* --- 9. RESPONSIVE Y ADAPTACIÓN MÓVIL --- */
@media (max-width: 900px) {
    /* Las columnas pasan a apilarse en vertical */
    .tlc-col-principal, 
    .tlc-col-sidebar {
        width: 100% !important;
        flex: none;
    }
    
    .site-header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-main ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-info-block, 
    .footer-legal-box {
        text-align: center;
    }
    
    .tlc-bloque-rojo {
        position: relative;
        top: 0;
    }
}