/* ==================== VARIABLES CSS ==================== */
:root {
    /* Paleta de colores: Negro/Gris oscuro con verde eléctrico */
    --primary-color: #00ff9b; /* Verde eléctrico */
    --primary-color-alt: #00e68a;
    --title-color: #f0f2f5;
    --text-color: #c0c2c5;
    --body-color: #121212;
    --container-color: #1e1e1e;
    --border-color: #333;

    /* Tipografía */
    --body-font: 'Poppins', sans-serif;

    /* Tamaños de fuente */
    --big-font-size: 3rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;

    /* Pesos de fuente */
    --font-regular: 400;
    --font-semi-bold: 600;
    --font-bold: 700;

    /* Márgenes */
    --mb-0-5: .5rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    
    /* z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 4.5rem;
        --h1-font-size: 3rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.1rem;
        --small-font-size: .9rem;
    }
}

/* ==================== BASE ==================== */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3 {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== CLASES REUTILIZABLES ==================== */
.container {
    max-width: 1024px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: 4.5rem 0 2rem;
}

.section__title {
    font-size: var(--h2-font-size);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--mb-0-5);
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    text-align: center;
    margin-bottom: var(--mb-2);
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #000;
    padding: 1rem 1.75rem;
    border-radius: .5rem;
    font-weight: var(--font-semi-bold);
    transition: .3s;
    border: none;
    cursor: pointer;
}

.button:hover {
    background-color: var(--primary-color-alt);
    transform: translateY(-3px);
}

.highlight {
    color: var(--primary-color);
}

/* Animaciones de aparición */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==================== HEADER & NAV ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: transparent;
    transition: background .3s;
}

.header.scrolled {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
}

.nav {
    height: 7.5rem;
    /*padding: 0.1rem 0; /* <-- HEMOS AÑADIDO ESTA LÍNEA */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    /* ESTAS LÍNEAS SON NUEVAS PARA ASEGURAR EL CENTRADO */
    display: flex;
    align-items: center;
    /* FIN DE LÍNEAS NUEVAS */

    color: var(--title-color);
    font-weight: var(--font-bold);
    font-size: 1.5rem;
}

/* === AÑADE ESTE NUEVO BLOQUE DE CÓDIGO AQUÍ === */
.nav__logo img {
    height: 250px; /* Ajusta este valor según el tamaño que desees para tu logo */
    width: auto;  /* Mantiene la proporción original de la imagen */
    display: block; /* Ayuda a evitar espacios extra debajo de la imagen */
}
/* === FIN DEL BLOQUE NUEVO === */

.nav__logo:hover {
    /* Lo movemos aquí para que el efecto no aplique al texto que ya no existe */
    opacity: 0.8; 
    transition: opacity .3s;
}

.nav__toggle, .nav__close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        background-color: var(--body-color);
        top: 0;
        right: -100%;
        width: 100%;
        height: 100%;
        padding: 6rem 2rem 0;
        transition: right .4s;
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.nav__link {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    transition: color .3s;
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

/* Show Menu */
.show-menu {
    right: 0;
}


/* ==================== HERO ==================== */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 0.9)), url('');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero__container {
    text-align: center;
}

.hero__title {
    font-size: var(--big-font-size);
    margin-bottom: var(--mb-1);
}

.hero__subtitle {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-2);
    font-weight: var(--font-regular);
}


/* ==================== SERVICIOS ==================== */
.services__container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service__card {
    background-color: var(--container-color);
    padding: 2.5rem 1.5rem;
    border-radius: .75rem;
    text-align: center;
    transition: transform .3s;
    border: 1px solid var(--border-color);
}

.service__card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.service__icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--mb-1);
}

.service__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

/* ==================== PROYECTOS ==================== */
.projects__container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.project__card {
    background-color: var(--container-color);
    border-radius: .75rem;
    overflow: hidden;
    transition: box-shadow .3s;
    border: 1px solid var(--border-color);
}

.project__card:hover {
    box-shadow: 0 8px 24px hsla(158, 100%, 50%, 0.2);
}

.project__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project__data {
    padding: 1.5rem;
}

.project__subtitle {
    font-size: var(--small-font-size);
    color: var(--primary-color);
}

.project__title {
    font-size: var(--h3-font-size);
    margin: .5rem 0;
}

.project__description {
    margin-bottom: 1rem;
}

.project__tech {
    font-size: var(--small-font-size);
    font-style: italic;
    color: #888;
}

/* ==================== EQUIPO ==================== */
.team__container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    justify-items: center;
}

.team__member {
    text-align: center;
}

.team__img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: var(--mb-1);
    border: 3px solid var(--primary-color);
}

.team__name {
    font-size: var(--h3-font-size);
}

.team__role {
    font-size: var(--small-font-size);
    color: var(--text-color);
}

/* ==================== TESTIMONIOS ==================== */
.testimonials {
    background-color: var(--container-color);
}
.testimonial__card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
.testimonial__img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: var(--mb-1);
}
.testimonial__quote {
    font-size: var(--h3-font-size);
    font-style: italic;
    margin-bottom: var(--mb-1);
}
.testimonial__author {
    color: var(--primary-color);
}
.testimonial__company {
    font-size: var(--small-font-size);
}

/* ==================== CONTACTO ==================== */
.contact__container {
    max-width: 600px;
    margin: auto;
}

.contact__form {
    display: grid;
    gap: 1.5rem;
}

.contact__input {
    width: 100%;
    padding: 1rem;
    border-radius: .5rem;
    border: 1px solid var(--border-color);
    background-color: var(--container-color);
    color: var(--title-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

.contact__input::placeholder {
    color: var(--text-color);
}

.contact__input:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.contact__input {
    resize: vertical;
    min-height: 140px;
}

.contact__message {
    font-size: var(--small-font-size);
    text-align: center;
}

.contact__form .button {
    justify-self: center;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--container-color);
    padding: 3rem 0;
    text-align: center;
}

.footer__title, .footer__subtitle {
    color: var(--title-color);
}

.footer__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-0-5);
}

.footer__subtitle {
    font-size: var(--normal-font-size);
    margin-bottom: var(--mb-2);
}

.footer__socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: var(--mb-2);
}

.footer__social-link {
    font-size: 1.5rem;
    color: var(--title-color);
    transition: color .3s, transform .3s;
}

.footer__social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer__copy {
    font-size: var(--small-font-size);
}

.footer__copy a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ==================== MEDIA QUERIES ==================== */
/* Para dispositivos medianos (tablets) */
@media screen and (min-width: 768px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
    
    .section {
        padding: 6rem 0 2rem;
    }

    .nav__menu {
        display: block;
    }

    .nav__list {
        flex-direction: row;
        gap: 2.5rem;
    }

    .nav__toggle, .nav__close {
        display: none;
    }
}

/* ==================== MEDIA QUERIES ==================== */
/* Para dispositivos medianos (tablets) */



/* Para teléfonos pequeños (hasta 480px) */
@media screen and (max-width: 480px) {
    /* Reducimos el tamaño de las fuentes más grandes */
    :root {
        --big-font-size: 2.5rem;
        --h1-font-size: 1.75rem;
        --h2-font-size: 1.25rem;
    }

    .hero {
        /* Reducimos la altura del hero para que no ocupe toda la pantalla y se vea el contenido */
        height: 80vh; 
    }

    .contact__form {
        padding: 1.5rem;
    }
}