/* 
   MANUAL TÉCNICO DE ESTILOS CSS
   Sistema de Diseño: Azure Ethos
   Este archivo define la identidad visual completa del portal, incluyendo tipografía,
   paleta de colores, sombras, bordes y utilidades de espaciado.
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
    /* PALETA DE COLORES INSTITUCIONALES 
       Se utilizan variables CSS para facilitar cambios globales. 
    */
    --primary: #00327d;             /* Azul Alas (Oscuro) */
    --primary-container: #0047ab;   /* Azul Alas (Brillante) */
    --on-primary: #ffffff;
    --secondary: #4e5e85;           /* Azul Grisáceo para textos secundarios */
    --accent: #FF8C00;              /* Naranja de acento para contrastes */
    --background: #f9f9fc;
    --surface: #ffffff;
    --surface-variant: #f3f3f6;
    --on-surface: #1a1c1e;
    --outline: #737784;
    --glass-background: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* SISTEMA DE SOMBRAS (Efecto de profundidad) */
    --shadow-sm: 0 2px 4px rgba(0, 71, 171, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 71, 171, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 71, 171, 0.08);
    
    /* RADIOS DE BORDES (Consistency en esquinas) */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    
    /* TRANSICIONES (Micro-animaciones) */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET GENERAL Y ESTILOS BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--on-surface);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Manrope', sans-serif;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* UTILIDADES DE LAYOUT */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

/* COMPONENTE: HEADER (Sticky Nav con Glassmorphism) */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--surface-variant);
    padding: 1rem 0;
}

header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Manrope', sans-serif;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:hover {
    color: var(--primary-container);
}

/* Dropdown Menu - Navegación de Servicios */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--surface);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    z-index: 1001;
    top: 100%;
    left: 0;
    overflow: visible; /* Cambiado a visible para permitir el bridge */
    padding: 0.5rem 0;
    border: 1px solid var(--surface-variant);
    animation: fadeIn 0.2s ease;
}

/* Puente invisible para evitar que el menú se cierre al mover el mouse */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
}

.dropdown-content a {
    color: var(--secondary);
    padding: 0.8rem 1.2rem;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0;
    opacity: 1;
}

.dropdown-content a:hover {
    background-color: var(--surface-variant);
    color: var(--primary);
    opacity: 1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropbtn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

/* BOTONES ESTANDARIZADOS */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-container);
    color: var(--on-primary);
}

.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-container);
    color: var(--primary-container);
}

.btn-outline:hover {
    background: rgba(0, 71, 171, 0.05);
}

/* SECCIÓN HERO (Alto impacto visual) */
.hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 50, 125, 0.8) 0%, rgba(0, 71, 171, 0.4) 100%);
    z-index: -1;
}

.hero h1, .hero-title {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; margin-bottom: 2rem; }
    .hero-search-box { padding: 1.5rem !important; }
}

/* CARDS (Contenedores de elevación) */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* FORMULARIOS TÉCNICOS */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-variant);
    background: var(--surface-variant);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--primary-container);
    box-shadow: 0 0 0 4px rgba(0, 71, 171, 0.1);
}

/* GRID DE CATEGORÍAS */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    text-align: center;
    padding: 2rem 1.5rem;
    cursor: pointer;
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary-container);
    margin-bottom: 0.75rem;
}

/* FOOTER INSTITUCIONAL */
footer {
    background: var(--primary);
    color: white;
    padding: 4rem 0;
}

footer .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

footer .footer-content h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

footer .footer-content a {
    display: block;
    margin-bottom: 0.8rem;
    opacity: 0.7;
    font-size: 0.95rem;
    transition: var(--transition);
}

footer .footer-content a:hover {
    opacity: 1;
    padding-left: 0.5rem;
}

/* TARJETAS DE VACANTES DINÁMICAS */
.job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--surface-variant);
}

.job-info h3 {
    margin-bottom: 0.5rem;
}

