@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600&display=swap');

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

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: #0a0a0a;
    color: white;
    min-height: 100vh;
}

img {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* ========================================
   NAVIGATION — idéntica al home
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 4rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
    display: block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}
.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Dropdown Sueños */
.dropdown { position: relative; }

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .dropdown:hover .dropdown-content {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }
}

.dropdown-item {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1rem;
    margin: 0.3rem 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 300;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: translateX(5px);
    color: #fff;
}

/* ========================================
   CABECERA DE LA PÁGINA
   ======================================== */

.page-header {
    padding: 8rem 4rem 3rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
    font-weight: 300;
}

/* ========================================
   MOSAICO — GRID INSTAGRAM
   ======================================== */

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

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

/* Tarjeta individual */
.grid-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: block;
    text-decoration: none;
    background: #111;
    cursor: pointer;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    pointer-events: none;
}

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

/* Overlay en hover */
.grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    transition: background 0.35s ease;
}

.grid-item:hover .grid-overlay {
    background: rgba(0, 0, 0, 0.65);
}

.grid-title {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #fff;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.grid-meta {
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.1em;
    margin-top: 0.4rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease 0.05s, transform 0.35s ease 0.05s;
}

.grid-item:hover .grid-title,
.grid-item:hover .grid-meta {
    opacity: 1;
    transform: translateY(0);
}

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

.site-footer {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

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

@media (max-width: 1280px) {
    .nav {
        padding: 0.8rem 1rem;
    }

    .nav-container {
        justify-content: space-between;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

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

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 1rem 0;
        width: 100%;
    }

    .nav-link::after {
        display: none;
    }

    .dropdown-content {
        position: static;
        transform: none;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        min-width: auto;
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        margin-top: 0.5rem;
        padding: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .dropdown-content.active {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        padding: 0.5rem;
        pointer-events: auto;
    }

    .dropdown-item {
        white-space: normal;
        font-size: 0.9rem;
        padding: 0.7rem 0.8rem;
    }

    .page-header {
        padding: 6rem 2rem 2rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }

    .grid-title {
        font-size: 0.75rem;
    }

    .grid-meta {
        display: none;
    }
}

/* S24+ tipografía */
@media (min-width: 900px) and (max-width: 1280px) {
    .nav-link {
        font-size: 2.6rem;
    }

    .dropdown-item {
        font-size: 2.2rem;
    }

    .nav-menu {
        max-width: 600px;
    }

    .dropdown-content.active {
        max-height: 1000px;
    }

    .page-header h1 {
        font-size: 3rem;
    }

    .page-header p {
        font-size: 1.8rem;
    }

    .grid-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 375px) {
    .nav-menu {
        width: 90%;
    }

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

/* Accesibilidad */
*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
