@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: #eeeeee;
    color: #333;
}

/* ── NAVBAR ── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 50px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
    gap: 10px;
}

nav .logo {
    font-size: 20px;
    font-weight: 700;
    color: #5d6fbf;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

nav .logo img {
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3796b6;
}

nav details > summary {
    cursor: pointer;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    list-style: none;
    background: none;
    border: none;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

nav details > summary::-webkit-details-marker {
    display: none;
}

nav details > summary:hover {
    color: #3796b6;
}

nav details ul {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    min-width: 210px;
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.13);
    z-index: 200;
    list-style: none;
}

nav details ul li a {
    display: block;
    padding: 9px 18px;
    color: #444;
    white-space: nowrap;
    font-size: 14px;
}

nav details ul li a:hover {
    background: #f0f7ff;
    color: #3796b6;
}

/* ── HERO ── */
.hero {
    background: linear-gradient(160deg, rgba(15, 45, 100, 0.78), rgba(40, 110, 175, 0.68)),
        url("https://www.tecnica3hurlingham.com/wp-content/uploads/2026/02/Gemini_Generated_Image_mitnnmitnnmitnnm.png");
    background-size: cover;
    background-position: center;
    padding: 140px 20px;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 46px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero p {
    font-size: 20px;
    margin-top: 14px;
    opacity: 0.93;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.hero button {
    margin-top: 30px;
    background: white;
    color: #4d4f9f;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 17px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Poppins', sans-serif;
}

.hero button:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

/* ── SECCIONES ── */
section {
    width: 90%;
    max-width: 1100px;
    background: white;
    margin: 60px auto;
    padding: 50px 60px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

h2 {
    text-align: center;
    font-size: 34px;
    color: #5492b3;
    margin-top: 0;
}

.subtitulo {
    text-align: center;
    color: #666;
    margin-top: -10px;
    margin-bottom: 20px;
}

/* ── SERVICES GRID ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: rgba(73, 132, 177, 0.6);
    border-radius: 18px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.service-card h3 {
    color: white;
    font-size: 21px;
    margin-bottom: 10px;
}

.service-card p {
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

/* ── TABLA ÁREAS ── */
.tabla-areas {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tabla-areas td {
    padding: 11px 14px;
    border-bottom: 1px solid #eee;
}

.tabla-areas td:first-child {
    width: 36px;
    font-weight: 700;
    color: #5492b3;
}

.tabla-areas tr:hover td {
    background: #f5faff;
}

/* ── HISTORIA ── */
.historia {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.historia img {
    width: 100%;
    border-radius: 16px;
    height: 160px;
    object-fit: cover;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* ── TABLA CURRICULAR ── */
.tabla-curricular-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.tabla-curricular {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;
}

.tabla-curricular thead tr:first-child {
    background: #5492b3;
    color: white;
}

.tabla-curricular thead tr:last-child {
    background: #3d7a9e;
    color: white;
}

.tabla-curricular thead th {
    padding: 12px 10px;
}

.tabla-curricular tbody td {
    padding: 9px 10px;
    border-bottom: 1px solid #eee;
}

.tabla-curricular tbody tr:hover td {
    background: #f5faff;
}

.tabla-curricular .seccion-row td {
    background: #e8f2f9;
    font-weight: 700;
    text-align: left;
    padding: 10px 14px;
    color: #2e5f85;
}

.tabla-curricular tfoot td {
    font-weight: 700;
    background: #f0f4f8;
    padding: 10px;
}

/* ── TABLA MESAS DE EXAMEN ── */
.tabla-mesas {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    font-size: 15px;
}

.tabla-mesas thead tr {
    background: #5492b3;
    color: white;
}

.tabla-mesas thead th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tabla-mesas tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.tabla-mesas tbody tr:hover {
    background: rgba(84, 146, 179, 0.08);
}

.tabla-mesas tbody td {
    padding: 14px 20px;
    color: #333;
}

.tabla-mesas tbody tr:nth-child(even) {
    background: #f4f8fb;
}

.tabla-mesas tbody tr:nth-child(even):hover {
    background: rgba(84, 146, 179, 0.1);
}

.badge-año {
    display: inline-block;
    background: rgba(73, 132, 177, 0.18);
    color: #2e6a99;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 600;
}

.badge-hora {
    display: inline-block;
    background: rgba(87, 180, 149, 0.18);
    color: #2a7a60;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 600;
}

/* ── CARRUSEL ── */
.carrusel {
    max-width: 100%;
    overflow: hidden;
    margin-top: 30px;
}

.carrusel-inner {
    display: flex;
    animation: slide 20s infinite linear;
}

.carrusel-inner:hover {
    animation-play-state: paused;
}

.carrusel-item {
    min-width: 25%;
    text-align: center;
    padding: 16px;
}

.carrusel-item img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.carrusel-item h3 {
    color: #5492b3;
    margin: 12px 0 4px;
    font-size: 17px;
}

.carrusel-item p {
    color: #777;
    font-size: 13px;
    margin: 0;
}

@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── CONTACTO ── */
.contact-box {
    background: #f7fbff;
    padding: 30px;
    border-radius: 18px;
    border-left: 6px solid #5492b3;
}

.contact-box p {
    margin: 8px 0;
    font-size: 16px;
}

.contact-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.contact-links a {
    background: #5492b3;
    color: white;
    padding: 9px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.contact-links a:hover {
    background: #3d7a9e;
}

/* ── DESCARGAS ── */
.año-titulo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 40px 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #5492b3;
}

.año-titulo::before {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, #c5dff0);
}

.año-titulo::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #c5dff0, transparent);
}

.descargas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.card-descarga {
    background: white;
    border-radius: 18px;
    border: 2px solid #e0eef7;
    padding: 28px 24px;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.card-descarga:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(80, 175, 204, 0.2);
    border-color: #50afcc;
}

.card-icono {
    width: 60px;
    height: 60px;
    background: rgba(73, 132, 177, 0.12);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.card-nombre {
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    color: #2e5f85;
}

.card-badge {
    background: rgba(73, 132, 177, 0.15);
    color: #2e6a99;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
}

.btn-dl {
    background: #50afcc;
    color: white;
    border-radius: 30px;
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 600;
}

/* ── PRÁCTICAS ── */
.practicas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 36px;
}

.practica-card {
    background: white;
    border-radius: 18px;
    border: 2px solid #e0eef7;
    padding: 30px 24px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.practica-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(80, 175, 204, 0.2);
    border-color: #5492b3;
}

.practica-card .icono {
    font-size: 40px;
    margin-bottom: 14px;
}

.practica-card h3 {
    color: #5492b3;
    margin: 0 0 10px;
    font-size: 18px;
}

.practica-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.practica-card .anio {
    display: inline-block;
    background: rgba(73, 132, 177, 0.15);
    color: #2e6a99;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 12px;
}

/* ── BOTÓN FLOTANTE ── */
details.flotante {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
}

details.flotante > summary {
    background: #50afcc;
    color: white;
    padding: 14px 22px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: background 0.3s;
}

details.flotante > summary::-webkit-details-marker {
    display: none;
}

details.flotante > summary:hover {
    background: #3d98b3;
}

.flotante-menu {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.flotante-menu a {
    background: #50afcc;
    color: white;
    padding: 11px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    transition: background 0.3s;
}

.flotante-menu a:hover {
    background: #3d98b3;
}

/* ── FOOTER ── */
footer {
    background: rgba(44, 90, 140, 0.92);
    color: white;
    text-align: center;
    padding: 50px 20px;
    margin-top: 80px;
    font-size: 16px;
}

footer p {
    margin: 5px 0;
}

.footer-titulo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.footer-sub {
    opacity: 0.9;
}

.footer-dir {
    opacity: 0.85;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.footer-social a {
    color: white;
    text-decoration: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: transform 0.3s, box-shadow 0.3s;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.footer-social a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.si-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important; }
.si-youtube   { background: #FF0000 !important; }
.si-email     { background: #c0392b !important; }
.si-maps      { background: #34A853 !important; }

.footer-copy {
    margin-top: 22px;
    font-size: 13px;
    opacity: 0.65;
}

/* ── FORMULARIO EN FOOTER ── */
footer details {
    width: fit-content;
    margin: 20px auto 0;
}

.btn-preguntas {
    background: rgba(255, 255, 255, 0.18);
    color: white;
    padding: 11px 26px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    border: 2px solid rgba(255, 255, 255, 0.35);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: background 0.3s;
    margin-top: 20px;
}

.btn-preguntas::-webkit-details-marker {
    display: none;
}

.btn-preguntas:hover {
    background: rgba(255, 255, 255, 0.28);
}

.form-preguntas {
    background: white;
    border-radius: 14px;
    padding: 24px;
    margin-top: 12px;
    min-width: 300px;
    text-align: left;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.form-preguntas label {
    font-weight: 600;
    color: #444;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.form-preguntas input,
.form-preguntas textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
}

.form-preguntas textarea {
    height: 80px;
    resize: vertical;
}

.form-preguntas button {
    background: #5492b3;
    color: white;
    border: none;
    padding: 10px 26px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: background 0.3s;
    font-size: 14px;
}

.form-preguntas button:hover {
    background: #3d7a9e;
}

/* ── MAPA ── */
.mapa {
    width: 100%;
    height: 380px;
    border: 0;
    border-radius: 16px;
    margin-top: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* ── VIDEO EMBED ── */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    margin-top: 30px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 16px;
}

/* ── HAMBURGUESA ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #5d6fbf;
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}

nav.nav-open .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

nav.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
}

nav.nav-open .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    nav ul {
        gap: 10px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 12px 16px;
        flex-wrap: nowrap;
        align-items: center;
    }

    nav .logo {
        font-size: 15px;
        flex: 1;
    }

    .hamburger {
        display: flex;
    }

    nav ul {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        font-size: 14px;
        padding: 10px 0 4px;
        order: 3;
    }

    nav.nav-open ul {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    nav details > summary {
        padding: 8px 4px;
        width: 100%;
        display: block;
    }

    nav details ul {
        position: static;
        box-shadow: none;
        border-left: 3px solid #e0eef7;
        border-radius: 0;
        padding: 4px 0 4px 14px;
        margin-top: 4px;
        background: #f8fbff;
    }

    nav ul li a {
        display: block;
        padding: 8px 4px;
    }

    .hero {
        padding: 70px 20px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    section {
        width: 95%;
        padding: 28px 18px;
        margin: 24px auto;
        border-radius: 16px;
    }

    h2 {
        font-size: 24px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .practicas-grid {
        grid-template-columns: 1fr;
    }

    .descargas-grid {
        grid-template-columns: 1fr;
    }

    .historia {
        grid-template-columns: 1fr;
    }

    .carrusel-item {
        min-width: 50%;
    }

    .carrusel-item img {
        width: 130px;
        height: 130px;
    }

    .contact-links {
        flex-direction: column;
    }

    .mapa {
        height: 280px;
    }

    footer {
        padding: 36px 16px;
    }

    footer details {
        width: 90%;
    }

    .form-preguntas {
        min-width: unset;
        width: 100%;
    }

    .footer-social {
        gap: 10px;
    }

    .tabla-curricular {
        font-size: 12px;
    }

    .tabla-mesas {
        font-size: 13px;
    }

    .tabla-mesas thead th,
    .tabla-mesas tbody td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    nav .logo img {
        height: 32px;
    }

    nav .logo {
        font-size: 13px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .carrusel-item {
        min-width: 100%;
    }

    .footer-social a {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}
