:root {
    --glass-bg: rgba(0, 0, 0, 0.15);
    --glass-border: rgba(255, 255, 255, 0.12);
    --card-bg: rgba(0, 0, 0, 0.35); 
    --text-color: #ffffff;
    --font-serif: 'Cormorant Garamond', serif;
}

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

body {
    background: #000;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    padding-top: 100px; 
}

.background-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('../img/BG.avif') no-repeat center center/cover;
    z-index: -1;
}

/* --- MENÚ SUPERIOR --- */
.top-nav {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.top-nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    padding: 0;
    margin: 0;
}

.top-nav a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    letter-spacing: 2px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    white-space: nowrap;
}

.top-nav a:hover, .top-nav a.active {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    transform: translateY(-3px) scale(1.05);
}

/* --- CONTENEDOR GLASS --- */
.glass-container {
    width: 90%;
    min-height: 80vh; 
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    padding: 60px;
    position: relative;
    margin-bottom: 60px;
    transition: opacity 0.3s ease;
}

.home-container { 
    justify-content: flex-end; 
    min-height: 75vh; 
    height: auto; 
    padding: 60px 60px 40px 60px; 
    margin-top: 60px; 
}

.work-container { justify-content: flex-start; height: auto; }

/* --- ENCABEZADO --- */
.header-group {
    position: absolute;
    top: 8%; 
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    pointer-events: none;
}

.main-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 14vw, 11rem);
    text-align: center;
    letter-spacing: -2px;
    line-height: 0.8;
    text-transform: uppercase;
    width: 100%;
}

.subtitle-container {
    width: 100%;
    max-width: 1150px;
    display: flex;
    justify-content: flex-end; 
    margin-top: -5px;
}

.sub-text {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-style: italic;
    opacity: 0.9;
    padding-right: 50px;
}

/* --- GRID DE CONTENIDO (HOME) --- */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr 1fr; 
    align-items: flex-end;
    width: 100%;
    z-index: 5;
    gap: 40px;
}

