/* ==========================================================
   RESET
========================================================== */

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

html{
    scroll-behavior:smooth;
}

body{
    font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
    color:#21415d;
    background:#f5fbff;
    line-height:1.6;
}

/* ==========================================================
   VARIABLES
========================================================== */

:root{

    --primary:#3b82f6;
    --primary-dark:#2563eb;
    --primary-light:#e8f3ff;

    --secondary:#6bb7ff;

    --text:#21415d;
    --text-soft:#5f7386;

    --white:#ffffff;

    --shadow:
        0 10px 30px rgba(59,130,246,.15);

    --shadow-hover:
        0 18px 40px rgba(59,130,246,.25);

    --radius:18px;

    --transition:.30s ease;
}

/* ==========================================================
   HERO
========================================================== 

NOTA PARA CURIOSOS: Orixinalmente ChatGPT deume unha versión
do Hero que non era responsive. Esta é a v2 */

.hero{
    min-height:100svh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;

    padding:
        clamp(2rem,5vw,5rem)
        clamp(1.5rem,6vw,8vw);

    background:
        radial-gradient(circle at top right,#dff0ff 0%,transparent 40%),
        linear-gradient(180deg,#ffffff,#eef7ff);

    position:relative;
}

.hero-content{
    width:min(900px,100%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:clamp(1rem,2vw,2rem);

    animation:heroFade 1s ease;
}

.hero-tag{
    display:inline-block;
    padding:.6rem 1rem;
    border-radius:999px;
    background:var(--primary-light);
    color:var(--primary-dark);
    font-weight:600;
    font-size:clamp(.8rem,2vw,.95rem);
}

.hero-tag2{
    display:inline-block;
    padding:.5rem 1rem;
    border-radius:999px;
    background:var(--primary-light);
    color:var(--primary-dark);
    font-weight:400;
    font-size:clamp(.8rem,2vw,.95rem);
}

.hero h1{
    font-size:clamp(2.4rem,8vw,5.5rem);
    line-height:.95;
    color:var(--primary-dark);
    text-wrap:balance;
}

.hero-subtitle{
    width:min(800px,100%);
    font-size:clamp(1rem,2.2vw,1.35rem);
    color:var(--text-soft);
    text-wrap:pretty;
}

.primary-button{
    margin-top:.5rem;
}

/* ==========================================================
   BOTÓN PRINCIPAL
========================================================== */

.primary-button{

    display:inline-flex;

    justify-content:center;
    align-items:center;

    padding:1.2rem 2.4rem;

    border-radius:16px;

    background:linear-gradient(135deg,
            var(--primary),
            var(--secondary));

    color:white;

    font-size:1.05rem;

    font-weight:700;

    text-decoration:none;

    transition:var(--transition);

    box-shadow:var(--shadow);

    position:relative;

    overflow:hidden;
}

.primary-button::before{

    content:"";

    position:absolute;

    inset:0;

    transform:translateX(-120%);

    background:
        linear-gradient(90deg,
        transparent,
        rgba(255,255,255,.45),
        transparent);

    transition:.7s;
}

.primary-button:hover{

    transform:translateY(-6px) scale(1.03);

    box-shadow:var(--shadow-hover);
}

.primary-button:hover::before{

    transform:translateX(120%);
}

.primary-button:active{

    transform:scale(.96);

    transition:.08s;
}

/* ==========================================================
   SCROLL
========================================================== */

.scroll-indicator{

    position:absolute;

    bottom:30px;

    font-size:2rem;

    color:var(--primary);

    animation:bounce 2s infinite;
}

/* ==========================================================
   SECCIONES
========================================================== */

main{

    width:min(1200px,92vw);

    margin:auto;
}

.section-header{

    padding:7rem 0 2rem;

    text-align:center;
}

.section-label{

    display:inline-block;

    color:var(--primary);

    font-weight:700;

    text-transform:uppercase;

    letter-spacing:.12em;

    margin-bottom:1rem;
}

.section-label.alt{

    color:#0f6dc6;
}

.section-header h2,
.projects h2{

    font-size:2.4rem;

    margin-bottom:1rem;
}

.section-header p,
.projects p{

    color:var(--text-soft);

    max-width:700px;

    margin:auto;
}

.content-section{

    padding:4rem 0;
}

.content-section h3{

    text-align:center;

    font-size:2rem;

    margin-bottom:.5rem;
}

.section-description{

    text-align:center;

    color:var(--text-soft);

    margin-bottom:2.5rem;
}

/* ==========================================================
   TARJETAS
========================================================== */

.card-grid{

    display:grid;

    gap:1.5rem;
}

.card-grid.five{

    grid-template-columns:repeat(5,1fr);
}

.card-grid.four{

    grid-template-columns:repeat(4,1fr);
}

.resource-card{

    aspect-ratio:.9;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:.6rem;

    text-align:center;

    text-decoration:none;

    color:var(--primary-dark);

    background:white;

    border-radius:20px;

    box-shadow:var(--shadow);

    transition:var(--transition);

    padding:1.25rem;
}

.resource-card-static{

    color:var(--primary-dark);

    background:white;

    border-radius:20px;

    box-shadow:var(--shadow);

    transition:var(--transition);

    padding:1.5rem;
    
    margin-bottom: 20px; 
    
    margin-left: 40px;   
    
    margin-right: 40px;
    
    position: relative;
}

.iframe-help {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.resource-card:hover{

    transform:
        translateY(-10px)
        scale(1.03);

    box-shadow:var(--shadow-hover);
}

.resource-card:active{

    transform:scale(.95);

    transition:.08s;
}

.card-number{

    font-size:1.5rem;

    font-weight:800;

    color:var(--primary);
}

.card-tag{
    display:inline-block;
    padding:.6rem 1rem;
    border-radius:999px;
    background:var(--primary-light);
    color:var(--primary);
    font-weight:600;
    font-size:clamp(.8rem,2vw,.95rem);
}

/* ==========================================================
   PROXECTOS
========================================================== */

.centered {
text-align: center;
}

.projects{

    padding:7rem 0;
}

.project-list{

    display:grid;

    gap:1.2rem;

    margin-top:3rem;
}

.project-link{

    background:white;

    border-left:6px solid var(--primary);

    border-radius:14px;

    padding:1.5rem;

    text-decoration:none;

    color:inherit;

    transition:var(--transition);

    box-shadow:0 4px 18px rgba(0,0,0,.05);
}

.project-link:hover{

    transform:translateX(8px);

    background:#eef7ff;
}

.project-link h4{

    margin-bottom:.5rem;

    color:var(--primary-dark);
}

.project-link p{

    text-align:left;

    margin:0;

    color:var(--text-soft);
}

/* ==========================================================
   FOOTER
========================================================== */

footer{

    margin-top:6rem;

    padding:3rem;

    text-align:center;

    background:#eaf5ff;

    color:var(--text-soft);
}

/* ==========================================================
   REVEAL
========================================================== */

.reveal{

    opacity:0;

    transform:translateY(50px);

    transition:

        opacity .8s ease,

        transform .8s ease;
}

.reveal.visible{

    opacity:1;

    transform:none;
}

/* ==========================================================
   ANIMACIONES
========================================================== */

@keyframes heroFade{

    from{

        opacity:0;

        transform:translateY(40px);
    }

    to{

        opacity:1;

        transform:none;
    }
}

@keyframes bounce{

    0%,20%,50%,80%,100%{

        transform:translateY(0);
    }

    40%{

        transform:translateY(-10px);
    }

    60%{

        transform:translateY(-5px);
    }
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:1100px){

    .card-grid.five{

        grid-template-columns:repeat(3,1fr);
    }

    .card-grid.four{

        grid-template-columns:repeat(2,1fr);
    }
}

@media (max-width:768px){

    .hero{
        padding:2rem 1.25rem 4rem;
    }

    .hero h1{
        font-size:clamp(2rem,11vw,3rem);
    }

    .hero-subtitle{
        font-size:1rem;
        line-height:1.6;
    }

    .hero-tag{
        font-size:.8rem;
    }

    .primary-button{
        width:100%;
        max-width:420px;
        padding:1rem;
    }

    .scroll-indicator{
        bottom:15px;
        font-size:1.6rem;
    }
    
    .card-grid.five{

        grid-template-columns:repeat(1,1fr);
    }

    .card-grid.four{

        grid-template-columns:repeat(1,1fr);
    }
    
    .resource-card-static{
    padding:0;

    margin-left: 0px;   
    
    margin-right: 0px;
    }
}

/* Para móbil (apaisado) */

@media (max-height:700px){

    .hero{
        min-height:auto;
        padding:3rem 1.5rem;
    }

    .hero-content{
        gap:1rem;
    }

    .hero h1{
        font-size:clamp(2rem,7vw,4rem);
    }

    .hero-subtitle{
        font-size:1rem;
    }

    .scroll-indicator{
        display:none;
    }
}
