/* --- Variables y reset --- */
:root {
    --primary: #0b2f4f;
    --secondary: #27c6d6;
    --accent: #f5320b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light);
    color: var(--gray);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



/* --- Header --- */
header {
    background: var(--primary);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo y nombre completo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 6px;
}

.company-name {
    color: white;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Menú móvil */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 21px;
    justify-content: space-between;
}
.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 2px;
}

/* Navegación */
nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}
nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
nav a:hover { color: var(--accent); }
.btn-cta {
    background: var(--accent);
    color: white !important;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.3s;
}
.btn-cta:hover { background: #d32f2f; }

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Asegúrate de que esta imagen exista en tu carpeta img */
    background: url('img/hero-image.jpg') no-repeat center center / cover;
    overflow: hidden;
    color: white;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}
.text-content {
    background: rgba(11, 47, 79, 0.85);
    padding: 40px 60px;
    border-radius: 20px;
    max-width: 800px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.text-content h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}
.text-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #e2e8f0;
}
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    min-width: 180px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 10px rgba(39, 198, 214, 0.3);
}
.btn-primary:hover {
    background: #0ea5e9;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(39, 198, 214, 0.4);
}
.btn-secondary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}
.btn-secondary:hover {
    background: #d32f2f;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
}

/* --- Secciones generales --- */
section {
    padding: 80px 0;
}
h2 {
    text-align: center;
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 50px;
    font-weight: 700;
    position: relative;
}
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Servicios --- */
.services-section {
    background: white;
}
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.card {
    background: white;
    padding: 35px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}
.card h3 {
    color: var(--primary);
    margin: 15px 0 10px;
    font-size: 20px;
}

/* --- Cursos --- */
.courses-section {
    background: var(--light);
}
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}
.course-card:hover { transform: translateY(-5px); }
.course-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.course-info {
    padding: 20px;
}
.course-info h3 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 18px;
}
.pdf-section {
    background: white;
    text-align: center;
}
/* --- Nosotros --- */
.about-section {
    background: white;
}
.about-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.mission-vision {
    flex: 1;
    min-width: 300px;
}
.mission-vision .card {
    background: var(--light);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary);
    text-align: left; /* Alineación corregida */
}
.why-us {
    flex: 1.5;
    background: var(--light);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}
.why-us ul {
    list-style: none;
    padding-left: 0;
}
.why-us li {
    position: relative;
    margin-bottom: 12px;
    font-weight: 500;
}
.motivational-full-img {
    width: 100%;
    max-width: 1000px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: block;
    margin: auto;
}

.motivational-section {
    background: linear-gradient(135deg, #0b2f4f, #1e3a5f);
    padding: 80px 20px;
}
.motivational-full-img {
    transition: transform 0.4s ease;
}

.motivational-full-img:hover {
    transform: scale(1.03);
}
/* --- Clientes --- */
.clients-section {
    background: var(--light);
    text-align: center;
}
.client-logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}
.client-logo {
    max-width: 140px;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.client-logo:hover { opacity: 1; }

/* --- Eventos --- */
.events-section {
    background: white;
}
.event-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.event-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}
.event-image:hover {
    transform: scale(1.05);
}

/* --- NUEVO: Sección de Contacto --- */
.contact-section {
    background: var(--light);
}
.contact-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.contact-form {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    min-width: 300px;
}
.input-group {
    margin-bottom: 20px;
}
.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}
.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(39, 198, 214, 0.1);
}
.contact-map {
    flex: 1;
    min-width: 300px;
    background: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    min-height: 300px;
}
.map-placeholder {
    text-align: center;
    padding: 20px;
}
.map-placeholder i {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--secondary);
}
.map-placeholder h3 {
    color: white;
    margin-bottom: 10px;
}
.map-placeholder p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #e2e8f0;
}

/* --- Footer --- */
footer {
    background: var(--primary);
    color: white;
    padding: 60px 0 30px;
}
.footer-content {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.footer-column {
    flex: 1;
    min-width: 250px;
}
.footer-column h3 {
    color: white;
    margin: 20px 0 20px;
    font-size: 20px;
}
.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 10px;
}
.footer-column a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-column a:hover { color: var(--accent); }
.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 14px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    nav { display: none; }
    nav.open { display: block; margin-top: 20px; }
    nav ul { flex-direction: column; align-items: center; gap: 15px; }
    .hero-content h1 { font-size: 32px; }
    .text-content { padding: 30px; }
    .hero-buttons { flex-direction: column; }
    .about-content { flex-direction: column; }
    .contact-wrapper { flex-direction: column; } /* Ajuste móvil para contacto */
    .footer-content { flex-direction: column; text-align: center; }
}
/* --- CORRECCIÓN RÁPIDA PARA TÍTULO Y HEADER FIJO --- */

/* 1. Asegura que el header sea siempre fijo */
header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
}

/* 2. Evita que el título se corte y permite que use 2 líneas */
.company-name {
    white-space: normal !important; /* Permite que el texto baje si no cabe */
    font-size: clamp(13px, 3.5vw, 17px) !important; /* Ajusta el tamaño automáticamente */
    line-height: 1.2 !important;
    display: inline-block !important;
    max-width: 100% !important;
}

/* 3. Ajuste para que el título no tape el botón de menú en móviles */
@media (max-width: 768px) {
    .logo-container {
        max-width: 75% !important; /* Deja espacio al botón de 3 rayitas */
    }
    
    .menu-toggle {
        display: flex !important; /* Asegura que el botón siempre sea visible */
    }
}
/* --- AJUSTE DE TAMAÑO DEL MAPA --- */

/* Contenedor del mapa */
.contact-map {
    min-height: 300px !important; /* Altura mínima controlada */
    height: 350px !important;    /* Altura fija para que no crezca infinito */
    overflow: hidden !important;
    border-radius: 15px !important;
}

/* Fuerza al iframe (el mapa real) a llenar el contenedor sin pasarse */
.contact-map iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* Ajuste específico para celulares */
@media (max-width: 768px) {
    .contact-map {
        height: 250px !important; /* Más pequeño en móvil para que sea cómodo */
        margin-top: 20px !important;
    }
}