
/* ========================================
   🎨 VARIABLES GLOBALES
   ======================================== */
:root {
    --verde-oscuro: #024023;
    --verde-brillante: #038C3E;
    --verde-neon: #00ff7f;
    --verde-pastel-claro: #E8F4E8;
    --blanco: #FFFFFF;
    --texto-oscuro: #062E20;
    --amarillo: #FCD116;
    --azul: #003893;
    --gradiente-hero: linear-gradient(135deg, #024023 0%, #038C3E 25%, #00b359 50%, #038C3E 75%, #024023 100%);
}

/* ========================================
   🔧 RESET BÁSICO
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--texto-oscuro);
    overflow-x: hidden;
}

/* ========================================
   🏠 SOLO PARA HOME - OCULTAR HEADER Y FOOTER
   ======================================== */
body.home {
    background-color: var(--verde-oscuro);
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.home #masthead,
body.home .site-header,
body.home #colophon,
body.home .site-footer {
    display: none !important;
}

body.home .site-content,
body.home #primary,
body.home #content,
body.home .entry-content,
body.home .wp-block-html {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ========================================
   🎭 HERO SECTION (para home)
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradiente-hero);
    background-size: 400% 400%;
    animation: gradientShift 12s ease-in-out infinite;
    padding: 2rem 0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 0% 100%; }
}

/* ========================================
   🦶 FOOTER (para home)
   ======================================== */
.footer {
    background: linear-gradient(135deg, var(--verde-oscuro) 0%, #001a0f 100%);
    color: var(--blanco);
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--verde-neon), transparent);
    opacity: 0.8;
}

/* ========================================
   📄 PÁGINAS INTERNAS - PALETA ELEGANTE
   ======================================== */

/* Fondo verde pastel muy claro y suave */
body.page,
body.single,
body.archive,
body.search {
    background: #E8F4E8 !important;
    background-color: #E8F4E8 !important;
    background-image: none !important;
}

body.page .site,
body.single .site,
body.archive .site,
body.search .site {
    background: #E8F4E8 !important;
}

/* ========================================
   🎨 HEADER VERDE OSCURO PROFESIONAL
   ======================================== */
body:not(.home) .site-header,
body:not(.home) #masthead {
    background: #024023 !important;
    background-color: #024023 !important;
    border-bottom: 3px solid #038C3E !important;
    padding: 0 !important;
}

/* Banner superior */
body:not(.home) .site-header::before {
    content: 'CONECTAMOS Y FORTALECEMOS NEGOCIOS COLOMBIANOS EN ESTADOS UNIDOS';
    display: block;
    width: 100%;
    background: #024023 !important;
    color: white !important;
    text-align: center;
    padding: 8px 10px !important;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

body:not(.home) .wp-block-group.is-layout-flex {
    background: #024023 !important;
}

/* ========================================
   🖼️ LOGO MODERNO CON BORDES REDONDEADOS
   ======================================== */
body:not(.home) .wp-block-site-logo {
    display: block !important;
    padding: 8px 20px !important;
}

body:not(.home) .custom-logo-link {
    display: inline-block !important;
    width: 60px !important;
    height: 60px !important;
    background-image: url('https://soy-colombia.com/wp-content/uploads/2025/09/cropped-Logo.jpg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body:not(.home) .custom-logo {
    opacity: 0 !important;
    width: 60px !important;
    height: 60px !important;
}

/* ========================================
   📝 CONTENIDO - FONDO CREMA MUY CLARO
   ======================================== */
body:not(.home) .site-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 50px 40px !important;
    background-color: #F9FBF9 !important;
    min-height: 85vh !important;
    box-shadow: 0 2px 15px rgba(2, 64, 35, 0.1);
}

body:not(.home) #primary,
body:not(.home) #main {
    background-color: transparent !important;
    padding: 0 !important;
}

body:not(.home) .entry-content {
    padding: 0 !important;
    background-color: transparent !important;
}

