/* ===== RESET ===== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* ===== VARIABLES ===== */

:root{

    --azul:#79b6f0;
    --verde:#70a868;
    --amarillo:#ffdb65;
    --naranja:#ffc9a7;

    --texto:#333333;
    --fondo:#fffbf7;
    --blanco:#ffffff;
}

/* ===== GENERAL ===== */

html{
    scroll-behavior:smooth;
}

body{

    font-family: Georgia, "Times New Roman", serif;

    background-color:var(--fondo);

    color:var(--texto);

    line-height:1.7;
}

img{
    max-width:100%;
    display:block;
}

/* ===== HERO: pantalla completa ===== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    transition: opacity .5s ease;
}

.hero-contenido {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
}

.hero.desvanecido {
    opacity: 0;
    pointer-events: none;
}

/* ===== FLECHA DE SCROLL ===== */

.flecha-scroll {
    display: block;
    width: 77px;
    height: 77px;
    margin-bottom: 30px;
    align-self: flex-end;
    margin-right: 20px;
    opacity: 0.7;
    transition: opacity .3s, transform .3s;
    animation: flotarFlecha 2s ease-in-out infinite;
}

.flecha-scroll:hover {
    opacity: 1;
    transform: translateY(4px);
    animation: none;
}

.flecha-scroll svg {
    width: 100%;
    height: 100%;
}

@keyframes flotarFlecha {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

/* ===== HEADER ===== */

.header{

    position:fixed;

    top:0;
    left:0;
    width:100%;

    background:#fffbf0;

    z-index:1000;

    padding:15px 5%;

    display:flex;
    justify-content:space-between;
    align-items:center;

    box-shadow:0 2px 12px rgba(0,0,0,.08);

    transition:transform .4s ease;
}

.oculto{
    transform:translateY(-100%);
}

.visible{
    transform:translateY(0);
}

.logo-container{
    display:flex;
    align-items:center;
    gap:15px;
}

.logo{
    width:90px;
}

.logo-container h1 {
    color: #333333;
    margin-bottom: 4px;
    line-height: 1;
}

.menu{
    display:flex;
    gap:25px;
    list-style:none;
}

.menu a{
    text-decoration:none;
    color:var(--texto);
    font-weight:bold;
}

.menu a:hover{
    color:var(--naranja);
}

/* ===== HERO (propiedades de contenido) ===== */

.hero-logo{
    width:350px;
}

.hero-texto{
    max-width:700px;
}

.hero-texto h2{
    font-size:2rem;
    line-height:1.3;
    margin-bottom:20px;
    color:#333;
}

.hero-texto p{
    margin-bottom:25px;
    font-size:1.15rem;
}

/* ===== BOTONES ===== */

.btn-principal,
.btn-contacto{
    display:inline-block;
    text-decoration:none;
    padding:14px 24px;
    border-radius:12px;
    background:var(--naranja);
    color:black;
    font-weight:bold;
    transition:.3s;
}

.btn-principal:hover,
.btn-contacto:hover{
    transform:translateY(-3px);
    opacity:.9;
}

/* ===== SECCIONES ===== */

.seccion {
    scroll-margin-top: 90px;
}

#servicios {
    scroll-margin-top: 120px;
}

#ubicacion {
    scroll-margin-top: 120px;
}

#institucion {
    text-align: center;
    padding-top: 220px;
}

.seccion{
    width:min(1200px,90%);
    margin:auto;
    padding:80px 0;
}

.seccion h2{
    text-align:center;
    color:var(--azul);
    margin-bottom:40px;
    font-size:2.2rem;
}

.seccion p{
    margin-bottom:15px;
}

/* ===== TARJETAS ===== */

#servicios{
    width:95%;
    max-width:1700px;
    margin:auto;
    padding:80px 0;
}

.grid-servicios{
    display:grid;
    grid-template-columns:repeat(5, minmax(280px, 1fr));
    gap:35px;
    max-width:1700px;
    margin:auto;
}

.card{
    background:#fffbf0;
    border-radius:20px;
    overflow:visible;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    transition:.3s;
}

.card:hover{
    transform:translateY(-6px);
}

.card img{
    width:100%;
    height:260px;
    object-fit:cover;
    border-radius:20px 20px 0 0;
}

.card h3{
    padding:24px 24px 12px;
}

.card p{
    padding:0 24px 24px;
}

/* ===== TALLERES ===== */

.card.taller-principal {
    position: relative;
}

.talleres-wrapper {
    position: relative;
    width: 100%;
    margin-top: 60px;
    padding-top: 60px;
}

.ramificacion {
    display: none;
}

.lineas-talleres {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    overflow: visible;
    pointer-events: none;
}

.grid-talleres {
    display: grid;
    grid-template-columns: repeat(5, minmax(280px, 1fr));
    gap: 35px;
    max-width: 1700px;
    margin: auto;
}

.card-taller {
    position: relative;
}

@keyframes brilloLinea {
    0%   { opacity: 1; }
    50%  { opacity: .25; }
    100% { opacity: 1; }
}

/* ===== UBICACIÓN ===== */

.ubicacion-container{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
    margin-bottom:20px;
}

.foto-frente img{
    border-radius:20px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.mapa iframe{
    width:100%;
    height:100%;
    min-height:400px;
    border:none;
    border-radius:20px;
}

.direccion{
    margin-top:15px;
    text-align:left;
    font-size: 0.95rem;
    font-weight:bold;
    color:#000;
    line-height:1.6;
}

/* ===== CONTACTO ===== */

.contacto-botones{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:15px;
    margin-bottom:50px;
}

.rrhh{
    background:#fffbf0;
    border-radius:20px;
    padding:30px;
    text-align:center;
    box-shadow: 
        0 12px 24px rgba(143, 143, 143, 0.4),
        0 -4px 12px rgba(170, 170, 170, 0.2);
}

.rrhh h3{
    color:var(--azul);
    margin-bottom:15px;
}

/* ===== FOOTER ===== */

footer{
    background:var(--azul);
    color:#fffbf0;
    text-align:center;
    padding:40px 20px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {

    /* --- Header --- */
    .header {
        flex-direction: column;
        gap: 8px;
        padding: 10px 5%;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    /* --- Hero --- */
    .hero {
        padding: 20px 20px 40px;
        justify-content: space-between;
    }

    .hero-contenido {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        flex: none;
        margin: auto 0;
    }

    .hero-logo {
        width: 200px;
    }

    .hero-texto h2 {
        font-size: 1.5rem;
    }

    .hero-texto {
        max-width: 100%;
    }

    /* --- Secciones --- */
    .seccion {
        width: 90%;
        padding: 60px 0;
    }

    #institucion {
        padding-top: 180px;
    }

    /* --- Servicios --- */
    #servicios {
        width: 90%;
    }

    .grid-servicios {
        grid-template-columns: 1fr;
    }

    /* --- Talleres --- */
    .grid-talleres {
        grid-template-columns: 1fr;
    }

    .talleres-wrapper {
        margin-top: 30px;
        padding-top: 30px;
    }

    .lineas-talleres {
        height: 100%;
        z-index: 0;
    }

    .card-taller {
        position: relative;
        z-index: 1;
    }

    /* --- Ubicación --- */
    .ubicacion-container {
        grid-template-columns: 1fr;
    }

    /* --- Flecha --- */
    .flecha-scroll {
        width: 55px;
        height: 55px;
    }
}