/* === RESETEO === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0a0a0a;
    color: #e5e5e5;
    font-family: "Inter", sans-serif;
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== MENÚ NEGRO FIJO ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #000; /* Fondo negro sólido */
    padding: 0 40px;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 42px; /* ajusta el tamaño a tu gusto */
    width: auto; /* mantiene proporción */
    display: block;
}

.top-nav nav ul {
    font-size: 14px;
    list-style: none;
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.top-nav nav a {
    color: #888;
    text-decoration: none;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
    transition: color 0.4s;
}

.top-nav nav a:hover {
    color: #ffff;
}

/* Navigation */
nav.projects-navigation .buttons {
    display: flex;
    margin-top: 80px;
    padding: 10px 0;
    gap: 20px;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    /* background-image: linear-gradient(to right, #333, #333);
    background-size: 100% 1px;
    background-position: 50% 50%;
    background-repeat: no-repeat; */
    /* padding-right: 18%; */
}

nav.projects-navigation .buttons::before {
    width: 100%;
    content: "\00a0";
    flex-grow: 1;
    background-image: linear-gradient(to right, #333, #333);
    background-size: 100% 1px;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

nav.projects-navigation .buttons::after {
    width: 15%;
    content: "\00a0";
    flex-grow: 1;
    background-image: linear-gradient(to right, #333, #333);
    background-size: 100% 1px;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

nav.projects-navigation a {
    color: #666;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

nav.projects-navigation a:hover {
    color: #ffffff;
}

/* Main Content */
main {
    margin-top: 100px;
    padding: 40px 0 80px;
}

.intro-section {
    text-align: center;
    padding: 40px 0 120px;
    border-bottom: 1px solid #1a1a1a;
}

.project-header {
    text-align: center;
    padding: 60px 0;
    border-bottom: 1px solid #1a1a1a;
}

.project-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-subtitle {
    font-size: 18px;
    color: #666;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.project-description {
    font-size: 16px;
    color: #999;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Project Gallery */
.project-gallery {
    padding: 80px 0;
}

.main-image {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 60px;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    margin-bottom: 80px;
}

.detail-section h3 {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #ffffff;
}

.detail-section p,
.detail-section li {
    font-size: 14px;
    color: #888;
    line-height: 1.8;
    margin-bottom: 10px;
}

.detail-section ul {
    list-style: none;
    padding-left: 0;
}

.detail-section li::before {
    content: "— ";
    color: #555;
    margin-right: 10px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tech-tag {
    padding: 5px 12px;
    background-color: #111;
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Related Projects */
.related-projects {
    padding: 80px 0;
    border-top: 1px solid #1a1a1a;
}

.section-title {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 60px;
    text-align: center;
    color: #888;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.related-item {
    background-color: #000;
    border: 0px solid #1a1a1a;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    aspect-ratio: 16/10;
}

.related-item:hover {
    border-color: #333;
    transform: translateY(-5px);
}

.related-item img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item:hover img {
    transform: scale(1.05);
}

.related-item-info {
    padding: 20px;
    background-color: #000;
    height: 30%;
}

.related-item-title {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.related-item-category {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === BURGER MENU === */
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    position: fixed;
    top: 25px;
    right: 40px;
}

.burger-line {
    width: 25px;
    height: 2px;
    background-color: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === MOBILE NAV === */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.8) 0%,
        rgba(17, 17, 17, 0.8) 100%
    );
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding-top: 100px;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
    gap: 24px; /* <-- ajusta este valor para más o menos espacio */
    padding: 0 40px;
    display: flex;
    flex-direction: column;
}

.mobile-nav a {
    color: #888;
    text-decoration: none;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 20px 0;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav a:hover {
    color: #ffffff;
    padding-left: 20px;
}

.mobile-nav a::before {
    content: "· ";
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.mobile-nav a:hover::before {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

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

    .intro-section {
        padding: 60px 0 80px;
    }

    .project-header {
        padding: 40px 0;
    }

    .intro-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .container {
        padding: 0 15px;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }

    .burger-menu {
        display: none !important;
    }
}

/* Loading Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 1200px; /* opcional, limita el tamaño */
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* 🎥 aquí la magia: adapta la proporción al video original */
.video-container iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* valor por defecto */
    display: block;
    border: none;
}

/* 🔸 Si quieres permitir distintos formatos dinámicos */
.video-container[data-aspect="square"] iframe {
    aspect-ratio: 1 / 1;
}

.video-container[data-aspect="vertical"] iframe {
    aspect-ratio: 9 / 16;
}

.video-container[data-aspect="classic"] iframe {
    aspect-ratio: 4 / 3;
}

.video-text {
    max-width: 100%; /* se ajusta al ancho del video */
    margin-top: 20px; /* separación de 20px sobre el video */
    text-align: justify; /* justificado a izquierda y derecha */
    text-justify: inter-word; /* para navegadores que lo soporten */
    padding: 0 20px; /* opcional: espacio lateral dentro del contenedor */
    color: #fff; /* texto visible sobre video */
    font-family: "Inter", sans-serif;
    line-height: 1.6;
}

.video-text h2 {
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1rem; /* reduce el tamaño del título */
}

/* Línea decorativa encima del menú fijo */
.top-nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #362961; /* color cálido */
    z-index: 2000; /* encima del menú */
}

/* === FOOTER === */
footer {
    padding: 80px 0;
    border-top: 1px solid #1a1a1a;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-section p,
.footer-section a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    justify-content: center;
    display: flex;
    padding-top: 40px;
    border-top: 1px solid #1a1a1a;
    font-size: 12px;
    color: #444;
    letter-spacing: 1px;
}