/* Tipografía moderna */
body:not(.home) .entry-content h1 {
    font-size: 2.5em !important;
    font-weight: 700 !important;
    color: #024023 !important;
    margin: 0 0 25px 0 !important;
    line-height: 1.2 !important;
}

body:not(.home) .entry-content h2 {
    font-size: 1.8em !important;
    font-weight: 600 !important;
    color: #038C3E !important;
    margin: 40px 0 20px 0 !important;
    border-left: 4px solid #038C3E;
    padding-left: 15px;
}

body:not(.home) .entry-content h3 {
    font-size: 1.4em !important;
    font-weight: 600 !important;
    color: #024023 !important;
    margin: 30px 0 15px 0 !important;
}

body:not(.home) .entry-content p {
    font-size: 1.1em !important;
    line-height: 1.8 !important;
    color: #2d2d2d !important;
    margin-bottom: 20px !important;
}

body:not(.home) .entry-content ul,
body:not(.home) .entry-content ol {
    margin: 20px 0 20px 25px !important;
    line-height: 1.8 !important;
}

body:not(.home) .entry-content li {
    margin-bottom: 10px !important;
}

/* ========================================
   🦶 FOOTER VERDE OSCURO
   ======================================== */
body:not(.home) .site-footer,
body:not(.home) #colophon {
    background: linear-gradient(135deg, #024023 0%, #001a0f 100%) !important;
    color: #FFFFFF !important;
    padding: 40px 20px 25px !important;
}

body:not(.home) .site-footer *,
body:not(.home) .site-footer a {
    color: #FFFFFF !important;
}

body:not(.home) .site-footer a:hover {
    color: #5CFFC6 !important;
}

/* ========================================
   ❌ PÁGINA 404
   ======================================== */
body.error404 {
    background-color: #024023 !important;
}

.error404 .site-content {
    background-color: #024023 !important;
    color: #FFFFFF !important;
    text-align: center;
    padding: 60px 20px !important;
    max-width: 100% !important;
}

.error404 h1,
.error404 p {
    color: #FFFFFF !important;
}

.error404 .search-form {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error404 .search-form input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #038C3E;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    background-color: #ffffff;
    color: #333;
    outline: none;
}

.error404 .search-form button {
    padding: 0 20px;
    background: #038C3E;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    color: #fff;
}

/* ========================================
   📱 RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    body:not(.home) .site-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 25px 20px !important;
        box-shadow: none;
    }
    
    body:not(.home) .entry-content h1 {
        font-size: 2em !important;
    }
    
    body:not(.home) .entry-content h2 {
        font-size: 1.5em !important;
    }
}

/* ========================================
   💻 RESPONSIVE - TABLET
   ======================================== */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    body:not(.home) .site-content {
        max-width: 900px !important;
        padding: 35px 25px !important;
    }
}

/* ========================================
   📱 RESPONSIVE COMPLETO - MOBILE FIRST
   ======================================== */

/* ========================================
   📱 MÓVILES PEQUEÑOS (320px - 480px)
   ======================================== */
