/* --- Importación de Fuentes --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap'); /* Fuente para títulos de proyecto */

/* --- Reseteo Básico y Estilos Globales --- */
body {
    background-color: #000000; /* Fondo negro */
    color: #FFFFFF; /* Texto blanco */
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

/* --- Estilos de la Cabecera (Header) --- */
.main-header {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 10;
    transition: background-color 0.3s ease; /* Transición suave para el fondo */
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo-container img {
    height: 40px;
    width: auto;
}

.nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    margin-right: 20px;
    font-size: 16px;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* --- ESTILOS DEL MENÚ HAMBURGUESA --- */
.hamburger-menu {
    display: none; /* Oculto por defecto en pantallas grandes */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 20; /* Para que esté por encima de otros elementos */
}

.hamburger-line {
    width: 30px;
    height: 2px;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
}

/* Animación de la hamburguesa a "X" cuando el menú está abierto */
.header-menu-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}
.header-menu-open .hamburger-line:nth-child(2) {
    opacity: 0;
}
.header-menu-open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}


/* --- Estilos de la Sección Hero (Restless) --- */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 400;
    margin: 0;
    padding: 0;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* --- ESTILOS DE LA SECCIÓN DE INTRODUCCIÓN --- */
.intro-section {
    background-color: #080808;
    background-image: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    background-repeat: repeat;
    padding: 120px 40px;
    text-align: center;
}

.content-wrapper {
    max-width: 950px;
    margin: 0 auto;
}

.intro-section h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.5;
    font-weight: 700; /* Mantenemos la negrita aquí como pediste */
    margin: 0 0 2rem 0;
}

.intro-section .tagline {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* --- ESTILOS DE LA CUADRÍCULA DE IMÁGENES --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.grid-item {
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- ESTILOS DE LA SECCIÓN DE TEXTO EN MOVIMIENTO (MARQUEE) --- */
.marquee-section {
    width: 100%;
    padding: 30px 0;
    background-color: #000;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: scroll-left 8s linear infinite;
}

.marquee-content p {
    margin: 0;
    font-size: 2rem;
    padding-right: 2em;
}

@keyframes scroll-left {
    from {
        transform: translateX(0%);
    }
    to {
        transform: translateX(-50%);
    }
}

/* --- ESTILOS DE LA PÁGINA "FOUNDING GANG" --- */
.team-section {
    min-height: 100vh;
    padding: 120px 40px 60px;
    box-sizing: border-box;
    text-align: center;
    background-color: #0d0d0d;
    background-image: radial-gradient(ellipse at top, #1b2735 0%, #090a0f 100%);
}

.page-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 80px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

.team-member-link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease;
    display: block;
}

.team-member-link:hover {
    transform: scale(1.03);
}

.team-member img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}

.member-info {
    margin-top: 15px;
}

.member-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    font-weight: 400;
}

.member-info p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.7;
}

/* --- ESTILOS DE LA PÁGINA "PORTFOLIO" --- */
.portfolio-section {
    min-height: 100vh;
    padding: 120px 40px 60px;
    box-sizing: border-box;
    background-color: #000;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.portfolio-item {
    text-decoration: none;
    color: #FFFFFF;
    text-align: center;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.03);
}

.portfolio-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: #111;
    display: block;
}

.portfolio-item h3 {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 400;
}

/* --- ESTILOS DEL FOOTER --- */
.main-footer {
    background-color: #1a1a1a;
    padding: 25px 40px;
    text-align: center;
}

.main-footer p {
    margin: 0;
}

.main-footer a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: #FFFFFF;
}

/* --- ESTILOS PÁGINA DE DETALLE DE PROYECTO --- */
.project-intro {
    padding: 140px 40px 80px;
    text-align: center;
    position: relative;
}

.back-link {
    position: absolute;
    top: 140px;
    left: 40px;
    color: #a0a0a0;
    text-decoration: none;
    font-size: 1rem;
}

.back-link:hover {
    color: #FFFFFF;
}

.project-title-detail {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 400;
    margin: 0 auto 40px;
}

.project-description {
    max-width: 700px;
    margin: 0 auto 50px;
    line-height: 1.7;
    font-size: 1.1rem;
    opacity: 0.9;
}

.button {
    display: inline-block;
    border: 1px solid #FFFFFF;
    padding: 12px 35px;
    border-radius: 50px;
    text-decoration: none;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: #FFFFFF;
    color: #000000;
}

.project-gallery {
    padding: 0 20px 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* --- ESTILOS RESPONSIVE (TABLETS Y MÓVILES) --- */
@media (max-width: 768px) {

    /* --- Ajustes generales --- */
    .intro-section,
    .team-section,
    .portfolio-section,
    .project-intro {
        padding-top: 100px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* --- Ajustes de la cabecera --- */
    .hamburger-menu {
        display: flex; /* Mostramos el botón de hamburguesa */
    }
    .main-nav {
        justify-content: flex-end; /* Alineamos la hamburguesa a la derecha */
    }
    .nav-links {
        /* Estilos del menú desplegable */
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 80px; /* Altura de la cabecera */
        left: 0;
        width: 100%;
        background-color: #111111;
        
        /* Oculto por defecto con una transición */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    .nav-links a {
        padding: 15px 0;
        width: 100%;
        text-align: center;
        border-top: 1px solid #333;
    }
    /* Regla para mostrar el menú cuando esté abierto */
    .header-menu-open .nav-links {
        max-height: 500px; /* Un valor mayor a la altura que ocupará el menú */
    }
    .header-menu-open.main-header {
        background-color: #111111; /* Hacemos el fondo sólido al abrir */
    }

    /* --- Ajustes de cuadrículas --- */
    .grid-container {
        grid-template-columns: repeat(2, 1fr); /* 4 columnas -> 2 columnas */
    }
    .team-grid {
        grid-template-columns: repeat(2, 1fr); /* 5 columnas -> 2 columnas */
    }
    .portfolio-grid {
        grid-template-columns: 1fr; /* 3 columnas -> 1 columna */
    }

    /* --- Ajustes página de detalle --- */
    .back-link {
        position: static; /* Quitamos el posicionamiento absoluto */
        display: block; /* Lo hacemos un bloque para que ocupe su propia línea */
        text-align: left;
        margin-bottom: 30px;
        top: auto;
        left: auto;
    }
}

/* --- Ajustes extra para móviles muy pequeños --- */
@media (max-width: 480px) {

    .team-grid,
    .grid-container {
        grid-template-columns: 1fr; /* Todas las cuadrículas a 1 columna */
    }

    .hero-title {
        font-size: clamp(2.5rem, 15vw, 4rem); /* Hacemos los títulos aún más adaptables */
    }
    .page-title {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }
}