/* ==========================================================================
   HOJA DE ESTILOS - PRESTIGIOCAR R.S.
   Descripción: Estilos globales, navegación con submenú y página de contacto.
   Versión: 1.2 (Corrección de desbordamiento móvil)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET Y CONFIGURACIÓN BASE
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Previene que el padding afecte el ancho total */
    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%;
    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');
    background-size: cover;
    background-position: center;
    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;
}

/* --------------------------------------------------------------------------
   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; 
}

.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);
}

/* Submenú Dropdown */
.main-nav ul .submenu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2a2a72;
    min-width: 200px;
    z-index: 1000;
    padding: 0;
    border-bottom: 3px solid #4a69bd;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.main-nav .submenu li {
    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);
}

.main-nav li:hover > .submenu {
    display: flex;
}

/* --------------------------------------------------------------------------
   4. PÁGINA DE CONTACTO (GRID Y BLOQUES)
   -------------------------------------------------------------------------- */
.contact-page-container {
    padding: 50px 10%;
    min-height: calc(100vh - 250px);
}

.contact-grid {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.17); 
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: blur(10px); /* Efecto cristal */
}

.contact-info-column {
    flex: 1;
    min-width: 300px;
}

.section-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 5px;
    border-left: 6px solid #2a2a72;
    padding-left: 15px;
    line-height: 1;
     text-shadow: 2px 2px 4px rgba(0,0,0,1.5)
}

.rif-text {
    font-size: 0.9rem;
    color: #bdc3c7;
    margin-bottom: 30px;
}

.info-block {
    margin-bottom: 25px;
}

.info-block strong {
    display: block;
    color: #ffffff;
    font-size: 1.45rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.info-block p {
    font-size: 1.35rem;
    color: #f0f0f0;
}

/* --------------------------------------------------------------------------
   5. GLOBOS DE REDES SOCIALES
   -------------------------------------------------------------------------- */
.social-media-container {
    display: flex;
    gap: 20px; /* Reducido para evitar desbordamiento */
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 30px;
    justify-content: center;
    border-top: 5px solid #2a2a72;
}

.social-globe {
    width: 65px; /* Tamaño optimizado */
    height: 65px;
    background: #2a2a72;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-globe img {
    width: 45px;
    height: 45px;
    filter: brightness(0) invert(1);
}

.social-globe:hover {
    background: #4a69bd;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(74, 105, 189, 0.4);
    border-color: #fff;
}

/* --------------------------------------------------------------------------
   6. UBICACIÓN Y MAPA
   -------------------------------------------------------------------------- */
.contact-map-column {
    flex: 1.2;
    min-width: 300px;
}

.map-wrapper {
    position: relative;
    width: 100%;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #4a69bd;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.map-image {
    width: 100%;
    max-width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    filter: grayscale(20%);
}

.map-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(42, 42, 114, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-overlay span {
    color: #fff;
    background: #2a2a72;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.8rem;
}

.map-link:hover .map-overlay {
    opacity: 1;
}

.schedule-info {
    margin-top: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5)
}

/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
.main-footer {
    background-color: #333333;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    border-top: 3px solid #4a69bd;
}

/* --------------------------------------------------------------------------
   8. MEDIA QUERIES (RESPONSIVE)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .contact-page-container {
        padding: 30px 5%; /* Menos margen lateral en móviles */
    }

    .contact-grid {
        flex-direction: column;
        padding: 20px 15px;
        gap: 30px;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .info-block p {
        font-size: 1.1rem;
    }

    .map-image {
        height: 280px; /* Mapa más bajo en móviles */
    }
}

/* Ajuste extremo para pantallas menores a 360px */
@media (max-width: 360px) {
    .social-media-container {
        gap: 10px;
    }
    .social-globe {
        width: 55px;
        height: 55px;
    }
    .social-globe img {
        width: 35px;
        height: 35px;
    }
}