/* --- VARIABLES Y CONFIGURACIÓN BASE --- */
:root {
    --primary-blue: #0f172a; 
    --accent-blue: #2563eb;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --success: #22c55e;
    --overlay: rgba(15, 23, 42, 0.85);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--primary-blue);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- SECCIONES Y PARALLAX --- */
section { padding: 120px 0; }

.parallax-section {
    background-image: url('imgs/H.D-Seguridad-e-Higiene-Ambiental-fondo.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--overlay);
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
}

/* --- TIPOGRAFÍA Y TÍTULOS --- */
h2 {
    font-size: 2.4rem;
    margin-bottom: 4rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-blue);
    margin: 15px auto 0;
}

/* --- COMPONENTES: BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    gap: 10px;
}

.btn-primary { background-color: var(--accent-blue); color: white; }
.btn-primary:hover { background-color: #1d4ed8; transform: translateY(-2px); }
.btn-wa { background-color: var(--success); color: white; }
.btn-wa:hover { background-color: #16a34a; transform: translateY(-2px); }

#btn-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#btn-to-top:hover { transform: translateY(-5px); background-color: #1d4ed8; }

/* --- NAVEGACIÓN (HEADER) --- */
header {
    background: rgba(15, 23, 42, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-nav {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}
.logo-nav:hover { color: var(--accent-blue); }

/* --- HERO SECTION --- */
.hero { padding: 200px 0 140px; text-align: center; }
.hero-logo { max-width: 450px; height: auto; margin-bottom: 2rem; filter: drop-shadow(0 0 15px rgba(0,0,0,0.6)); }
.hero h1 { font-size: 3.2rem; margin-bottom: 1.2rem; line-height: 1.1; text-shadow: 2px 2px 10px rgba(0,0,0,0.7); }
.hero p { font-size: 1.3rem; color: var(--text-muted); max-width: 750px; margin: 0 auto 2.5rem; }

/* --- GRID SYSTEMS --- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

/* --- TARJETAS (CARDS) --- */
.service-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 16px;
    transition: all 0.4s ease;
    height: 100%;
}
.service-card:hover { transform: translateY(-10px); background: rgba(255, 255, 255, 0.08); border-color: var(--accent-blue); }
.service-card i { font-size: 2.5rem; color: var(--accent-blue); margin-bottom: 1.5rem; }

/* --- TRAYECTORIA Y MATRÍCULAS --- */
.profile-container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
.profile-image-wrapper { position: relative; display: flex; justify-content: center; }
.profile-image { width: 320px; height: 320px; object-fit: cover; border-radius: 50%; border: 8px solid rgba(37, 99, 235, 0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.4); z-index: 2; }
.profile-decoration { position: absolute; width: 340px; height: 340px; border-radius: 50%; border: 2px dashed var(--accent-blue); top: -10px; animation: rotate 20s linear infinite; }

@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.matriculas { background: rgba(37, 99, 235, 0.12); padding: 2.5rem; border-radius: 12px; border-left: 5px solid var(--accent-blue); margin-top: 2rem; }
.matriculas h3 { margin-bottom: 1rem; color: var(--white); border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; }
.matriculas ul { list-style: none; margin-top: 1rem; }
.matriculas li { margin-bottom: 0.6rem; display: flex; align-items: flex-start; gap: 12px; font-size: 0.95rem; }
.matriculas li i { color: var(--accent-blue); margin-top: 4px; }

/* --- METODOLOGÍA Y DOCUMENTACIÓN --- */
.tech-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    transition: 0.3s;
}
.tech-card:hover { background: rgba(255, 255, 255, 0.06); }
.tech-title { color: var(--accent-blue); font-weight: 700; margin-bottom: 1rem; display: block; }

.doc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; list-style: none; }
.doc-list li { background: rgba(255, 255, 255, 0.05); padding: 1rem; border-radius: 8px; display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.doc-list li i { color: var(--accent-blue); }

/* --- SECCIÓN ISO ESPECÍFICA --- */
.iso-section-title {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-blue);
    display: inline-block;
    text-transform: uppercase;
}
.iso-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 5rem;
}
.iso-subcard {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    height: 100%;
    transition: transform 0.3s;
}
.iso-subcard:hover {
    background: rgba(255, 255, 255, 0.07);
}
.iso-subcard h4 {
    color: var(--accent-blue);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 700;
    border-left: 3px solid var(--accent-blue);
    padding-left: 10px;
}
.iso-subcard p, .iso-subcard ul {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.iso-subcard ul {
    padding-left: 1.2rem;
    list-style-type: disc;
}
.iso-subcard li {
    margin-bottom: 8px;
}

/* --- MODAL DE MAPAS --- */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--primary-blue);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid var(--accent-blue);
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    position: relative;
}

.close-modal {
    color: var(--white);
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px; font-weight: bold;
    cursor: pointer;
}

.map-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0; overflow: hidden;
    border-radius: 8px; margin-top: 15px;
}

.map-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- PIE DE PÁGINA --- */
footer { padding: 60px 0; background: #020617; text-align: center; }
.footer-logo { max-width: 70px; margin-bottom: 2rem; border-radius: 10px; }
.footer-credits { font-size: 0.95rem; color: var(--text-muted); margin-top: 1.5rem; }
.footer-credits a { color: var(--white); text-decoration: none; font-weight: 600; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .profile-container { grid-template-columns: 1fr; text-align: center; }
    .hero h1 { font-size: 2.5rem; }
    .matriculas { text-align: left; }
    .profile-image-wrapper { margin-bottom: 3rem; order: -1; }
}

@media (max-width: 768px) {
    .parallax-section { background-attachment: scroll; }
    .hero { padding: 150px 0 100px; }
    .profile-image { width: 250px; height: 250px; }
    .profile-decoration { width: 270px; height: 270px; }
    #btn-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; }
}