/*
Theme Name: NexosLab - GNP Seguros Autos
Theme URI: 
Author: NexosLab
Author URI: 
Description: Tema optimizado para Seguros de autos GNP.
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexoslab
Tags: seo-ready, accessibility-ready, tailwind, alpinejs, insurance-niche, gnp-seguros
*/

/* Reset básico y variables de diseño - Identidad GNP Seguros */
:root {
    --primary-color: #003366;       /* Azul Marino Corporativo GNP */
    --primary-dark: #002244;
    --primary-light: #0d4b8a;
    --accent-color: #F4742E;        /* Naranja Característico GNP */
    --accent-hover: #E05D17;        /* Naranja Hover */
    --accent-light: #FFF2EB;        /* Fondo sutil naranja */
    --gnp-blue-light: #266798;
    --text-main: #1f2937;           /* Slate 800 */
    --text-muted: #4b5563;          /* Slate 600 */
    --bg-light: #f8fafc;            /* Slate 50 */
    --border-color: #e2e8f0;        /* Slate 200 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    text-align: inherit;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-main);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   TIPOGRAFÍA Y JERARQUÍAS GENERALES
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    color: var(--primary-color);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

h1 { font-size: 2.35rem !important; }
h2 { font-size: 1.95rem !important; }
h3 { font-size: 1.6rem !important; }
h4 { font-size: 1.35rem !important; }
h5 { font-size: 1.15rem !important; }
h6 { font-size: 1rem !important; text-transform: uppercase; letter-spacing: 0.05em; }

p {
    margin-top: 0;
    margin-bottom: 1.35rem;
    color: var(--text-main);
}

/* ==========================================================================
   ESTILOS DE CONTENIDO EDITORIAL / PROSE / POST (Para no usar CSS manual)
   Aplica dentro de .prose o en los contenedores de artículos (.entry-content)
   ========================================================================== */

.prose,
.entry-content,
main#primary article {
    color: var(--text-main);
    font-size: 1.125rem;
    line-height: 1.75;
}

