/*
Theme Name: Semerc Custom Theme
Theme URI: https://www.semerc.net/
Author: Antigravity AI
Author URI: https://deepmind.google/
Description: Tema premium a medida para SEMERC, diseñado para máxima velocidad y una estética de vanguardia en la presentación de servicios de Outsourcing de RRHH, Trade Marketing y BTL.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: semerc-theme
*/

/* ==========================================================================
   1. SISTEMA DE DISEÑO & VARIABLES (Aesthetic Tokens)
   ========================================================================== */
:root {
    /* Paleta de Colores Corporativos SEMERC (Exactos del Logo) */
    --color-primary: #022554;                                       /* Azul Marino Oscuro SEMERC */
    --color-primary-light: #083d82;                                 /* Azul Marino Más Claro (para gradientes) */
    
    /* Turquesa/Cian Eléctrico complementario para mantener el dinamismo BTL */
    --color-secondary: hsl(185, 85%, 45%);                           /* Turquesa Eléctrico - Innovación */
    --color-secondary-hover: hsl(185, 90%, 38%);
    
    /* Gris Corporativo del Logo SEMERC */
    --color-brand-grey: #605F62;                                    /* Gris SEMERC */
    --color-accent: hsl(14, 90%, 55%);                              /* Coral Vivo - Impacto */
    
    /* Neutros */
    --bg-main: hsl(210, 40%, 98%);
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-dark: #022554;                                             /* Usamos el azul corporativo para fondos oscuros */
    --bg-dark-accent: #01142e;
    --text-main: hsl(215, 30%, 18%);
    --text-muted: #605F62;                                          /* Usamos el Gris SEMERC para textos secundarios */
    --text-light: hsl(0, 0%, 100%);
    --border-color: rgba(226, 232, 240, 0.8);
    
    /* Fuentes */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Sombras & Efectos */
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 16px -6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(16px);
}

/* ==========================================================================
   2. RESET DE ESTILOS & GENERALES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.25;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-secondary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(96, 95, 98, 0.3); /* Gris SEMERC con opacidad */
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ==========================================================================
   3. CLASES DE UTILIDAD & MAQUETACIÓN
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

.text-center { text-align: center; }

/* Grid de Columnas Responsive */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 48px;
    align-items: stretch;
}

/* ==========================================================================
   4. COMPONENTES PREMIUM & ELEMENTOS DE INTERFAZ
   ========================================================================== */

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(15, 27, 73, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary-light));
    z-index: -1;
    opacity: 0;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(15, 27, 73, 0.3);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--text-light);
    transform: translateY(-3px);
}

/* Navbar / Cabecera (Glassmorphic) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(2, 37, 84, 0.15);
    box-shadow: 0 4px 20px rgba(2, 37, 84, 0.05);
}

.site-header.scrolled .nav-menu a {
    color: var(--color-brand-grey);
}

.site-header.scrolled .nav-menu a:hover {
    color: var(--color-primary);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: var(--transition-smooth);
}

@media (min-width: 1101px) {
    .navbar {
        justify-content: flex-start;
        gap: 40px;
    }
}

.site-header.scrolled .navbar {
    height: 70px;
}

/* Logo */
.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--color-secondary);
}

.logo img {
    height: 65px; /* Tamaño del logo en escritorio */
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease; /* Transición suave solo en la altura */
}

.site-header.scrolled .logo img {
    height: 50px; /* Tamaño del logo scrolled */
}

/* Menú de Navegación */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 16px;
    align-items: center;
    transform: translateY(6px);
}

.nav-menu a {
    color: var(--color-brand-grey);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
    padding: 8px 0;
    white-space: nowrap; /* Evita que opciones como "Quiénes Somos" se rompan en dos líneas */
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-smooth);
}

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

/* Botón Hamburguesa Móvil */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* Tarjetas (Cards) Premium */
.card-premium {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: var(--transition-smooth);
}

.card-premium:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--glass-border);
}

.card-premium:hover::before {
    opacity: 1;
}

.card-premium .card-icon {
    width: 60px;
    height: 60px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--color-secondary);
    font-size: 1.5rem;
    transition: var(--transition-smooth);
}

.card-premium:hover .card-icon {
    background-color: var(--color-secondary);
    color: var(--text-light);
    transform: rotateY(360deg);
}

