@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

/* ============================================================
   1. BASE & NAVEGACIÓN (GLOBAL)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; scroll-behavior: smooth; }
body { background-color: #fff; color: #000; overflow-x: hidden; line-height: 1.4; }

nav { display: flex; justify-content: space-between; align-items: center; padding: 25px 5%; position: fixed; width: 100%; z-index: 1000; background: rgba(255,255,255,0.98); border-bottom: 1px solid #f0f0f0; }
.logo { font-weight: 900; font-size: 1.1rem; letter-spacing: -1px; text-transform: uppercase; color: #000; text-decoration: none; }

.nav-links { display: flex; list-style: none; gap: 25px; align-items: center; }
.nav-links a { text-decoration: none; color: #000; font-weight: 700; text-transform: uppercase; font-size: 0.65rem; letter-spacing: 1px; transition: 0.3s; }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); background: #fff; list-style: none; min-width: 160px; padding: 10px 0; box-shadow: 0 10px 25px rgba(0,0,0,0.05); opacity: 0; visibility: hidden; transition: 0.4s; border: 1px solid #eee; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-menu li a { padding: 10px 18px; display: block; font-size: 0.6rem; border-bottom: 1px solid #f9f9f9; text-align: center; }
.active-nav { color: #999 !important; }

/* ============================================================
   2. WIDGETS DE INTERACCIÓN (50px)
   ============================================================ */
