/* ============================================================================
 * site.css - Estilos base del Blog. Subconjunto del site.css de SC.Apps.WebSite
 * (solo lo que el blog usa: base tipografica, nav glass, scroll reveal, acordeon
 * de FAQ, patron de grid). El resto (mega-menus, ticker, tabs) no aplica aqui.
 * ============================================================================ */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

/* Glassmorphism del navbar */
.nav-glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Underline hover del menu (mismo gradiente de marca) */
.menu-item-hover {
    position: relative;
    transition: all 0.2s ease;
}

.menu-item-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0018CD, #14B8A6);
    transition: width 0.3s ease;
}

.menu-item-hover:hover::after {
    width: 100%;
}

/* Scroll Reveal (IntersectionObserver agrega .active) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Acordeon FAQ del articulo */
.accordion-content {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.accordion-content.open {
    max-height: 1000px;
    opacity: 1;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-btn.active .accordion-icon {
    transform: rotate(180deg);
}

/* Patron de grid sutil para secciones hero */
.bg-grid-pattern {
    background-image:
        linear-gradient(to right, rgba(20, 25, 61, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(20, 25, 61, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Contenido HTML del articulo (prosa). Estilos base para el markup que viene
 * del CMS/API cuando no lleva clases Tailwind propias. */
.article-body {
    color: #1f2937;
    line-height: 1.75;
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #14193D;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #14193D;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-body p {
    margin-bottom: 1.15rem;
}

.article-body a {
    color: #0018CD;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1.15rem 1.25rem;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.4rem; }

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.article-body blockquote {
    border-left: 4px solid #14B8A6;
    padding-left: 1rem;
    color: #404040;
    font-style: italic;
    margin: 1.5rem 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95em;
}

.article-body th,
.article-body td {
    border: 1px solid #e5e7eb;
    padding: 0.6rem 0.75rem;
    text-align: left;
}

.article-body th {
    background: #f3f4f6;
    font-weight: 600;
    color: #14193D;
}

/* ===== Mega-menu del header (portado de SC.Apps.WebSite) ===== */
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.group:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-full {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
}

.group:hover .mega-menu-full {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.submenu-item {
    transition: all 0.2s ease;
    border-radius: 12px;
}

.submenu-item:hover {
    background: linear-gradient(135deg, rgba(0, 24, 205, 0.05) 0%, rgba(0, 212, 170, 0.05) 100%);
    transform: translateX(4px);
}

.submenu-item:hover .submenu-icon {
    background: linear-gradient(135deg, #0018CD 0%, #14B8A6 100%);
    color: white;
    transform: scale(1.1);
}

.submenu-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Drawer movil */
.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.mobile-accordion-content.open {
    max-height: 1200px;
}

.mobile-accordion-icon {
    transition: transform 0.3s ease;
}

.mobile-accordion-btn.active .mobile-accordion-icon {
    transform: rotate(180deg);
}

.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: #f1f5f9; }
.custom-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