/* ==========================================================================
   5. PLANTILLA FRONT-PAGE (LANDING PAGE DE PORTADA)
   ========================================================================== */

/* Hero Section */
.hero-section {
    position: relative;
    padding: 180px 0 120px 0;
    background: linear-gradient(135deg, hsl(210, 50%, 96%) 0%, hsl(220, 30%, 92%) 100%);
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, var(--bg-main), transparent);
    pointer-events: none;
}

.hero-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
}

.hero-bg-shapes .shape-1 {
    width: 400px;
    height: 400px;
    background-color: var(--color-primary);
    top: -100px;
    right: -100px;
}

.hero-bg-shapes .shape-2 {
    width: 300px;
    height: 300px;
    background-color: var(--color-secondary);
    bottom: -50px;
    left: -100px;
}

.hero-bg-chess {
    position: fixed;
    top: 50%;
    left: 0.5%;
    transform: translateY(-50%);
    width: 500px;
    height: 80vh;
    background-image: url('images/TorreLateral2.png');
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-mobile-image {
    display: block;
    width: 100%;
}

.hero-desktop-image-bg {
    display: none;
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-mobile-image {
        display: none;
    }
    
    .hero-desktop-image-bg {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 50%;
        background-image: url('images/hero-image.jpg');
        background-repeat: no-repeat;
        background-position: center left;
        background-size: cover;
        z-index: 1;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.05) 5%, rgba(0,0,0,1) 45%);
        mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.05) 5%, rgba(0,0,0,1) 45%);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
}

.hero-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(14, 165, 233, 0.12);
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title span {
    background: linear-gradient(135deg, var(--color-primary) 30%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* Stats Section */
.stats-section {
    background-color: var(--bg-dark);
    color: var(--text-light);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--color-secondary);
    margin-bottom: 8px;
    font-weight: 800;
}

.stat-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Section Titles */
.section-title-wrapper {
    margin-bottom: 60px;
}

.section-subtitle {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--color-secondary);
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    letter-spacing: -0.5px;
}

/* ==========================================================================
   6. CONTACT BANNER & FOOTER
   ========================================================================== */
.contact-banner {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-lg);
    padding: 80px 48px;
    color: var(--text-light);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact-banner .banner-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.contact-banner h2 {
    color: var(--text-light);
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 20px;
}

.contact-banner p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 32px auto;
}

/* Footer modern layout */
.site-footer {
    background-color: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px 0;
    margin-top: 100px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--color-secondary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition-smooth);
}

.footer-col ul li a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-location-link:hover {
    color: var(--color-secondary) !important;
}

.footer-logo {
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
}

/* ==========================================================================
   7. ANIMACIONES & RESPONSIVIDAD
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 1100px) {
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--color-primary);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: var(--transition-smooth);
        z-index: 999;
        padding: 40px;
        transform: none;
    }
    
    .site-header.scrolled .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a {
        color: var(--text-light) !important;
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Efecto Hover Premium para Redes Sociales */
.footer-socials a:hover {
    background-color: var(--color-secondary) !important;
    color: var(--text-light) !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ==========================================================================
   8. ESTILOS ADICIONALES PARA NUEVAS SECCIONES (Alianzas, Cotización y Bolsa)
   ========================================================================== */

/* Formulario de Cotización */
#quote-form .form-group {
    position: relative;
}

#quote-form input,
#quote-form select,
#quote-form textarea {
    border: 1px solid var(--border-color);
    background-color: hsl(210, 40%, 99%);
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.02);
}

#quote-form select {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    background-image: none !important;
    cursor: pointer;
}

#quote-form select option {
    background-color: var(--text-light) !important;
    color: var(--text-main) !important;
}

#quote-form input:focus,
#quote-form select:focus,
#quote-form textarea:focus {
    border-color: var(--color-secondary) !important;
    background-color: var(--text-light);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15), inset 0 2px 4px rgba(15, 23, 42, 0.01);
    outline: none;
}

/* Efecto hover interactivo para las vacantes de Bolsa de Empleo */
#bolsa-empleo .card-premium {
    border: 1px solid rgba(2, 37, 84, 0.08);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