@media (max-width: 480px) {
    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        padding: 0 10px;
    }
    
    .hero p {
        font-size: 1rem !important;
        padding: 0 10px;
    }
    
    /* Header */
    body:not(.home) .site-header::before {
        font-size: 10px !important;
        padding: 6px 8px !important;
        letter-spacing: 0.1px;
    }
    
    body:not(.home) .custom-logo-link {
        width: 45px !important;
        height: 45px !important;
    }
    
    body:not(.home) .wp-block-site-logo {
        padding: 6px 15px !important;
    }
    
    /* Navegación móvil */
    body:not(.home) .wp-block-navigation__responsive-container-open,
    body:not(.home) .wp-block-navigation__responsive-container {
        background: #024023 !important;
    }
    
    body:not(.home) .wp-block-navigation__responsive-container-content {
        padding: 20px !important;
        background: #024023 !important;
    }
    
    body:not(.home) .wp-block-navigation-item a {
        font-size: 16px !important;
        padding: 12px 0 !important;
        color: white !important;
    }
    
    /* Contenido */
    body:not(.home) .site-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px 15px !important;
        box-shadow: none !important;
    }
    
    body:not(.home) .entry-content h1 {
        font-size: 1.6rem !important;
        margin: 0 0 15px 0 !important;
    }
    
    body:not(.home) .entry-content h2 {
        font-size: 1.3rem !important;
        margin: 25px 0 12px 0 !important;
        padding-left: 10px;
    }
    
    body:not(.home) .entry-content h3 {
        font-size: 1.15rem !important;
        margin: 20px 0 10px 0 !important;
    }
    
    body:not(.home) .entry-content p {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
        margin-bottom: 15px !important;
    }
    
    body:not(.home) .entry-content ul,
    body:not(.home) .entry-content ol {
        margin: 15px 0 15px 20px !important;
        font-size: 0.95rem !important;
    }
    
    /* Imágenes responsive */
    body:not(.home) .entry-content img,
    body:not(.home) .wp-block-image img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        margin: 15px auto !important;
    }
    
    /* Tablas responsive */
    body:not(.home) .entry-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 0.85rem !important;
    }
    
    /* Botones */
    body:not(.home) .wp-block-button__link,
    body:not(.home) .wp-element-button {
        font-size: 14px !important;
        padding: 10px 20px !important;
        width: 100%;
        text-align: center;
        display: block;
    }
    
    /* Footer */
    body:not(.home) .site-footer,
    body:not(.home) #colophon {
        padding: 25px 15px 20px !important;
    }
    
    body:not(.home) .site-footer p {
        font-size: 0.9rem !important;
        text-align: center;
    }
    
    /* Error 404 */
    .error404 .site-content {
        padding: 40px 15px !important;
    }
    
    .error404 h1 {
        font-size: 2rem !important;
    }
    
    .error404 .search-form {
        flex-direction: column;
        max-width: 100%;
    }
    
    .error404 .search-form input[type="search"],
    .error404 .search-form button {
        border-radius: 8px !important;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ========================================
   📱 MÓVILES MEDIANOS (481px - 767px)
   ======================================== */
@media (min-width: 481px) and (max-width: 767px) {
    /* Hero Section */
    .hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.3 !important;
    }
    
    .hero p {
        font-size: 1.1rem !important;
    }
    
    /* Header */
    body:not(.home) .site-header::before {
        font-size: 11px !important;
        padding: 7px 10px !important;
    }
    
    body:not(.home) .custom-logo-link {
        width: 50px !important;
        height: 50px !important;
    }
    
    /* Contenido */
    body:not(.home) .site-content {
        padding: 30px 20px !important;
    }
    
    body:not(.home) .entry-content h1 {
        font-size: 1.9rem !important;
    }
    
    body:not(.home) .entry-content h2 {
        font-size: 1.5rem !important;
        margin: 30px 0 15px 0 !important;
    }
    
    body:not(.home) .entry-content h3 {
        font-size: 1.25rem !important;
    }
    
    body:not(.home) .entry-content p {
        font-size: 1rem !important;
        line-height: 1.75 !important;
    }
}

/* ========================================
   💻 TABLETS (768px - 1024px)
   ======================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Hero Section */
    .hero h1 {
        font-size: 2.8rem !important;
    }
    
    .hero p {
        font-size: 1.2rem !important;
    }
    
    /* Header */
    body:not(.home) .site-header::before {
        font-size: 12px !important;
    }
    
    body:not(.home) .custom-logo-link {
        width: 55px !important;
        height: 55px !important;
    }
    
    /* Contenido */
    body:not(.home) .site-content {
        max-width: 900px !important;
        padding: 40px 30px !important;
    }
    
    body:not(.home) .entry-content h1 {
        font-size: 2.2rem !important;
    }
    
    body:not(.home) .entry-content h2 {
        font-size: 1.7rem !important;
    }
    
    body:not(.home) .entry-content h3 {
        font-size: 1.35rem !important;
    }
    
    body:not(.home) .entry-content p {
        font-size: 1.05rem !important;
    }
    
    /* Navegación en tablet */
    body:not(.home) .wp-block-navigation-item a {
        font-size: 15px !important;
        padding: 10px 15px !important;
    }
}