/* Encabezados con toque distintivo GNP */
.prose h2,
.entry-content h2 {
    position: relative;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.prose h2::after,
.entry-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.prose h3,
.entry-content h3 {
    color: var(--primary-light);
}

/* Enlaces dentro del contenido */
.prose a:not([class]),
.entry-content a:not([class]) {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.prose a:not([class]):hover,
.entry-content a:not([class]):hover {
    color: var(--accent-hover);
    text-decoration-color: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   LISTAS ORDENADAS Y DESORDENADAS
   -------------------------------------------------------------------------- */
.prose ul:not([class]),
.entry-content ul:not([class]) {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 1.5rem 0 !important;
}

.prose ul:not([class]) > li,
.entry-content ul:not([class]) > li {
    position: relative;
    padding-left: 1.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.65;
}

/* Icono viñeta estilizado con tono GNP */
.prose ul:not([class]) > li::before,
.entry-content ul:not([class]) > li::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.65em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(244, 116, 46, 0.15);
}

.prose ol:not([class]),
.entry-content ol:not([class]) {
    counter-reset: gnp-counter;
    list-style: none !important;
    padding-left: 0 !important;
    margin: 1.5rem 0 !important;
}

.prose ol:not([class]) > li,
.entry-content ol:not([class]) > li {
    counter-increment: gnp-counter;
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 0.85rem;
    line-height: 1.65;
}

/* Numeración estilizada tipo badge circular */
.prose ol:not([class]) > li::before,
.entry-content ol:not([class]) > li::before {
    content: counter(gnp-counter);
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 1.5rem;
    height: 1.5rem;
    background-color: #e0f2fe;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bae6fd;
}

/* Listas anidadas */
.prose ul ul,
.prose ol ul,
.prose ul ol,
.prose ol ol {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    padding-left: 1rem !important;
}

/* --------------------------------------------------------------------------
   TABLAS MODERNAS Y RESPONSIVAS
   -------------------------------------------------------------------------- */
.prose table,
.entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    font-size: 0.975rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px -2px rgba(0, 51, 102, 0.05);
    background: #ffffff;
}

/* Envuelto para scroll horizontal si es necesario */
@media (max-width: 768px) {
    .prose table,
    .entry-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

.prose table thead,
.entry-content table thead {
    background-color: var(--primary-color);
    color: #ffffff;
}

.prose table th,
.entry-content table th {
    padding: 1rem 1.25rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.825rem;
    letter-spacing: 0.05em;
    color: #ffffff;
    border: none;
}

.prose table th:first-child {
    border-top-left-radius: var(--radius-md);
}

.prose table th:last-child {
    border-top-right-radius: var(--radius-md);
}

.prose table td,
.entry-content table td {
    padding: 0.95rem 1.25rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}

.prose table tbody tr:last-child td,
.entry-content table tbody tr:last-child td {
    border-bottom: none;
}

.prose table tbody tr:nth-child(even),
.entry-content table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.prose table tbody tr:hover,
.entry-content table tbody tr:hover {
    background-color: #fff7ed; /* Resalte cálido suave al interactuar */
}

/* --------------------------------------------------------------------------
   ACORDEONES, DETAILS & SUMMARY (Preguntas Frecuentes, Coberturas, etc.)
   -------------------------------------------------------------------------- */
.prose details,
.entry-content details {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 1.25rem 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.prose details[open],
.entry-content details[open] {
    border-color: #fed7aa;
    box-shadow: 0 4px 15px -3px rgba(244, 116, 46, 0.1);
}

.prose summary,
.entry-content summary {
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    user-select: none;
    position: relative;
    list-style: none; /* Elimina triángulo nativo en navegadores modernos */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8fafc;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.prose summary::-webkit-details-marker,
.entry-content summary::-webkit-details-marker {
    display: none;
}

.prose summary:hover,
.entry-content summary:hover {
    background-color: #fff7ed;
    color: var(--accent-hover);
}

/* Indicador de flecha/plus personalizado */
.prose summary::after,
.entry-content summary::after {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background-color: #ffffff;
    color: var(--accent-color);
    border: 1px solid #fdba74;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    margin-left: 1rem;
    flex-shrink: 0;
    transition: transform 0.25s ease, background-color 0.2s, color 0.2s;
}

.prose details[open] summary::after,
.entry-content details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

.prose details > :not(summary),
.entry-content details > :not(summary) {
    padding: 1rem 1.25rem;
    margin: 0;
    border-top: 1px solid var(--border-color);
    background-color: #ffffff;
    animation: gnpFadeDown 0.25s ease;
}

@keyframes gnpFadeDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   FORMULARIOS, SELECTS Y DROPDOWN LISTS EN POSTS
   -------------------------------------------------------------------------- */
.prose select,
.entry-content select,
.prose input[type="text"],
.prose input[type="email"],
.prose input[type="tel"],
.prose input[type="number"],
.entry-content input {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
}

.prose select,
.entry-content select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23003366'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.15rem;
    padding-right: 2.75rem;
    cursor: pointer;
}

.prose select:focus,
.entry-content select:focus,
.prose input:focus,
.entry-content input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(244, 116, 46, 0.2);
}

/* --------------------------------------------------------------------------
   IMÁGENES Y ELEMENTOS VISUALES (FIGURE, FIGCAPTION)
   -------------------------------------------------------------------------- */
.prose img,
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 51, 102, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    display: block;
    margin: 2rem auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prose img:hover,
.entry-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -6px rgba(0, 51, 102, 0.12);
}

.prose figure,
.entry-content figure {
    margin: 2rem auto !important;
    text-align: center;
}

.prose figcaption,
.entry-content figcaption {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-style: italic;
    text-align: center;
}

/* --------------------------------------------------------------------------
   BLOCKQUOTES & LLAMADOS A LA ACCIÓN (DESTACADOS)
   -------------------------------------------------------------------------- */
.prose blockquote,
.entry-content blockquote {
    border-left: 4px solid var(--accent-color) !important;
    background: linear-gradient(to right, #fff7ed, #ffffff);
    padding: 1.25rem 1.5rem !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 2rem 0 !important;
    font-style: italic;
    color: #374151;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.prose blockquote p:last-child,
.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Código y pre */
.prose code:not(pre code),
.entry-content code:not(pre code) {
    background-color: #f1f5f9;
    color: var(--primary-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.prose pre,
.entry-content pre {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    padding: 1.25rem 1.5rem !important;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 1.75rem 0 !important;
}

/* Separadores HR */
.prose hr,
.entry-content hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), var(--accent-color), var(--border-color), transparent);
    margin: 3rem 0;
}