#bolsa-empleo .card-premium:hover {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-lg);
}

/* Animación y efecto para la sección de Alianzas */
#alianzas-estrategicas .card-premium {
    background: var(--text-light);
}

/* Ajustes de responsividad específicos para pantallas más pequeñas en grids */
@media (max-width: 768px) {
    #asesoria-cotizacion .grid-2 {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Banner de Título de Páginas Secundarias */
.page-title-banner {
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .page-title-banner {
        padding: 130px 0 50px 0 !important;
    }
    .hero-section {
        padding: 130px 0 60px 0;
    }
}

/* ==========================================================================
   9. NUEVOS ESTILOS PARA LISTA DE SERVICIOS INTRODUCTORIOS Y MODALES (POP-UP)
   ========================================================================== */

/* Lista de servicios introductorios (Píldoras/Chips) */
.services-list-intro {
    max-width: 900px;
    margin: 0 auto 50px auto;
}

.services-list-intro-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.services-inline-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    padding: 0;
}

.services-inline-list li {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-brand-grey);
    background-color: var(--text-light);
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.services-inline-list li:hover {
    border-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-primary);
}

.services-inline-list li span {
    color: var(--color-secondary);
    font-weight: 800;
}

/* Botón Ver más en tarjetas */
.btn-ver-mas {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    transition: var(--transition-smooth);
    margin-top: 18px;
}

.btn-ver-mas:hover {
    color: var(--color-secondary-hover);
    gap: 10px;
}

/* Modal Popup Premium */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 37, 84, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.service-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.service-modal-content {
    background-color: var(--text-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 95, 98, 0.3) transparent;
}

.service-modal-content::-webkit-scrollbar {
    width: 6px;
}

.service-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.service-modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(96, 95, 98, 0.3);
    border-radius: 3px;
}

.service-modal.active .service-modal-content {
    transform: scale(1);
}

.service-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(2, 37, 84, 0.05);
}

.service-modal-close:hover {
    background-color: var(--color-accent);
    color: var(--text-light);
    transform: rotate(90deg);
}

.service-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    padding-right: 24px; /* Evita solapamiento con la X de cierre */
}

.service-modal-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-modal-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

.service-modal-body {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.75;
}

.service-modal-body p {
    margin-bottom: 16px;
}

.service-modal-body p:last-child {
    margin-bottom: 0;
}

/* Evitar scroll del body cuando el modal está activo */
body.modal-open {
    overflow: hidden;
}

/* ==========================================================================
   10. ESTILOS PARA EL GRID DE LOGOTIPOS DE MARCAS
   ========================================================================== */

.marcas-grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.marca-grid-card {
    /* 4 columnas en escritorio. Ancho de cada tarjeta = (100% - gap * 3) / 4 */
    flex: 0 0 calc(25% - 18px);
    height: 130px;
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.marca-grid-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-secondary);
}

.marca-grid-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.55;
    transition: var(--transition-smooth);
}

.marca-grid-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Responsividad */
@media (max-width: 992px) {
    /* 3 columnas en tabletas */
    .marca-grid-card {
        flex: 0 0 calc(33.333% - 16px);
        height: 120px;
        padding: 16px;
    }
}

@media (max-width: 600px) {
    /* 2 columnas en móviles */
    .marca-grid-card {
        flex: 0 0 calc(50% - 12px);
        height: 100px;
        padding: 12px;
        border-radius: var(--radius-sm);
    }
    .marcas-grid-container {
        gap: 16px;
    }
}

/* ==========================================================================
   11. SINGLE JOB LISTING — Vista Individual de Vacante (WP Job Manager)
   ========================================================================== */

/* ── Hero Banner ────────────────────────────────────────────────────── */
.job-single-hero {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: 160px 0 60px 0;
    overflow: hidden;
}

