/* ========================================
   IMPORTS Y VARIABLES
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');

:root {
    --primary: #004d99;
    --secondary: #ffcc00;
    --text-dark: #333;
    --text-light: #555;
    --bg-light: #f4f7f9;
}

/* ========================================
   RESET Y ESTILOS BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 90px; /* Espacio para el header fijo */
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
}

h2 {
    color: var(--primary);
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: clamp(1.5rem, 4vw, 2rem);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* ========================================
   HEADER Y NAVEGACIÓN (SOLO MENÚ)
======================================== */
header {
    background-color: var(--primary);
    color: white;
    padding: 0;
    border-bottom: 5px solid var(--secondary);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    z-index: 1001;
}

.logo img {
    display: block;
}

/* ========== Botón Hamburguesa ========== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: #ffffff;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Animación del botón hamburguesa cuando está activo */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========== Menú de Navegación ========== */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #ffffff;
    font-family: "Lexend", sans-serif;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
    display: block;
}

.nav-menu a:hover {
    color: var(--secondary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ========================================
   SECCIÓN HERO (IMAGEN + TEXTO)
======================================== */
.hero-section {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    background-color: white;
}

.hero-content {
    flex: 1;
    padding-right: 20px;
}

.hero-content h1 {
    color: var(--primary);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    color: var(--text-light);
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-style: italic;
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    max-width: 500px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ========================================
   INFORMACIÓN GENERAL
======================================== */
.info-general {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.info-general h2 {
    color: var(--primary);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 20px;
}

.info-general p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-light);
    line-height: 1.8;
    max-width: 1000px;
    margin: 0 auto;
}

/* ========================================
   TÍTULO DE SEDES
======================================== */
.titulo-sedes {
    color: var(--primary);
    text-align: center;
    margin: 40px 0 30px;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
}

/* ========================================
   SECCIÓN DE SEDES (TARJETAS)
======================================== */
.sedes-contacto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background-color: white;
    border: 1px solid #ddd;
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card h3 {
    color: var(--secondary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
}

.card p {
    margin: 10px 0;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card i {
    color: var(--primary);
    min-width: 20px;
}

.card a {
    color: var(--primary);
    text-decoration: none;
    word-break: break-word;
}

.card a:hover {
    text-decoration: underline;
}

/* ========================================
   REDES SOCIALES
======================================== */
.redes-sociales {
    text-align: center;
    margin-top: 40px;
    padding: 30px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.redes-sociales h2 {
    color: var(--primary);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 25px;
}

.redes-sociales .social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.5em;
    text-decoration: none;
    transition: transform 0.3s, opacity 0.3s;
}

.social-icon:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.facebook { background-color: #3b5998; }
.instagram { background-color: #e4405f; }
.twitter { background-color: #00acee; }
.linkedin { background-color: #0077b5; }

/* ========================================
   FOOTER
======================================== */
.footer {
    background-color: #1a1a2e;
    color: #e4e4e4;
    padding: 40px 20px 20px;
    font-family: Arial, sans-serif;
    margin-top: 40px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 20px;
}

.footer-section {
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #1a6bb3;
    margin-bottom: 15px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 5px;
}

.footer-section p {
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    line-height: 1.5;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #e4e4e4;
    text-decoration: none;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #1a6bb3;
    text-decoration: underline;
}

.footer-section.contact i {
    margin-right: 8px;
    color: #1a6bb3;
}

.footer .social-links a {
    display: inline-block;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-right: 15px;
    color: #e4e4e4;
    transition: color 0.3s ease;
}

.footer .social-links a:hover {
    color: #1a6bb3;
}

.footer-bottom {
    border-top: 1px solid #333;
    text-align: center;
    padding-top: 15px;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
}

/* ========================================
   MEDIA QUERIES
======================================== */

/* ========== Tablets y Móviles (hasta 768px) ========== */
@media only screen and (max-width: 768px) {
    .main-nav {
        padding: 15px 20px;
    }

    /* Mostrar botón hamburguesa */
    .hamburger {
        display: flex;
    }

    /* Menú móvil */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--primary);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.2);
        padding: 80px 0 20px;
        gap: 0;
        z-index: 1000;
        height: 100vh;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 20px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        font-size: 18px;
        padding: 20px 0;
    }

    .nav-menu a::after {
        display: none;
    }

    /* Hero Section en móvil */
    .hero-section {
        flex-direction: column-reverse;
        padding: 30px 20px;
        gap: 30px;
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
    }

    .hero-image {
        max-width: 100%;
    }

    /* Ajustes de tarjetas */
    .sedes-contacto {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card {
        padding: 15px;
    }

    /* Ajustes del main */
    main {
        padding: 15px;
    }

    .info-general {
        padding: 20px;
    }

    /* Footer responsive */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h3 {
        border-bottom: none;
        padding-bottom: 10px;
    }
}

/* ========== Móviles pequeños (hasta 480px) ========== */
@media only screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .info-general {
        padding: 15px;
    }

    .card {
        padding: 15px;
    }

    .card p {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
}

/* ========== Tablets (768px - 1024px) ========== */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .hero-section {
        padding: 50px 30px;
    }

    .sedes-contacto {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== Desktop grande (1024px+) ========== */
@media only screen and (min-width: 1024px) {
    .main-nav {
        padding: 20px 40px;
    }

    .sedes-contacto {
        grid-template-columns: repeat(3, 1fr);
    }
}