/* ============================================
   RESET Y VARIABLES GLOBALES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Futura PT', Futura, 'Century Gothic', sans-serif;
    background: #ffffff;
    color: #000;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

/* ============================================
   HEADER
   ============================================ */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1001;
    border-bottom: 1px solid #f0f0f0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

/* LOGO */
.logo {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none;
    color: #000000;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.6;
}

/* NAVEGACIÓN DESKTOP */
nav {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-main {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-main > li {
    position: relative;
}

.nav-main > li > a {
    text-decoration: none;
    color: #000000;
    font-size: 13px;
    letter-spacing: 0.3px;
    font-weight: 500;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.nav-main > li > a:hover {
    opacity: 0.6;
}

/* SUBMENÚ DESKTOP */
.nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #f0f0f0;
    border-top: none;
    list-style: none;
    min-width: 180px;
    padding: 15px 0;
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.has-submenu:hover .nav-submenu {
    display: block;
}

.nav-submenu li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #000;
    font-size: 12px;
    letter-spacing: 0.2px;
    font-weight: 400;
    transition: background 0.2s ease;
}

.nav-submenu li a:hover {
    background: #f5f5f5;
}

/* REDES SOCIALES */
.social-links {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-left: 32px;
}

.social-links a {
    color: #000;
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
}

.social-links a:hover {
    opacity: 1;
}

.social-links svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #000;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* OVERLAY DEL MENÚ MÓVIL */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* MENÚ MÓVIL */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
    z-index: 999;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    padding: 0 20px;
}

.mobile-menu ul li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu ul li:last-child {
    border-bottom: none;
}

.mobile-menu ul li a {
    text-decoration: none;
    color: #000;
    font-size: 14px;
    display: block;
}

.mobile-menu ul li.has-submenu > a {
    cursor: pointer;
    position: relative;
}

.mobile-menu ul li.has-submenu > a::after {
    content: '›';
    position: absolute;
    right: 0;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.mobile-menu ul li.has-submenu.active > a::after {
    transform: rotate(90deg);
}

.mobile-menu .nav-submenu {
    display: none;
    position: static;
    background: #f5f5f5;
    border: none;
    box-shadow: none;
    margin-top: 10px;
    padding: 10px 0;
    min-width: auto;
}

.mobile-menu ul li.has-submenu.active .nav-submenu {
    display: block;
}

.mobile-menu .nav-submenu li {
    padding: 8px 0;
    border: none;
}

.mobile-menu .nav-submenu li a {
    padding-left: 20px;
    font-size: 13px;
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */

main {
    margin-top: 70px;
    padding: 60px 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   GALERÍA MASONRY
   ============================================ */

.gallery {
    width: 100%;
}

.gallery-masonry {
    column-count: 3;
    column-gap: 24px;
}

.index-main .gallery-masonry {
    column-count: 4;
}

.gallery-masonry a {
    text-decoration: none;
    display: block;
}

.gallery-masonry img {
    width: 100%;
    display: block;
    margin-bottom: 24px;
    break-inside: avoid;
    cursor: pointer;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.gallery-masonry img:hover {
    transform: scale(1.035);
    opacity: 0.92;
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-content img {
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    font-size: 34px;
    cursor: pointer;
    color: #000;
    padding: 12px;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.6;
}

.lightbox-close {
    top: 28px;
    right: 42px;
}

.lightbox-prev {
    left: 28px;
}

.lightbox-next {
    right: 28px;
}

/* ============================================
   SECCIÓN DE DESCRIPCIÓN
   ============================================ */

.description-section {
    position: sticky;
    top: 70px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    padding: 25px 0;
    z-index: 500;
}

.description-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.description-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    nav {
        display: none;
    }

    .hamburger {
        display: flex;
        order: 3;
        margin-left: 12px;
    }

    .social-links {
        margin-left: 0;
        order: 2;
    }

    .logo {
        font-size: 18px;
        letter-spacing: 1.5px;
    }

    main {
        padding: 40px 20px;
    }

    .gallery-masonry,
    .index-main .gallery-masonry {
        column-count: 2;
        column-gap: 16px;
    }

    .gallery-masonry img {
        margin-bottom: 16px;
    }

    .description-section {
        top: 70px;
        padding: 20px 0;
    }

    .description-container {
        padding: 0 20px;
    }

    .description-section p {
        font-size: 14px;
        line-height: 1.6;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 28px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 28px;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    .lightbox-content img {
        max-width: 95vw;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 16px;
    }

    .social-links {
        gap: 12px;
    }

    .social-links svg {
        width: 18px;
        height: 18px;
    }

    .gallery-masonry,
    .index-main .gallery-masonry {
        column-count: 1;
        column-gap: 0;
    }

    .gallery-masonry img {
        margin-bottom: 20px;
    }
}

/* Mejora de rendimiento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}