.job-single-hero .banner-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 85% 15%, rgba(14, 165, 233, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 10% 85%, rgba(14, 165, 233, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.job-single-hero-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.7s ease both;
}

/* ── Company Logo (Hero) ────────────────────────────────────────────── */
.job-company-logo-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.job-company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.job-company-logo-placeholder {
    color: var(--color-brand-grey);
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Hero Content ───────────────────────────────────────────────────── */
.job-hero-content {
    flex: 1;
    min-width: 0; /* Prevents flex child overflow */
}

.job-type-badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(14, 165, 233, 0.2);
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    margin-bottom: 14px;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.job-single-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 18px;
}

/* ── Meta Pills (Hero) ─────────────────────────────────────────────── */
.job-meta-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.job-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.job-meta-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.job-meta-item svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* ── Body Layout (Content + Sidebar) ────────────────────────────────── */
.job-single-body {
    background-color: var(--bg-main);
    padding-top: 60px;
    padding-bottom: 100px;
}

.job-single-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* ── Content Card (Main Column) ─────────────────────────────────────── */
.job-single-content {
    min-width: 0;
}

.job-content-card {
    background: var(--text-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 48px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease 0.1s both;
}

.job-content-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.job-content-heading svg {
    color: var(--color-secondary);
    flex-shrink: 0;
}

/* ── Post Content Typography (the_content) ──────────────────────────── */
.job-content-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.job-content-body h2,
.job-content-body h3,
.job-content-body h4 {
    margin-top: 32px;
    margin-bottom: 14px;
    color: var(--color-primary);
}

.job-content-body h2 { font-size: 1.4rem; }
.job-content-body h3 { font-size: 1.2rem; }
.job-content-body h4 { font-size: 1.05rem; }

.job-content-body p {
    margin-bottom: 16px;
    color: var(--text-main);
}

.job-content-body ul,
.job-content-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.job-content-body li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.job-content-body ul li {
    list-style: none;
    position: relative;
    padding-left: 20px;
}

.job-content-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-secondary);
}

.job-content-body strong {
    color: var(--color-primary);
    font-weight: 600;
}

.job-content-body a {
    color: var(--color-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.job-content-body a:hover {
    color: var(--color-secondary-hover);
}

.job-content-body blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: rgba(14, 165, 233, 0.04);
    border-left: 4px solid var(--color-secondary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-muted);
}

.job-content-body img {
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.job-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.job-content-body th,
.job-content-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.job-content-body th {
    background: rgba(2, 37, 84, 0.03);
    font-weight: 600;
    color: var(--color-primary);
}

/* ── Sidebar ────────────────────────────────────────────────────────── */
.job-single-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeInUp 0.6s ease 0.25s both;
}

.job-sidebar-card {
    background: var(--text-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.job-sidebar-card:hover {
    box-shadow: var(--shadow-md);
}

.job-sidebar-title {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.job-sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

/* ── Summary Definition List ────────────────────────────────────────── */
.job-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.job-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    gap: 12px;
}

.job-summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.job-summary-row:first-child {
    padding-top: 0;
}

.job-summary-row dt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.job-summary-row dt svg {
    color: var(--color-secondary);
    flex-shrink: 0;
}

.job-summary-row dd {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-main);
    text-align: right;
    margin: 0;
    word-break: break-word;
}

.job-summary-row dd a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
}

.job-summary-row dd a:hover {
    text-decoration: underline;
}

/* ── Apply Card ─────────────────────────────────────────────────────── */
.job-apply-card {
    background: linear-gradient(145deg, rgba(2, 37, 84, 0.02), rgba(14, 165, 233, 0.04));
    border-color: rgba(14, 165, 233, 0.15);
}

.job-apply-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ── WP Job Manager Native Apply Button Override ────────────────────── */
.job-apply-action .application_button,
.job-apply-action .job_application_area,
.job-apply-action input[type="submit"],
.job-apply-action .application_button_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 28px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--text-light) !important;
    box-shadow: 0 6px 20px rgba(2, 37, 84, 0.25);
    transition: var(--transition-smooth);
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.3px;
}

.job-apply-action .application_button:hover,
.job-apply-action input[type="submit"]:hover,
.job-apply-action .application_button_link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(2, 37, 84, 0.35);
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
}

/* Style the WPJM application details area when revealed */
.job-apply-action .application_details {
    margin-top: 16px;
    padding: 20px;
    background: var(--text-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    line-height: 1.6;
}

.job-apply-action .application_details p {
    margin-bottom: 12px;
    color: var(--text-main);
}

.job-apply-action .application_details p:last-child {
    margin-bottom: 0;
}

/* ── Back Link ──────────────────────────────────────────────────────── */
.job-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-brand-grey);
    transition: var(--transition-smooth);
}

