/* ============================================
   LAYOUT PRINCIPAL DEL PORTAL
   ============================================
   
   Este archivo contiene el layout principal del portal:
   - Estructura general (body, header, main)
   - Footer base con namespace (#footer .clase)
   - Componentes globales (buscador)
   
   Estilos específicos de implementación van en templates.
   ============================================ */

/* ============================================
   ESTRUCTURA GENERAL
   ============================================ */

/* Body - Base general */
body {
	margin: 0 auto;
	background-color: var(--blanco);
}

/* Header - Estructura fija principal */
header {
	margin: 0 auto;
	position: fixed;
	z-index: 1000;
	width: 100%;
	top: 0;
}

/* Contenedor principal de contenido */
.main {
	margin-top: 18rem;
}

/* Responsive - Ajustes de márgenes para header fijo */
@media (max-width:575px) {
	.main {
		margin-top: 12rem;
	}
}

@media (max-width:1024px) {
	.main {
		margin-top: 12rem;
	}
}

/* Espaciador para header fijo */
.header-spacer {
    height: 0px;
}

/* IDs de secciones genéricas */
#contenidos,
#contacto,
#noticias {
    margin: 2rem 0;
}

/* ============================================
   FOOTER BASE (con namespace)
   ============================================ */

#footer {
    background: var(--grisclaro);
    padding: 2rem 0rem;
}

#footer .footer-accesos {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#footer .footer-accesos-movil {
    display: flex;
    align-items: center;
    justify-content: center;
}

#footer .info-footer {
    text-align: center;
}

#footer .redes-footer {
    display: flex;
    font-size: 2rem;
    padding: 2rem 0rem;
    align-items: center;
    justify-content: center;
}

#footer .redes-footer a {
    color: var(--negro);
    padding: 0rem 2rem;
}

#footer .redes-footer a:hover {
    color: var(--primario);
    padding: 0rem 2rem;
}

#footer .info-contacto {
    display: block;
}

@media (max-width: 375px) {
    #footer .info-contacto {
        font-size: 1.2rem;
    }
}

/* ============================================
   ESTILOS ADICIONALES DESDE estilos_globales.css
   ============================================ */

/* Ajuste para header fijo */
body {
    padding-top: 130px;
}

/* ============================================
   NAVBAR - NAVEGACIÓN PRINCIPAL
   ============================================ */

.navbar-nav .nav-link {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 500;
    margin: auto 10px auto 10px;
    color: #333;
    text-decoration: none;
    position: relative;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none !important;
    box-shadow: none !important;
}

.navbar-nav .nav-link:focus {
    outline: none !important;
    box-shadow: none !important;
}

.navbar-nav .nav-link:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link[aria-current="page"] {
    color: #007bff;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
    border: 1px solid rgba(0, 123, 255, 0.2);
    font-weight: 600;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar-nav .nav-link:hover::after {
    width: 70%;
}

.navbar-nav .nav-link.active::after,
.navbar-nav .nav-link[aria-current="page"]::after {
    width: 80%;
    background: linear-gradient(90deg, #007bff, #0056b3);
}

/* ============================================
   FOOTER ADICIONAL - ESTILOS MODERNOS
   ============================================ */

.footer-moderno {
    background-color: #222;
    color: #ccc;
    padding: 2rem 0;
}

.footer-moderno a {
    color: #fff;
    text-decoration: none;
}

.footer-moderno a:hover {
    text-decoration: underline;
}

.footer-nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.footer-nav-link:hover {
    color: #ffffff;
    text-decoration: none;
    border-bottom-color: #007bff;
    transform: translateY(-2px);
}

.footer-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateX(5px);
}

.footer-links .footer-link {
    font-size: 15px;
    font-weight: 500;
}

.footer-links .footer-link:hover {
    color: #007bff;
    text-decoration: none;
    transform: translateX(8px);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.social-link:hover {
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

.social-link.facebook:hover { background-color: #1877f2; }
.social-link.twitter:hover { background-color: #1da1f2; }
.social-link.instagram:hover { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.social-link.youtube:hover { background-color: #ff0000; }
.social-link.tiktok:hover { background-color: #000000; }

.footer-brand p {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.footer-brand h5 {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.footer-brand h6, 
footer h6 {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-item i {
    margin-top: 2px;
    font-size: 18px;
}

.contact-item p {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
}

.contact-item a {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.contact-item a:hover {
    color: #ffffff;
    text-decoration: none;
}

.border-top p {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
}

.border-top strong {
    color: #ffffff;
    font-weight: 600;
}

/* ============================================
   BUSCADORES - HEADER
   ============================================ */

.form-buscador-central {
    position: relative;
}

.form-buscador-central .fa-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.form-buscador-central .form-control {
    border: none;
    border-bottom: 2px solid #dee2e6;
    border-radius: 0;
    padding-left: 40px;
    background-color: transparent;
    transition: border-color 0.2s ease-in-out;
}

.form-buscador-central .form-control:focus {
    box-shadow: none;
    border-color: #0d6efd;
    background-color: transparent;
}

.buscador-header .form-control,
.buscador-header .btn {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
}

/* ============================================
   REDES SOCIALES - HEADER
   ============================================ */

.redes-sociales a {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.redes-sociales a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.redes-sociales a:hover::before {
    transform: scale(1);
}

.redes-sociales a:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.redes-sociales a:hover .fa-facebook-f {
    color: #1877f2 !important;
}

.redes-sociales a:hover .fa-twitter {
    color: #1da1f2 !important;
}

.redes-sociales a:hover .fa-instagram {
    color: #e4405f !important;
}

.redes-sociales a:hover .fa-youtube {
    color: #ff0000 !important;
}

.redes-sociales a:hover:nth-child(1) {
    background: rgba(24, 119, 242, 0.1);
}

.redes-sociales a:hover:nth-child(2) {
    background: rgba(29, 161, 242, 0.1);
}

.redes-sociales a:hover:nth-child(3) {
    background: rgba(228, 64, 95, 0.1);
}

.redes-sociales a:hover:nth-child(4) {
    background: rgba(255, 0, 0, 0.1);
}

.redes-sociales a i {
    transition: all 0.3s ease;
}

.redes-sociales a:hover i {
    transform: rotate(5deg);
}

/* Sticky navigation enhancement */
.main-navigation.sticky-top {
    z-index: 1020;
}

/* Animaciones suaves */
.main-navigation,
.main-header,
.utility-nav {
    transition: all 0.3s ease;
}

/* Responsive adicional */
@media (max-width: 768px) {
    .footer-brand img {
        max-width: 100px;
    }
    
    .social-links .d-flex {
        justify-content: center;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .footer-nav-link {
        font-size: 14px;
    }
    
    .footer-brand h5 {
        font-size: 20px;
    }
    
    .footer-brand p {
        font-size: 15px;
    }
    
    .footer-link {
        font-size: 14px;
    }
    
    footer h6 {
        font-size: 16px;
    }
    
    .contact-item p,
    .contact-item a {
        font-size: 14px;
    }
    
    .footer-nav ul {
        justify-content: center;
        gap: 1rem;
    }
}

