/* CSS específico para el Blog - Multinyectores Colombia */

/* Variables CSS */
:root {
    --azul-principal: #004A99;
    --azul-claro: #1E73BE;
    --rojo-acento: #E32636;
    --gris-neutro: #F5F5F5;
    --gris-oscuro: #2E2E2E;
    --blanco: #FFFFFF;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: var(--gris-neutro);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header y Navbar */
.header,
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 85px;
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(1);
}

.logo-img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li {
    list-style: none;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--azul-principal);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--rojo-acento);
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--rojo-acento);
    transition: all 0.3s ease;
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--azul-principal);
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 74, 153, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 15px 0;
    margin-top: 10px;
    border: 1px solid rgba(0, 74, 153, 0.1);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--azul-principal);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: rgba(0, 74, 153, 0.1);
    color: var(--rojo-acento);
    border-left-color: var(--rojo-acento);
    padding-left: 25px;
}

/* Hero del Blog */
.blog-hero {
    background: linear-gradient(135deg, var(--azul-principal) 0%, var(--azul-claro) 100%);
    color: white;
    padding: 100px 20px 60px;
    padding-top: 150px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.blog-hero p {
    font-size: 1.1rem;
    color: white;
    opacity: 0.95;
}

/* Grid de artículos */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.blog-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-content {
    padding: 25px;
}

.blog-category {
    display: inline-block;
    background: var(--rojo-acento);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.blog-card h2 {
    font-size: 1.4rem;
    color: var(--azul-principal);
    margin-bottom: 10px;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: var(--azul-claro);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--rojo-acento);
}

/* Hero del Artículo */
.article-hero {
    background: linear-gradient(135deg, var(--azul-principal) 0%, var(--azul-claro) 100%);
    color: white;
    padding: 100px 20px 60px;
    padding-top: 150px;
    text-align: center;
}

.article-header {
    max-width: 800px;
    margin: 0 auto;
}

.article-category {
    display: inline-block;
    background: var(--rojo-acento);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.article-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    color: white;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 0.95rem;
    opacity: 0.9;
    color: white;
}

/* Contenido del Artículo */
.article-content {
    max-width: 900px;
    margin: 60px auto;
    padding: 50px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .article-content {
        padding: 30px 20px;
        margin: 40px 20px;
    }
}

.article-content h2 {
    color: var(--azul-principal);
    font-size: 1.8rem;
    margin: 40px 0 20px;
}

.article-content h3 {
    color: var(--azul-claro);
    font-size: 1.4rem;
    margin: 30px 0 15px;
}

.article-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.article-content a {
    color: var(--azul-claro);
    text-decoration: none;
}

.article-content a:hover {
    color: var(--rojo-acento);
    text-decoration: underline;
}

/* Tablas en artículos */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    border-radius: 8px;
}

.article-content table thead tr {
    background: var(--azul-principal);
    color: white;
    text-align: left;
}

.article-content table th {
    padding: 15px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
}

.article-content table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.article-content table tbody tr {
    border-bottom: 1px solid #ddd;
}

.article-content table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.article-content table tbody tr:hover {
    background-color: #f1f1f1;
}

@media (max-width: 768px) {
    .article-content table {
        font-size: 0.85rem;
    }
    
    .article-content table th,
    .article-content table td {
        padding: 10px 8px;
    }
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
}

.info-box {
    background: #d1ecf1;
    border-left: 4px solid #0c5460;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
}

.cta-section {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin: 50px 0;
}

.cta-section h3 {
    color: var(--azul-principal);
    margin-bottom: 15px;
}

.btn {
    display: inline-block !important;
    padding: 14px 32px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    line-height: 1.5 !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--azul-claro) 0%, var(--azul-principal) 100%) !important;
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--azul-principal) 0%, #003366 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 74, 153, 0.3) !important;
    color: white !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(37, 211, 102, 0.3) !important;
    color: white !important;
}

/* Footer */
footer {
    background: var(--gris-oscuro);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 10px;
}

.footer-logo {
    height: 120px;
    width: auto;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--azul-claro);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--rojo-acento);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #999;
}

/* WhatsApp flotante */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.whatsapp-float.chatbot-present {
    bottom: 92px;
}

.whatsapp-tooltip {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 1.8rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--blanco);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .article-hero h1 {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .logo img {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float.chatbot-present {
        bottom: 74px;
    }
}

/* Responsive - Orientación Landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    /* Blog grid optimizado para landscape */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Reducir paddings verticales */
    .blog-hero {
        padding: 3rem 0;
    }
    
    .blog-section {
        padding: 3rem 0;
    }
    
    /* Artículos más compactos */
    .blog-card {
        padding: 1.5rem;
    }
    
    .article-header {
        padding: 2rem 0;
    }
}

@media (max-width: 767px) and (orientation: landscape) {
    /* Blog grid horizontal */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Reducir espaciado vertical */
    .blog-hero {
        padding: 2rem 0;
    }
    
    .blog-section {
        padding: 2rem 0;
    }
    
    /* Cards más compactas */
    .blog-card {
        padding: 1rem;
    }
    
    .blog-card h2 {
        font-size: 1.3rem;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
}