.text-card {
    background: var(--card-bg);
    padding: 40px; 
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.col-center { display: flex; justify-content: center; align-items: flex-end; }

.hero-portrait {
    width: 140%; 
    max-height: 55vh; 
    object-fit: contain;
    transform: translateY(45px); 
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
}

.tagline { 
    font-size: 1.5rem; 
    line-height: 1.5; 
    margin-bottom: 30px; 
    font-weight: 300; 
    text-align: center; 
    width: 100%;
}

.social-pills { display: flex; gap: 12px; margin-bottom: 20px; justify-content: center; width: 100%; }
.pill {
    padding: 12px 28px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-size: 0.85rem;
    transition: 0.3s;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pill:hover { background: white; color: black; }
.location { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 4px; opacity: 0.6; text-align: center; width: 100%; }

/* --- FIRMA --- */
.signature { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.signature h2 { font-family: var(--font-serif); font-size: 3.5rem; line-height: 0.9; margin-bottom: 10px; text-align: center;}
.signature p { font-size: 0.9rem; letter-spacing: 2px; opacity: 0.7; text-transform: uppercase; text-align: center; }

/* --- ESTILOS PAGINA /WORK --- */
.work-selector {
    width: 100%;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-top: 20px;
}

.work-selector ul { display: flex; justify-content: center; flex-wrap: wrap; list-style: none; gap: 25px; align-items: center; }

.work-link {
    background: none; border: none;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px 0;
    position: relative;
}

.work-link:hover, .work-link.active { 
    color: #fff; 
}

.work-link.active {
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.work-link.active::after {
    content: ''; position: absolute; bottom: -21px; left: 0; width: 100%; height: 2px; background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* --- BLOQUES EDITORIALES --- */
.content-display { transition: opacity 0.25s ease-in-out; width: 100%; }

.editorial-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
    text-align: left;
}

.editorial-img {
    display: flex;
    justify-content: center; 
    align-items: center;      
    width: 100%;
}

.editorial-img img {
    width: 100%;
    height: 550px; 
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: block;
}

.editorial-img img[style*="aspect-ratio"] {
    width: auto;          
    max-width: 100%;      
    height: 650px;        
    object-fit: contain;  
}

.category-tag { display: block; font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase; opacity: 0.5; margin-bottom: 15px; }

.editorial-text .main-title { 
    text-align: left; 
    font-size: clamp(2.5rem, 5vw, 5rem); 
    margin-bottom: 20px; 
    line-height: 1; 
    font-family: var(--font-serif); 
}

.editorial-text .sub-text {
    font-family: 'Inter', sans-serif; 
    font-style: normal; 
    font-size: 1.1rem; 
    line-height: 1.7; 
    opacity: 0.7; 
    padding-right: 0; 
    text-align: left;
}

/* --- GALERÍA --- */
.work-gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 80px;
    width: 100%;
}

.gallery-item {
    flex: 1 0 0; 
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
    min-width: 0;
}

.gallery-item:hover { transform: scale(1.02); flex: 1.05 0 0; }
.work-gallery:hover .gallery-item:not(:hover) { opacity: 0.7; }

/* --- SERVICIOS --- */
.services-list-container {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 60px;
    background: var(--card-bg);
    padding: 60px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    align-items: center;
    margin-bottom: 40px;
    width: 100%;
}

.service-left img { width: 100%; height: 450px; object-fit: cover; border-radius: 20px; }
.service-right .main-title { 
    font-size: 3rem; 
    text-align: left; 
    margin-bottom: 30px; 
    font-family: var(--font-serif); 
}

.services-grid-list { display: flex; flex-direction: column; }
.service-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 25px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.service-row:last-child { border-bottom: none; }
.service-info { display: flex; flex-direction: column; gap: 5px; text-align: left; }
.service-info strong { font-family: var(--font-serif); font-size: 1.6rem; text-transform: uppercase; letter-spacing: 1px; }
.service-info span { font-size: 0.8rem; letter-spacing: 1px; opacity: 0.5; }

/* --- NUEVA SECCIÓN FOOTER --- */
.main-footer {
    width: 100%;
    padding: 40px 20px;
    margin-top: 80px;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.footer-container {
    width: 100%;
    max-width: 1100px;
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-socials {
    display: flex;
    gap: 50px;
}

.footer-socials a {
    text-decoration: none;
    color: #ffffff;
    font-size: 0.75rem;
    letter-spacing: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: rgba(255, 255, 255, 0.6);
}

.footer-credits {
    text-align: center;
}

.footer-credits p {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin: 5px 0;
}

.footer-credits a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.powered {
    margin-top: 10px !important;
    opacity: 0.8;
}

/* --- ACTUALIZACIÓN ESPECÍFICA PARA PÁGINA ABOUT (FIX OVERLAP) --- */

.about-container {
    justify-content: flex-start;
    align-items: center;
    min-height: auto;
    padding: 80px 60px;
}

/* Evitamos que el encabezado flote sobre el texto en About */
.about-container .header-group {
    position: relative; /* Cambiado de absolute a relative */
    top: 0;
    margin-bottom: 40px;
    pointer-events: auto;
}

.about-container .main-title {
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    margin-bottom: 20px;
}

.about-container .sub-text {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-right: 0;
}

.about-text-content {
    max-width: 900px;
    margin: 40px auto;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.85;
    text-align: center;
}

/* Ajuste de grid editorial para About */
.about-container .editorial-row {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 50px;
    align-items: flex-start;
    margin-top: 40px;
}

.about-container .editorial-text .main-title { 
    text-align: left; 
    font-size: clamp(2rem, 4.5vw, 4rem); 
    margin-bottom: 15px; 
}

/* --- RESPONSIVE FINAL --- */

@media (max-width: 1440px) and (min-width: 1025px) {
    .main-title { font-size: 8.5rem; }
    .home-container { padding-top: 100px; }
    .hero-portrait { max-height: 52vh; transform: translateY(40px); }
    .text-card { padding: 35px; }
    .tagline { font-size: 1.3rem; }
}

@media (max-width: 992px) {
    .editorial-row, .services-list-container { grid-template-columns: 1fr; gap: 40px; padding: 40px; }
    .work-gallery { flex-wrap: wrap; }
    .gallery-item { flex: 1 0 45%; }
}

@media (max-width: 768px) {
    body { height: auto; overflow-y: auto; padding-top: 60px; }

    .top-nav { top: 20px; }
    .top-nav ul { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .top-nav a { padding: 8px 16px; font-size: 0.75rem; }

    .glass-container {
        width: 92%; height: auto;
        margin-top: 15px;
        margin-bottom: 40px;
        padding: 40px 20px;
        align-items: center;
    }

    .about-container { padding: 40px 20px; }
    .about-container .main-title { font-size: 2.8rem; }
    .about-container .sub-text { font-size: 1.1rem; }
    .about-text-content { font-size: 0.95rem; text-align: left; }
    .about-container .editorial-row { grid-template-columns: 1fr; }

    /* --- MENÚ WORK CON INDICADOR --- */
    .work-selector {
        margin-bottom: 30px;
        overflow-x: auto; 
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px;
        width: 100%;
        mask-image: linear-gradient(to right, black 85%, transparent 100%); 
        position: relative;
    }

    .work-selector::before {
        content: '→';
        position: absolute;
        top: 20px;
        right: 25px;
        font-size: 1.6rem;
        color: rgba(255, 255, 255, 0.6);
        animation: arrowBounce 1.5s infinite;
        font-weight: bold;
        pointer-events: none;
    }

    @keyframes arrowBounce {
        0%, 100% { transform: translateX(0); opacity: 0.4; }
        50% { transform: translateX(10px); opacity: 1; }
    }

    .work-selector::-webkit-scrollbar { display: none; } 

    .work-selector ul {
        flex-wrap: nowrap; 
        justify-content: flex-start;
        padding: 0 15px;
        gap: 25px;
    }

    .work-link { font-size: 0.7rem; flex-shrink: 0; opacity: 0.5; }
    .work-link.active { font-size: 0.85rem; opacity: 1; font-weight: 700; text-shadow: 0 0 12px rgba(255, 255, 255, 0.7); }
    .work-link.active::after { bottom: -15px; }

    .header-group { position: relative; top: 0; padding-bottom: 20px; }
    .main-title { font-size: 3.5rem; text-align: center; }
    .subtitle-container { justify-content: center !important; margin-top: 5px; }
    .sub-text { padding-right: 0 !important; text-align: center; font-size: 1.3rem; }

    .content-grid { display: flex; flex-direction: column; gap: 40px; width: 100%; align-items: center; }
    .col-center { order: -1; width: 100%; }
    .hero-portrait { width: 100%; max-height: 45vh; transform: translateY(0); }

    .text-card { 
        max-width: 100%; width: 100%; text-align: center; 
        display: flex; flex-direction: column; align-items: center; 
        padding: 30px 20px;
    }

    .tagline { font-size: 1.1rem; text-align: center; width: 100%; }
    .social-pills { justify-content: center; width: 100%; }
    
    .signature { text-align: center; width: 100%; }
    .signature h2 { text-align: center; font-size: 2.8rem; }
    .signature p { text-align: center; width: 100%; }

    .editorial-img { height: auto; min-height: 0; }
    .editorial-img img { height: auto; width: 100%; aspect-ratio: 16 / 9; max-height: 350px; }
    .editorial-img img[style*="aspect-ratio"] { height: auto; width: 100%; aspect-ratio: 9 / 16; max-height: 450px; }
    .service-left img { height: 350px; }
    .work-gallery { flex-wrap: wrap; }
    .gallery-item { flex: 1 0 100%; }
    .service-row { flex-direction: column; align-items: flex-start; gap: 15px; }

    .footer-container { padding: 30px 20px; margin: 0 10px; }
    .footer-socials { gap: 25px; }
    .footer-socials a { font-size: 0.65rem; letter-spacing: 2px; }
}