/* ==========================================================================
   academia.css - Estilos exclusivos de la Academia ALIANTEC
   ========================================================================== */

@font-face {
    font-family: 'Prime';
    src: local('Prime Regular'), local('Prime-Regular'),
         url('font/Prime-Regular.otf') format('opentype'),
         url('font/Prime-Regular.woff2') format('woff2'),
         url('font/Prime-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Prime';
    src: local('Prime Light'), local('Prime-Light'),
         url('font/Prime-Light.woff2') format('woff2'),
         url('font/Prime-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Prime';
    src: local('Prime Bold'), local('Prime-Bold'),
         url('font/Prime-Bold.woff2') format('woff2'),
         url('font/Prime-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-main: 'Prime', 'Open Sans', Helvetica, Arial, sans-serif;
    --aliantec-red: #C8192E;
    --aliantec-orange: #F37023;
    --aliantec-purple: #7A1B80;
    --aliantec-blue: #00509E;
    --aliantec-dark: #222222;
    --aliantec-gray-med: #5A5A5A;
    --light-gray: #F4F5F7;
    --border-color: #E2E5E8;
    --white: #FFFFFF;
}

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

body {
    font-family: var(--font-main);
    font-weight: 300;
    color: var(--aliantec-dark);
    background-color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, strong, b, .fw-bold {
    font-family: var(--font-main);
    font-weight: 700;
}

a {
    color: var(--aliantec-red);
    text-decoration: none;
    transition: color .2s ease;
    font-family: var(--font-main);
}
a:hover { color: var(--aliantec-purple); text-decoration: underline; }

img { max-width: 100%; }

/* ------------------ TOP BAR ------------------ */
.top-bar {
    background-color: var(--light-gray);
    border-bottom: 1px solid var(--border-color);
    font-size: .85rem;
    padding: 8px 0;
}
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.meta-nav a { color: var(--aliantec-gray-med); margin-left: 20px; }

/* ------------------ HEADER ------------------ */
.main-header {
    background-color: var(--white);
    border-bottom: 4px solid var(--aliantec-red);
    padding: 12px 0;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.header-wrapper { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo-container { display: flex; align-items: center; gap: 15px; }
.logo-real-aliantec { height: 52px; width: auto; display: block; object-fit: contain; }
.header-divider { height: 38px; width: 1px; background-color: var(--border-color); margin: 0 5px; }
.academy-tag-header {
    font-size: .85rem; color: var(--aliantec-purple); font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px; line-height: 1.2;
}
.main-nav ul { display: flex; list-style: none; gap: 22px; flex-wrap: wrap; }
.main-nav a {
    color: var(--aliantec-dark); font-weight: 400; font-size: .95rem;
    padding-bottom: 5px; display: inline-block;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--aliantec-red); font-weight: 700;
    border-bottom: 3px solid var(--aliantec-red); text-decoration: none;
}
.main-nav a.nav-back { color: var(--aliantec-blue); font-weight: 700; }

/* ------------------ HERO ------------------ */
.hero {
    background-color: var(--light-gray);
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}
.hero::before {
    content: ''; position: absolute;
    top: 0; left: 0; width: 6px; height: 100%;
    background: linear-gradient(to bottom, var(--aliantec-red), var(--aliantec-purple), var(--aliantec-orange));
}
.hero-grid {
    display: grid; grid-template-columns: 1.2fr 1fr;
    gap: 40px; align-items: center;
}
.hero-tag {
    display: inline-block; background-color: var(--aliantec-purple);
    color: var(--white); font-size: .8rem; font-weight: 700;
    text-transform: uppercase; padding: 4px 12px;
    margin-bottom: 15px; border-radius: 2px;
}
.hero-title { font-size: 2.5rem; font-weight: 700; color: var(--aliantec-dark); line-height: 1.2; margin-bottom: 20px; }
.hero-text { font-size: 1.1rem; color: var(--aliantec-gray-med); margin-bottom: 30px; }

.btn-primary-fh {
    background-color: var(--aliantec-red); color: var(--white);
    padding: 12px 28px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 10px;
    border: none; cursor: pointer; transition: all .2s ease;
    box-shadow: 0 4px 10px rgba(200,25,46,.25);
    font-family: var(--font-main);
}
.btn-primary-fh:hover {
    background-color: #a01021; color: var(--white);
    text-decoration: none; transform: translateY(-2px);
}

/* ------------------ IMÁGENES / FALLBACK ------------------ */
.image-container {
    position: relative;
    background-color: #e2e7ec;
    border-left: 5px solid var(--aliantec-red);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,.1);
    aspect-ratio: 16 / 10;
    display: flex; align-items: center; justify-content: center;
}
.image-container img {
    position: relative;
    z-index: 1;
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
/* Fallback gráfico que se muestra SOLO si la imagen no carga */
.image-container .ph-graphic {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #1c2126 0%, #2a3138 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: #8a96a0; text-align: center; padding: 20px;
    font-size: .8rem;
}
.image-container .ph-graphic i { font-size: 2.5rem; margin-bottom: 10px; color: var(--aliantec-orange); }
.image-placeholder-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(34,34,34,.85));
    color: var(--white); padding: 15px; font-size: .85rem;
    z-index: 2;
}

/* ------------------ SECCIONES ------------------ */
.section-padding { padding: 70px 0; }
.bg-light-technical {
    background-color: var(--light-gray);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.section-header {
    margin-bottom: 40px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 15px;
    display: flex; justify-content: space-between;
    align-items: flex-end; gap: 20px; flex-wrap: wrap;
}
.section-header h2 {
    font-size: 1.8rem; color: var(--aliantec-dark);
    font-weight: 700; position: relative;
}
.section-header h2::after {
    content: ''; position: absolute;
    bottom: -17px; left: 0; width: 60px; height: 4px;
    background-color: var(--aliantec-red);
}

/* ------------------ TILES (malla de tarjetas) ------------------ */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.tile-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--aliantec-red);
    display: flex; flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.tile-card:nth-child(2) { border-top-color: var(--aliantec-blue); }
.tile-card:nth-child(3) { border-top-color: var(--aliantec-orange); }
.tile-card:nth-child(4) { border-top-color: var(--aliantec-purple); }
.tile-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.tile-image { height: 180px; background-color: #dce2e6; position: relative; }
.tile-category {
    position: absolute; top: 10px; left: 10px;
    background-color: var(--aliantec-dark); color: var(--white);
    font-size: .75rem; font-weight: 700;
    padding: 4px 10px; text-transform: uppercase;
}
.tile-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.tile-title { font-size: 1.2rem; font-weight: 700; color: var(--aliantec-dark); margin-bottom: 10px; line-height: 1.3; }
.tile-text { font-size: .9rem; color: var(--aliantec-gray-med); margin-bottom: 20px; flex-grow: 1; }
.tile-link { font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: 5px; color: var(--aliantec-red); }

/* ------------------ LAB FEATURE / LISTA CHECK ------------------ */
.lab-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.feature-list { list-style: none; margin-top: 20px; }
.feature-list li {
    position: relative; padding-left: 30px;
    margin-bottom: 15px; font-size: .95rem;
    color: var(--aliantec-dark);
}
.feature-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute; left: 0; top: 2px;
    color: var(--aliantec-red);
}

/* ------------------ BANNER IPC ------------------ */
.banner-ipc {
    background-color: var(--aliantec-dark);
    color: var(--white);
    padding: 50px 0;
    border-left: 8px solid var(--aliantec-orange);
}
.banner-flex {
    display: flex; justify-content: space-between;
    align-items: center; gap: 30px; flex-wrap: wrap;
}
.banner-content h3 { font-size: 1.6rem; margin-bottom: 10px; color: var(--white); }
.banner-content p { color: #b0b8c0; max-width: 750px; }

/* ------------------ PROGRAMAS EDUCATIVOS ------------------ */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; align-items: start;
}
.program-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--aliantec-orange);
    padding: 25px;
    transition: all .3s ease;
    display: flex; flex-direction: column;
}
.program-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.badge {
    font-weight: 700; padding: 5px 12px;
    font-size: .75rem; border-radius: 4px;
    display: inline-block;
}
.program-image-container {
    width: 100%; aspect-ratio: 16/9;
    overflow: hidden; border-radius: 4px;
    margin-bottom: 20px; background-color: #eee;
    border: 1px solid var(--border-color);
    position: relative;
}
.program-image-container img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .3s ease;
}
.program-card:hover .program-image-container img { transform: scale(1.05); }