.job-back-link:hover {
    color: var(--color-primary);
    gap: 12px;
}

.job-back-link svg {
    transition: var(--transition-smooth);
}

.job-back-link:hover svg {
    transform: translateX(-4px);
}

/* ── Responsive: Job Single ─────────────────────────────────────────── */
@media (max-width: 992px) {
    .job-single-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .job-single-sidebar {
        position: static;
    }

    .job-content-card {
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .job-single-hero {
        padding: 130px 0 40px 0;
    }

    .job-single-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .job-company-logo-wrap {
        width: 76px;
        height: 76px;
    }

    .job-content-card {
        padding: 24px;
    }

    .job-sidebar-card {
        padding: 24px;
    }

    .job-meta-list {
        gap: 8px;
    }

    .job-meta-item {
        font-size: 0.82rem;
        padding: 6px 12px;
    }
}

/* Bolsa de Empleo Card Styles */
.apply-button-premium {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light) !important;
    background: var(--color-primary);
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition-smooth);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(2, 37, 84, 0.15);
}

.apply-button-premium:hover {
    background: var(--color-secondary);
    color: var(--text-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.3);
}

.apply-button-premium:hover svg {
    transform: translateX(3px);
}

/* Botón de WhatsApp */
.btn-whatsapp {
    background-color: transparent;
    color: #25D366;
    border: 2px solid #25D366;
}

.btn-whatsapp:hover {
    background-color: #25D366;
    color: var(--text-light) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}

/* ==========================================================================
   12. ELIMINACIÓN DE METADATOS DUPLICADOS DE WP JOB MANAGER
   ========================================================================== */

/* Ocultamos la lista de metadatos por defecto que inyecta WPJM en el contenido,
   ya que la información (ubicación, fecha, jornada, etc.) ya se muestra 
   con un diseño premium a medida en la cabecera (Hero) y en la barra lateral (Sidebar). */
.job-content-body .single_job_listing ul.meta,
.job-content-body ul.meta,
.single_job_listing ul.meta {
    display: none !important;
}

/* Centrado responsivo del último elemento (tarjeta 7) en la cuadrícula de 3 columnas */
@media (min-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .last-centered-card {
        grid-column: 2 / span 1 !important;
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .last-centered-card {
        grid-column: 1 / -1 !important;
        justify-self: center;
        width: 100%;
        max-width: 380px;
    }
}
@media (max-width: 767px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .last-centered-card {
        grid-column: auto !important;
        justify-self: stretch;
        width: 100%;
    }
}

/* ==========================================================================
   13. CARRUSEL DE GALERÍA (Proyectos y Actividades)
   ========================================================================== */
.custom-carousel-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 60px;
    display: flex;
    align-items: center;
}

.custom-carousel-track-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    display: flex;
    width: 100%;
    scrollbar-width: none; /* Firefox */
}

.custom-carousel-track-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.custom-carousel-track {
    display: flex;
    gap: 24px;
    padding: 10px 0;
}

.custom-carousel-slide {
    flex: 0 0 auto;
    width: 600px;
    height: 450px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition-smooth);
    padding: 8px;
    cursor: pointer;
}

.custom-carousel-slide:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-secondary);
}

.custom-carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
}

/* Botones de navegación */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--color-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    z-index: 10;
}

.carousel-btn:hover {
    background-color: var(--color-secondary);
    color: var(--text-light);
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
}

.carousel-btn.prev-btn {
    left: 10px;
}

.carousel-btn.next-btn {
    right: 10px;
}

@media (max-width: 768px) {
    .custom-carousel-wrapper {
        padding: 20px 20px;
    }
    .carousel-btn {
        display: none; /* Ocultar botones en móvil y tabletas */
    }
    .custom-carousel-slide {
        width: 400px;
        height: 300px;
    }
}

/* Lightbox Modal */
.image-lightbox {
    display: none;
    position: fixed;
    z-index: 2100; /* Por encima del header y otros modales */
    padding-top: 40px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 27, 73, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    object-fit: contain;
}

@keyframes zoomIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 300;
    transition: var(--transition-smooth);
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-secondary);
    transform: scale(1.1);
}


