/* ==========================================================
   1. CONFIGURACIÓN BASE Y RESET
   ========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(to bottom, #f0f0f0 0%, #bdc3c7 20%, #2c3e50 60%, #1a1a2e 100%);
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================
   2. HEADER (ENCABEZADO)
   ========================================================== */
.main-header {
    position: relative;
    padding: 20px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 150px;
}

.main-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: blur(2px);
    background-image: 
        radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.5) 100%), 
        url('/recursos/fondo.jpeg');
    opacity: 0.7;
}

.rif {
    text-align: right;
    font-size: 0.85rem;
    color: #1a1a2e;
    font-weight: bold;
    margin-bottom: 10px;
    width: 100%;
}

.main-logo {
    max-width: 90%;
    height: auto;
    max-height: 180px;
    filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.6)) 
            drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.03);
}

/* ==========================================================
   3. NAVEGACIÓN (MENÚ PRINCIPAL Y SUBMENÚ)
   ========================================================== */
.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    background: #2a2a72;
    border-top: 2px solid #1a1a2e;
    padding: 5px;
}

.main-nav li {
    flex: 1;
    min-width: 120px;
    position: relative; /* Clave para el submenú */
}

.main-nav a {
    display: block;
    padding: 15px;
    text-align: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.4s ease;
}

.main-nav a:hover, 
.main-nav a.active {
    background: #4a69bd; 
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* --- ESTILOS DEL SUBMENÚ (CORREGIDO) --- */
.main-nav ul .submenu {
    display: none;           /* Se oculta por defecto */
    flex-direction: column;  /* Fuerza la lista vertical */
    position: absolute;
    top: 100%;
    left: 0;
    background: #2a2a72;
    min-width: 200px;
    z-index: 1000;
    padding: 0;
    border-top: none;
    border-bottom: 3px solid #4a69bd;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.main-nav .submenu li {
    width: 100%;
    min-width: 100%;
}

.main-nav .submenu a {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 10; /* Evita bordes redondeados en la lista */
}

.main-nav .submenu a:hover {
    transform: none; /* Evita el salto visual en el submenú */
    background: #4a69bd;
}

/* Mostrar submenú al pasar el mouse */
.main-nav li:hover > .submenu {
    display: flex;
}

/* ==========================================================
   4. SECCIÓN DE SERVICIOS (INDEX)
   ========================================================== */
.services-section {
    padding: 20px 0px;
    text-align: center;
    width: 100%;
}

.services-section h2 {
    margin-bottom: 40px;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,1.5);
}

.services-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 80%;
    margin: 0 auto;
    padding: 20px 0;
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.4s ease;
}

.service-card {
    text-align: center;
    max-width: 280px;
}
.service-card p{
    text-shadow: 2px 2px 4px rgba(0,0,0,1.5);
}


/* El círculo de la imagen (Estilo compartido con clientes) */
.image-wrapper.circle {
    width: 300px;
    height: 300px;
    background: #ffffff;
    border: 6px solid #2a2a72;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 20px;
    transition: all 0.4s ease;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.image-wrapper.circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Efectos Hover Servicios */
.service-card-link:hover .image-wrapper.circle {
    transform: scale(1.1);
    border-color: #4a69bd;
    box-shadow: 0 12px 25px rgba(74, 105, 189, 0.5);
}

.service-card-link:hover .image-wrapper.circle img {
    transform: scale(1.1);
}

.service-card p {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.btn-more {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid #4a69bd;
    color: #4a69bd;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.service-card-link:hover .btn-more {
    background: #4a69bd;
    color: #fff;
}

/* ==========================================================
   5. SECCIÓN DE INFORMACIÓN (NOSOTROS / MISIÓN)
   ========================================================== */
.info-section {
    display: flex;
    padding: 30px 5%;
    gap: 50px;
    flex-wrap: wrap; 
    background: rgba(0, 0, 0, 0.2);
}

.column-about, .column-people {
    flex: 1;
    min-width: 320px;
}

.column-about h3, .column-people h3 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    border-left: 5px solid #4a69bd;
    padding-left: 15px;
}

.rect-large {
    width: 100%;
    height: auto;
    aspect-ratio: 16/10; 
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    object-position: center 100%;
    transition: all 0.8s ease-in-out; 
    max-height: 500px;
}

.rect-large:hover {
    aspect-ratio: 1 / 1;
    max-height: 1000px;
}

.sub-info {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.rect-small {
    width: 400px; 
    max-width: 40%;
    height: auto;
    aspect-ratio: 16 / 15;
    border-radius: 8px;
    object-fit: cover;
    object-position: center 80%;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.text-info {
    flex: 1;
    min-width: 0;
    text-align: justify;
}

.text-info h4 {
    color: #4a69bd;
    margin-bottom: 8px;
}

/* ==========================================================
   6. FOOTER (PIE DE PÁGINA)
   ========================================================== */
.main-footer {
    background-color: #333333;
    color: #ffffff;
    padding: 10px 20px;
    text-align: center;
    border-top: 3px solid #4a69bd;
    margin-top: 10px;
}

.footer-content p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* ==========================================================
   7. RESPONSIVIDAD
   ========================================================== */
@media (max-width: 1300px) and (min-width: 901px) {
    .sub-info {
        flex-direction: column;
        align-items: flex-start;
    }
    .rect-small {
        width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
}

@media (max-width: 900px) {
    .info-section {
        flex-direction: column;
    }
    .sub-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .rect-small {
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
    }
    .main-nav ul .submenu {
        position: static; /* Fluye dentro del menú móvil */
        width: 100%;
        box-shadow: none;
    }
    .rif {
        text-align: center;
    }
    .services-container {
        max-width: 90%; /* En móviles usamos un poco más de ancho */
        flex-direction: column; /* Se apilan solo si la pantalla es muy pequeña */
        align-items: center;
        gap: 60px; 
    }
}