.btn-toggle-pensum {
    width: 100%; background: transparent;
    padding: 10px 15px; font-weight: 700;
    font-size: .85rem; cursor: pointer;
    display: flex; justify-content: space-between;
    align-items: center; transition: all .2s ease;
    font-family: var(--font-main);
}
.btn-toggle-pensum .toggle-icon { transition: transform .3s ease; }
.pensum-content {
    max-height: 0; overflow: hidden; opacity: 0;
    transition: all .4s cubic-bezier(0,1,0,1);
}
.pensum-content h4 { font-size: .95rem; margin-bottom: 10px; font-weight: 700; }
.pensum-content ul { padding-left: 18px; margin-bottom: 15px; line-height: 1.6; }

/* ------------------ FOOTER ------------------ */
footer {
    background-color: #151719;
    color: #8a96a0;
    padding: 60px 0 20px 0;
    font-size: .85rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px; margin-bottom: 40px;
}
.footer-col h4 {
    color: var(--white); font-size: 1rem;
    margin-bottom: 20px; position: relative;
    padding-bottom: 8px;
}
.footer-col h4::after {
    content: ''; position: absolute;
    bottom: 0; left: 0; width: 30px; height: 3px;
    background-color: var(--aliantec-red);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #8a96a0; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid #282d32;
    padding-top: 20px;
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 10px;
}

/* ------------------ RESPONSIVE ------------------ */
@media (max-width: 992px) {
    .hero-grid, .lab-feature-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .main-header .header-wrapper { flex-direction: column; align-items: flex-start; }
    .main-nav ul { gap: 15px; }
    .hero-title { font-size: 1.8rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .academy-tag-header { font-size: .75rem; letter-spacing: 1px; }
}