/* ========================================
   🖥️ LAPTOPS PEQUEÑAS (1025px - 1366px)
   ======================================== */
@media (min-width: 1025px) and (max-width: 1366px) {
    body:not(.home) .site-content {
        max-width: 1100px !important;
        padding: 45px 35px !important;
    }
    
    body:not(.home) .entry-content h1 {
        font-size: 2.3rem !important;
    }
}

/* ========================================
   🌐 FIXES GENERALES RESPONSIVE
   ======================================== */

/* Prevenir overflow horizontal */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Contenedores flex responsive */
body:not(.home) .wp-block-group.is-layout-flex {
    flex-wrap: wrap !important;
}

/* Videos responsive */
body:not(.home) .entry-content iframe,
body:not(.home) .entry-content video {
    max-width: 100% !important;
    height: auto !important;
}

/* Formularios responsive */
body:not(.home) .entry-content input[type="text"],
body:not(.home) .entry-content input[type="email"],
body:not(.home) .entry-content textarea,
body:not(.home) .entry-content select {
    max-width: 100% !important;
    width: 100%;
    padding: 10px;
    font-size: 16px; /* Previene zoom en iOS */
}

/* Galerías responsive */
body:not(.home) .wp-block-gallery {
    gap: 10px !important;
}

@media (max-width: 768px) {
    body:not(.home) .wp-block-gallery {
        flex-direction: column !important;
    }
    
    body:not(.home) .wp-block-gallery .wp-block-image {
        width: 100% !important;
    }
}

/* Columnas responsive */
@media (max-width: 768px) {
    body:not(.home) .wp-block-columns {
        flex-direction: column !important;
    }
    
    body:not(.home) .wp-block-column {
        width: 100% !important;
        margin-bottom: 20px;
    }
}

/* Menú hamburguesa mejorado */
@media (max-width: 768px) {
    body:not(.home) .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex !important;
        background: transparent;
        border: none;
        color: white !important;
        font-size: 24px;
        padding: 8px;
        cursor: pointer;
    }
    
    body:not(.home) .wp-block-navigation__responsive-close {
        color: white !important;
        font-size: 24px;
    }
}

/* Espaciado responsive para WordPress blocks */
@media (max-width: 768px) {
    body:not(.home) .wp-block-spacer {
        height: 20px !important;
    }
}

/* Touch targets mínimos para móvil */
@media (max-width: 768px) {
    body:not(.home) a,
    body:not(.home) button,
    body:not(.home) .wp-block-button__link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Prevenir zoom en inputs en iOS */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ========================================
   🎯 OPTIMIZACIONES DE RENDIMIENTO MÓVIL
   ======================================== */
@media (max-width: 768px) {
    /* Reducir animaciones en móvil */
    .hero {
        animation-duration: 20s !important;
    }
    
    /* Optimizar imágenes de fondo */
    body:not(.home) .site-header,
    body:not(.home) .site-footer {
        background-attachment: scroll !important;
    }
}

/* ========================================
   ♿ ACCESIBILIDAD MÓVIL
   ======================================== */
@media (max-width: 768px) {
    /* Mejorar contraste en móvil */
    body:not(.home) .entry-content a {
        text-decoration: underline;
        font-weight: 600;
    }
    
    /* Skip links para navegación por teclado */
    .skip-link {
        position: absolute;
        top: -40px;
        left: 0;
        background: #024023;
        color: white;
        padding: 8px;
        text-decoration: none;
    }
    
    .skip-link:focus {
        top: 0;
    }
}