.job-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--secondary);
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-new { background: #e3f2fd; color: #1565c0; }
.badge-hot { background: #fff3e0; color: #e65100; }

/* CABECERA ESTANDARIZADA (Franja Azul Transversal) */
.page-header {
    background: var(--primary);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.page-header h1 { 
    color: white !important; 
    margin-bottom: 0.3rem; 
    font-size: 3rem; 
    line-height: 1.15;
}

.page-header p { 
    color: white;
    opacity: 0.8; 
    font-size: 1.2rem; 
    line-height: 1.3;
}

/* RESPONSIVE DESIGN (Media Queries) */
@media (max-width: 992px) {
    .container { padding: 0 1.5rem; }
    .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    header { padding: 0.5rem 0; }
    .logo img { height: 32px !important; }
    .logo span { font-size: 1.15rem !important; }
    .card { padding: 1.25rem !important; }
    .category-card { padding: 1.25rem 1rem !important; }
    .category-card i { font-size: 2rem !important; margin-bottom: 0.5rem !important; }
    .category-card h3 { margin-bottom: 0.25rem !important; }
    .hero { padding: 2rem 0; height: auto; min-height: auto; overflow: visible; }
    .hero-title, .hero h1 { font-size: 1.8rem !important; line-height: 1.15 !important; margin-bottom: 0.5rem !important; }
    .hero-subtitle, .hero p { font-size: 1rem !important; line-height: 1.3 !important; margin-bottom: 1.25rem !important; }
    .hero-search-box { padding: 1rem !important; }
    .hero-search-form { gap: 0.8rem !important; }
    .hero-search-form .form-control { padding: 0.8rem !important; }
    .hero-search-form button { padding: 0.8rem !important; }
    
    /* Header Mobile Sidebar */
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        left: -300px; /* Oculto fuera de la pantalla */
        height: 100vh; /* Altura completa de la ventana */
        width: 140px;
        background: white;
        flex-direction: column;
        padding: 5rem 1rem 2rem; /* Padding reducido para 140px */
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        text-align: left;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .nav-links.active {
        left: 0; /* Deslizar hacia adentro */
    }

    .public-sidebar-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .public-sidebar-overlay.active {
        display: block;
    }

    .mobile-menu-toggle {
        display: block !important;
        font-size: 1.5rem;
        color: var(--primary);
        cursor: pointer;
        z-index: 1100;
    }

    .job-card { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1rem !important; }
    .job-meta { flex-direction: column; gap: 0.4rem; }
    
    .section-padding { padding: 1.5rem 0; }
    .section-header { margin-bottom: 1.25rem; }
    .section-header h2 { font-size: 1.8rem !important; margin-bottom: 0.5rem !important; }
    .section-header p { font-size: 0.95rem; }
    .section-header-between { margin-bottom: 1.25rem; }
}

.public-sidebar-overlay { display: none; }

.mobile-menu-toggle { display: none; }

/* Grid Utils */
.responsive-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.responsive-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 992px) {
    .responsive-grid-4 { grid-template-columns: 1fr 1fr; }
    .page-header { padding: 1.5rem 0; }
}

@media (max-width: 768px) {
    .responsive-grid-2, .responsive-grid-4 { grid-template-columns: 1fr; gap: 1.5rem; }
    .page-header { padding: 0.15rem 0; }
    .page-header h1 { font-size: 1.7rem; line-height: 1.1; margin-bottom: 0.2rem; }
    .page-header p { font-size: 1rem; line-height: 1.25; }
}

.hero-search-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 600px) {
    .hero-search-form { grid-template-columns: 1fr; }
}

/* ANIMACIONES GLOBALES */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* DESARROLLADO POR: Israel Alejandro Suaste Rivas (ES1921020963) */

/* Service Page Specifics - Componentes de Vista de Servicios */
.service-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
    margin-bottom: 8rem;
}

.service-section:nth-child(even) {
    direction: rtl;
}

.service-section:nth-child(even) .service-text {
    direction: ltr;
    text-align: left;
}

.service-image {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.service-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.service-text h3 {
    margin: 1.5rem 0 1rem;
    color: var(--secondary);
    font-size: 1.2rem;
    font-weight: 700;
}

.service-list {
    list-style: none;
    margin-top: 1.5rem;
}

.service-list li {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: var(--secondary);
    line-height: 1.5;
}


/* COMPONENTE: TOAST NOTIFICATIONS (Alertas Personalizadas) */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    background: white;
    color: var(--on-surface);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 50, 125, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    max-width: 450px;
    animation: toastIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid var(--primary-container);
    pointer-events: auto;
}

.toast.success { border-left-color: #2ecc71; }
.toast.error { border-left-color: #e74c3c; }
.toast.info { border-left-color: #3498db; }
.toast.warning { border-left-color: #f1c40f; }

.toast i { font-size: 1.2rem; }
.toast.success i { color: #2ecc71; }
.toast.error i { color: #e74c3c; }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}


.service-list li i {
    color: var(--primary-container);
    margin-top: 0.3rem;
    font-size: 0.8rem;
}

@media (max-width: 992px) {
    .service-section, .service-section:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
        margin-bottom: 4rem;
    }
    
    .service-text h2 {
        font-size: 2rem;
    }
}