.bottom-left-widgets { position: fixed; bottom: 30px; left: 30px; z-index: 2000; display: flex; gap: 10px; align-items: flex-end; }
.widget-block { background: #000; color: #fff; border: none; padding: 12px 22px; height: 50px; min-width: 50px; display: flex; align-items: center; justify-content: center; cursor: pointer; text-transform: uppercase; font-weight: 900; font-size: 0.75rem; transition: 0.3s; text-decoration: none; }
.widget-block svg { width: 22px; height: 22px; }

#backToTop { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: #000; border: none; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; z-index: 2000; display: flex; align-items: center; justify-content: center; transition: 0.5s; opacity: 0; pointer-events: none; }
#backToTop.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }

.contact-widget { position: fixed; bottom: 30px; right: 30px; z-index: 2000; display: flex; flex-direction: column; align-items: flex-end; }
.contact-menu { background: #fff; border: 1px solid #eee; margin-bottom: 12px; width: 220px; display: none; flex-direction: column; box-shadow: 0 15px 35px rgba(0,0,0,0.1); border-radius: 4px; overflow: hidden; }
.contact-menu.active { display: flex; }
.menu-item { padding: 15px 20px; text-decoration: none; color: #000; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid #f9f9f9; }

/* ============================================================
   3. SECCIONES DE INDEX (HERO & NOSOTROS)
   ============================================================ */
.hero { height: 85vh; display: flex; align-items: center; padding: 0 8%; }
.hero h1 { font-size: clamp(2.5rem, 6.5vw, 6rem); line-height: 0.85; font-weight: 900; letter-spacing: -3px; text-transform: uppercase; }
.hero h1 span { color: #e0e0e0; }

.about-section { padding: 120px 8%; background: #fafafa; border-top: 1px solid #f0f0f0; }
.about-container { display: flex; gap: 60px; max-width: 1400px; margin: 0 auto; }
.about-label { flex: 1; font-weight: 900; text-transform: uppercase; font-size: 0.7rem; color: #999; letter-spacing: 2px; }
.about-text { flex: 3; }
.services-list { list-style: none; margin: 25px 0 35px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 700px; }
.services-list li { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; position: relative; padding-left: 20px; color: #444; }
.services-list li::before { content: "●"; position: absolute; left: 0; color: #000; font-size: 0.5rem; top: 2px; }
.btn-cta-dark { display: inline-block; padding: 16px 35px; background: #000; color: #fff; text-decoration: none; font-weight: 900; text-transform: uppercase; font-size: 0.65rem; transition: 0.3s; margin-top: 10px; }

/* Grilla Index (3 Columnas) */
.ogilvy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; width: 100%; line-height: 0; }
.project-card { position: relative; aspect-ratio: 16/10; overflow: hidden; text-decoration: none; }
.project-inner { width: 100%; height: 100%; transition: 0.5s; position: relative; }
.project-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-info { position: absolute; bottom: 0; left: 0; padding: 30px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.8)); width: 100%; opacity: 0; transition: 0.4s; }
.project-card:hover .project-info { opacity: 1; }
.project-info h3 { font-size: 0.9rem; font-weight: 900; text-transform: uppercase; }

/* ============================================================
   4. ALIMENTOS (MASONRY & ZOOM)
   ============================================================ */
.gallery-container { padding: 120px 2% 100px; }
.masonry-grid { column-count: 4; column-gap: 12px; }
.photo-item { display: inline-block; width: 100%; margin-bottom: 12px; position: relative; cursor: pointer; break-inside: avoid; overflow: hidden; background: #000; }
.photo-item img { width: 100%; height: auto; display: block; transition: 0.6s; }
.photo-item:hover img { transform: scale(1.08); opacity: 0.7; }
.photo-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.4s; z-index: 10; }
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-overlay span { color: #fff; font-weight: 900; font-size: 0.6rem; letter-spacing: 3px; border: 1px solid #fff; padding: 10px 20px; text-transform: uppercase; }

/* ============================================================
   5. FILM (SISTEMA EXCLUSIVO AISLADO - RESTAURADO)
   ============================================================ */
.film-page-wrapper { padding-top: 100px; max-width: 1400px; margin: 0 auto; }
.flm-video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 !important; width: 100%; }
.flm-video-card { position: relative; aspect-ratio: 9 / 16; background: #000; overflow: hidden; cursor: pointer; border: none; }
.flm-video-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.flm-preview-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.flm-video-card:hover .flm-preview-video { opacity: 1; }
.flm-video-card:hover img { transform: scale(1.05); }

.flm-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: 0.4s; z-index: 10; }
.flm-video-card:hover .flm-overlay { opacity: 1; }
.flm-play-btn { font-size: 2.2rem; color: #fff; margin-bottom: 12px; filter: drop-shadow(0 0 10px rgba(0,0,0,0.5)); }
.flm-overlay-text { color: #fff; font-weight: 900; font-size: 0.55rem; letter-spacing: 2px; border: 1px solid #fff; padding: 8px 18px; text-transform: uppercase; }

/* ============================================================
   6. PÁGINAS DE PROYECTOS INDEPENDIENTES (GENERAL)
   ============================================================ */
.project-hero-wide { width: 100%; height: 70vh; padding-top: 80px; overflow: hidden; }
.project-hero-wide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-intro-section { padding: 100px 8%; background: #fff; display: flex; gap: 80px; }
.project-meta { flex: 1; display: flex; flex-direction: column; gap: 25px; }
.meta-item label { display: block; font-weight: 900; text-transform: uppercase; font-size: 0.65rem; color: #999; letter-spacing: 2px; margin-bottom: 8px; }
.meta-item p { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }
.project-description-text { flex: 2; }
.project-description-text p { font-size: 1.1rem; line-height: 1.6; color: #333; }

/* Grid Estándar 2x2 */
.project-grid-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; padding: 0 5% 15px; max-width: 1800px; margin: 0 auto; }
.grid-item-project { aspect-ratio: 1080 / 1350; overflow: hidden; background: #f5f5f5; }
.grid-item-project img { width: 100%; height: 100%; object-fit: cover; display: block; }

.project-outro { padding: 0 5% 100px; max-width: 1800px; margin: 0 auto; }
.project-outro img { width: 100%; height: auto; display: block; }

/* ============================================================
   7. GRID ASIMÉTRICO (3 ARRIBA / 2 ABAJO - BALUME)
   ============================================================ */
.project-grid-custom { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; padding: 0 5%; max-width: 1800px; margin: 0 auto; }
.grid-item-custom { width: 100%; overflow: hidden; background: #f4f4f4; }
.grid-item-custom img { width: 100%; height: 100%; object-fit: cover; display: block; transition: 0.5s; }
.grid-item-custom:hover img { transform: scale(1.03); }
.row-3 { grid-column: span 2; aspect-ratio: 1 / 1; }
.row-2 { grid-column: span 3; aspect-ratio: 16 / 9; }

/* ============================================================
   8. LIGHTBOXES & FOOTER
   ============================================================ */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.99); z-index: 3000; display: none; align-items: center; justify-content: center; }
.lb-photo-wrapper { width: 85vw; height: 80vh; display: flex; align-items: center; justify-content: center; }
.lb-photo-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }
.flm-lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.99); z-index: 3000; display: none; align-items: center; justify-content: center; }
.flm-lb-container { height: 85vh; aspect-ratio: 9 / 16; background: #000; border-radius: 12px; overflow: hidden; }
.flm-lb-container video { width: 100%; height: 100%; object-fit: cover; }
.flm-close { position: absolute; top: 35px; right: 45px; font-size: 2.5rem; cursor: pointer; color: #000; }

.contact { padding: 120px 8%; text-align: center; background: #000; color: #fff; }
.btn { padding: 18px 45px; text-decoration: none; font-weight: 900; text-transform: uppercase; font-size: 0.7rem; transition: 0.3s; display: inline-block; border: 1px solid #fff; color: #fff; }
.footer-credit { margin-top: 60px; font-size: 0.6rem; letter-spacing: 2px; text-transform: uppercase; opacity: 0.4; }

.reveal { opacity: 0; transform: translateY(20px); transition: 0.8s; }
.reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .ogilvy-grid, .flm-video-grid, .masonry-grid { grid-template-columns: repeat(2, 1fr); column-count: 2; }
    .project-grid-custom { grid-template-columns: 1fr; }
    .row-3, .row-2 { grid-column: span 1; }
    .project-grid-2x2 { grid-template-columns: 1fr; }
    .about-container, .project-intro-section { flex-direction: column; gap: 30px; }
}