/* ==========================================================================
   VARIABLES
   ========================================================================== */
:root {
    /* Colors */
    --bg-color: #FFFFFF;
    --text-color: #000000;
    --accent-color: #DC143C;
    --overlay-color: rgba(0, 0, 0, 0.85);
    --border-color: rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-family: 'Space Grotesk', sans-serif;
    --text-xs: 9px;
    --text-sm: 10px;
    --text-base: 14px;
    --text-lg: 18px;
    --text-xl: 24px;
    --text-2xl: 32px;
    
    /* Spacing (8px modular scale) */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-6: 48px;
    --space-8: 64px;
    --space-12: 96px;
    --space-16: 128px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html, body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    text-transform: uppercase;
}

h2 {
    font-size: var(--text-2xl);
    letter-spacing: 4px;
    margin-bottom: var(--space-8);
    text-align: center;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
section {
    padding: clamp(60px, 8vw, var(--space-16)) clamp(16px, 4vw, var(--space-8));
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-4) var(--space-8);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    width: 100%;
    box-sizing: border-box;
}

.landing-header.scrolled {
    padding: var(--space-3) var(--space-8);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.logo-text {
    cursor: pointer;
    height: 35px;
    display: flex;
    align-items: center;
}

.logo-text img {
    height: 100%;
    width: auto;
    transition: opacity var(--transition-fast);
}

.logo-text:hover img {
    opacity: 0.7;
}

nav {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.nav-link {
    font-size: var(--text-sm);
    letter-spacing: 2px;
    color: var(--text-color);
    text-transform: lowercase;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width var(--transition-normal);
}

.nav-link:hover {
    color: var(--accent-color);
}

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

/* ==========================================================================
   SIDE CONTACT
   ========================================================================== */
.floating-contact {
    position: absolute;
    top: 50%;
    left: var(--space-8);
    transform: translateY(-50%);
    z-index: 1000;
    background-color: transparent;
    padding: var(--space-4) var(--space-6);
    color: #ffffff;
}

.floating-contact p {
    font-size: var(--text-base);
    letter-spacing: 2px;
    line-height: 2;
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.floating-contact strong {
    font-weight: 700;
    font-size: var(--text-lg);
}

.floating-contact p:last-child {
    margin-bottom: 0;
}

.floating-contact a {
    color: #ffffff;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.floating-contact a:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .floating-contact {
        top: 50%;
        bottom: auto;
        left: var(--space-4);
        transform: translateY(-50%);
        width: auto;
        text-align: left;
        padding: 0;
    }
    .floating-contact p {
        font-size: var(--text-xs);
        line-height: 1.8;
        margin-bottom: var(--space-2);
    }
    .floating-contact strong {
        font-size: var(--text-sm);
    }
}

/* ==========================================================================
   HERO / CAROUSEL
   ========================================================================== */
.hero-zone {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.carousel-container {
    width: 100vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow), transform var(--transition-slow);
    transform: scale(1.02);
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: high-quality;
    cursor: default;
}

.carousel-nav-buttons {
    position: absolute;
    right: var(--space-6);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    z-index: 1000;
}

.carousel-control {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--accent-color);
    transform: scale(1.1);
}

.bottom-controls {
    position: absolute;
    bottom: var(--space-4);
    left: 0;
    width: 100vw;
    padding: 0 var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 1000;
}

/* ==========================================================================
   PROJECTS GRID
   ========================================================================== */
#proyectos {
    padding-top: var(--space-16);
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-1);
    width: 100%;
}

.project-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5; /* More elegant vertical aspect ratio */
    cursor: pointer;
    background-color: #f9f9f9;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), opacity var(--transition-normal);
    will-change: transform;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    display: flex;
    align-items: flex-end;
    padding: var(--space-4);
}

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

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-overlay span {
    color: var(--bg-color);
    font-size: var(--text-base);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
    transform: translateY(15px);
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.project-item:hover .project-overlay span {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    opacity: 0;
    transition: opacity var(--transition-normal);
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 1400px;
    width: 90%;
    background-color: transparent;
    padding: var(--space-4);
    transform: scale(0.98) translateY(20px);
    transition: transform var(--transition-normal);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: var(--text-2xl);
    font-weight: 300;
    color: var(--text-color);
    cursor: pointer;
    transition: color var(--transition-fast);
    line-height: 1;
    z-index: 10;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
    align-items: start;
    height: 100%;
}

.modal-image-container {
    position: relative;
    width: 100%;
    height: 70vh;
    background: #f0f0f0;
}

.modal-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.modal-info h3 {
    font-size: var(--text-xl);
    letter-spacing: 3px;
    margin-bottom: var(--space-4);
    color: var(--accent-color);
}

.modal-info p {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--text-color);
    font-weight: 300;
}

/* ==========================================================================
   ABOUT (NOSOTROS)
   ========================================================================== */
#nosotros {
    padding-top: var(--space-16);
    min-height: 100vh;
}

.nosotros-container {
    max-width: 1000px;
    margin: 0 auto;
}

.nosotros-title {
    margin-bottom: var(--space-12);
}

.about-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.about-block {
    width: 100%;
    display: flex;
    justify-content: center;
}

.about-block.text p {
    font-size: var(--text-lg);
    line-height: 2;
    letter-spacing: 0.5px;
    margin: 0;
    font-weight: 300;
    text-align: center;
    color: #333;
}

.about-block.image img {
    width: 100%;
    max-width: 600px;
    height: auto;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
#contacto {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-4);
}

.contacto-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.contacto-info p {
    font-size: var(--text-lg);
    letter-spacing: 1px;
    line-height: 2;
    font-weight: 300;
    margin-bottom: var(--space-4);
}

.contacto-info a {
    position: relative;
    display: inline-block;
}

.contacto-info a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-normal);
}

.contacto-info a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-instagram {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    border: 1px solid var(--text-color);
    font-size: var(--text-sm);
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: all var(--transition-normal);
    background: transparent;
    margin-top: var(--space-4);
}

.btn-instagram:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* ==========================================================================
   UTILITIES & ANIMATIONS
   ========================================================================== */
/* Social & Language */
.language-selector {
    display: flex;
    gap: var(--space-2);
}

.lang-option {
    font-size: var(--text-sm);
    letter-spacing: 1px;
    color: #999;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.lang-option:hover, .lang-option.active {
    color: var(--text-color);
}

.social-buttons {
    display: flex;
    gap: var(--space-3);
}

.social-btn {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    transition: all var(--transition-normal);
}

.social-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: var(--accent-color);
}

/* Animations classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in.active {
    opacity: 1;
}

.loading {
    text-align: center;
    padding: var(--space-12);
    font-size: var(--text-sm);
    letter-spacing: 2px;
    color: #999;
    grid-column: 1 / -1;
    text-transform: uppercase;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
}

@media (max-width: 768px) {
    :root {
        --space-16: 64px;
        --space-8: 32px;
        --space-4: 20px;
    }
    
    .landing-header {
        padding: 16px 24px;
    }
    
    .logo-text {
        height: 30px;
    }
    
    .carousel-nav-buttons {
        right: var(--space-2);
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .bottom-controls {
        padding: 0 var(--space-4);
        bottom: var(--space-2);
    }
    
    nav {
        gap: var(--space-3);
    }
    
    .nav-link {
        font-size: var(--text-xs);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .project-item {
        aspect-ratio: 4/5;
    }

    .project-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    }

    .project-overlay span {
        transform: translateY(0);
        opacity: 1;
        font-size: 13px;
        letter-spacing: 1.5px;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .modal-image-container {
        height: 45vh;
    }
    
    .about-block.text p, .contacto-info p {
        font-size: var(--text-base);
    }
}

@media (max-width: 480px) {
    .landing-header {
        padding: 12px 16px;
    }

    .logo-text {
        height: 26px;
    }
    
    .hero-zone {
        padding-top: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   PROJECT DETAIL PAGE (proyecto.html)
   ========================================================================== */
.project-page {
    margin-top: 80px; /* Altura del header */
    position: relative;
}

.back-wrap {
    position: absolute;
    top: var(--space-4);
    left: var(--space-8);
    z-index: 100;
}

.back-button {
    font-size: var(--text-sm);
    letter-spacing: 2px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition-fast);
}

.back-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width var(--transition-normal);
}

.back-button:hover {
    color: var(--accent-color);
}

.back-button:hover::after {
    width: 100%;
}

.project-slideshow {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--bg-color);
}

.slideshow-track {
    display: flex;
    transition: transform var(--transition-slow);
    touch-action: pan-y;
}

.slideshow-slide {
    min-width: 100%;
    height: clamp(350px, 75vh, 750px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    padding: var(--space-2);
    box-sizing: border-box;
}

.slideshow-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
    image-rendering: high-quality;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--text-color);
    font-size: var(--text-xl);
    cursor: pointer;
    padding: var(--space-2) var(--space-3);
    transition: all var(--transition-fast);
    border-radius: 2px;
    z-index: 10;
}

.slideshow-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.slideshow-prev { left: var(--space-4); }
.slideshow-next { right: var(--space-4); }

.slideshow-counter {
    position: absolute;
    bottom: var(--space-4);
    right: var(--space-4);
    color: var(--bg-color);
    background: rgba(0,0,0,0.6);
    padding: 6px 16px;
    font-size: var(--text-sm);
    letter-spacing: 2px;
    border-radius: 2px;
    z-index: 10;
}

.project-info {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-12) var(--space-8);
}

.project-sidebar {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding-right: var(--space-8);
    border-right: 1px solid var(--border-color);
}

.project-description-wrap {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    padding-left: var(--space-8);
}

.project-title {
    font-size: var(--text-xl);
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: var(--space-6);
    text-transform: uppercase;
}

.project-datos-item {
    margin-bottom: var(--space-2);
}

.project-datos-label {
    display: block;
    color: #999;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-datos-value {
    color: var(--text-color);
    font-size: var(--text-sm);
    letter-spacing: 1px;
}

.project-description {
    font-size: var(--text-base);
    line-height: 2.2;
    color: #333;
    font-weight: 300;
}

.project-description p {
    margin-bottom: var(--space-4);
}

.drawings-wrap {
    padding: 0 var(--space-8) var(--space-12);
    max-width: 1400px;
    margin: 0 auto;
}

.planos-title {
    font-size: var(--text-sm);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: var(--space-4);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
}

.drawings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
}

.drawing-item {
    background: #f7f7f7;
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: transform var(--transition-normal);
}

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

.drawing-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.back-wrap {
    padding: var(--space-8) var(--space-8) 0;
    max-width: 1400px;
    margin: 0 auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    letter-spacing: 2px;
    color: var(--text-color);
    text-decoration: none;
    text-transform: lowercase;
    transition: color var(--transition-fast);
}

.back-button:hover {
    color: var(--accent-color);
}

/* Lightbox specific to project */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.98);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.lightbox.active {
    display: flex;
}
.lightbox-content {
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.lightbox-close, .lightbox-nav {
    position: absolute;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
    z-index: 20;
}
.lightbox-close:hover, .lightbox-nav:hover {
    color: var(--accent-color);
}
.lightbox-close {
    top: 20px;
    right: 30px;
    font-size: 40px;
}
.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    padding: 20px;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-color);
    font-size: var(--text-sm);
    letter-spacing: 2px;
}

@media (max-width: 900px) {
    .project-info {
        flex-direction: column;
        padding: clamp(24px, 5vw, var(--space-8)) clamp(16px, 4vw, var(--space-4));
        gap: var(--space-6);
    }
    .project-sidebar {
        max-width: none;
        flex: 1 1 auto;
        border-right: none;
        padding-right: 0;
        margin-bottom: 0;
    }
    .project-description-wrap {
        max-width: none;
        flex: 1 1 auto;
        padding-left: 0;
    }
    .slideshow-slide {
        height: clamp(240px, 50vh, 420px);
    }
    .slideshow-btn {
        width: 38px;
        height: 38px;
        font-size: 20px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .slideshow-prev { left: 10px; }
    .slideshow-next { right: 10px; }
    .slideshow-counter {
        bottom: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 11px;
    }
    .back-wrap { padding: var(--space-4) clamp(16px, 4vw, var(--space-4)) 0; }
    .drawings-wrap { padding: 0 clamp(16px, 4vw, var(--space-4)) var(--space-8); }
    .drawings-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    
    .lightbox-close {
        top: 12px;
        right: 12px;
        font-size: 32px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .lightbox-nav {
        font-size: 32px;
        padding: 8px;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-counter {
        bottom: 16px;
        font-size: 11px;
    }
}

/* ==========================================================================
   GALERIA DROPBOX PAGE (galeria-dropbox.html)
   ========================================================================== */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-16) var(--space-8) var(--space-12);
}

.gallery-header {
    margin-bottom: var(--space-12);
    text-align: center;
}

.gallery-header h1 {
    font-size: var(--text-2xl);
    letter-spacing: 4px;
    font-weight: 300;
    text-transform: uppercase;
}

.gallery-subtitle {
    font-size: var(--text-sm);
    letter-spacing: 2px;
    color: #666;
    margin-top: var(--space-2);
}

.modal-gallery {
    padding: var(--space-12) var(--space-8) var(--space-8);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--space-4);
}

.modal-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition-normal);
}

.modal-image:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .gallery-container {
        padding: var(--space-16) var(--space-4) var(--space-8);
    }
    .modal-gallery {
        padding: var(--space-16) var(--space-4) var(--space-4);
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   LIGHTBOX (IMAGE VIEWER)
   ========================================================================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.98);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}
.lightbox.active { 
    display: flex; 
}
.lightbox-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-8);
    font-size: var(--text-2xl);
    font-weight: 300;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10;
    transition: color var(--transition-fast);
}
.lightbox-close:hover {
    color: var(--accent-color);
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-2xl);
    color: var(--text-color);
    cursor: pointer;
    padding: var(--space-4);
    z-index: 10;
    transition: color var(--transition-fast);
}
.lightbox-nav:hover {
    color: var(--accent-color);
}
.lightbox-prev { left: var(--space-4); }
.lightbox-next { right: var(--space-4); }
.lightbox-content {
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: high-quality;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.lightbox-counter {
    position: absolute;
    bottom: var(--space-4);
    right: var(--space-8);
    letter-spacing: 2px;
    font-size: var(--text-sm);
    color: var(--text-color);
}


/* ==========================================================================
   ABOUT GRID (Rediseño)
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: var(--space-12);
    align-items: start;
    width: 100%;
}

.about-label {
    display: inline-block;
    font-size: var(--text-sm);
    letter-spacing: 3px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-2);
}

.about-text-lead p {
    font-size: var(--text-xl);
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: var(--space-6);
    color: var(--text-color);
}

.about-text-secondary p {
    font-size: var(--text-base);
    line-height: 1.8;
    color: #555;
    font-weight: 300;
    margin-bottom: var(--space-4);
}

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    position: relative;
    padding-top: var(--space-8);
}

.about-image-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4/5;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.about-image-wrapper.offset-up {
    transform: translateY(-40px);
}

.about-image-wrapper.offset-down {
    transform: translateY(40px);
}

.about-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.about-image-wrapper:hover img {
    transform: scale(1.03);
}

/* ==========================================================================
   CONTACT GRID (Rediseño)
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: var(--space-12);
    align-items: start;
    width: 100%;
    text-align: left;
}

.contact-info-col {
    padding-right: var(--space-8);
}

.contacto-info {
    margin-bottom: var(--space-6);
}

.contacto-info strong {
    display: block;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #555; /* Better contrast */
    margin-bottom: var(--space-1);
    font-weight: 500;
}

.contacto-info p, .contacto-info a {
    font-size: var(--text-lg);
    color: var(--text-color);
    font-weight: 300;
}

.social-link {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
}

.social-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width var(--transition-normal);
}

.social-link:hover::after {
    width: 100%;
}

.contact-form-col {
    background: transparent;
}

.form-group {
    margin-bottom: var(--space-6);
    position: relative;
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #444; /* Better contrast */
    margin-bottom: var(--space-2);
    font-weight: 500;
}

.form-input, .form-textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #999; /* Visible border */
    padding: var(--space-2) 0;
    font-size: var(--text-base);
    font-family: var(--font-family);
    color: var(--text-color);
    transition: all var(--transition-fast);
    border-radius: 0;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
    box-shadow: 0 1px 0 var(--accent-color);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    border: 1px solid #999; /* Full box for textarea */
    padding: var(--space-2);
    border-radius: 2px;
}

.form-submit {
    display: block;
    width: 100%; /* Full width button */
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-sm);
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    margin-top: var(--space-4);
    border-radius: 2px;
    font-weight: 500;
}

.form-submit:hover {
    background: #b01030; /* Darker accent on hover */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 20, 60, 0.2);
}

.form-submit.loading {
    opacity: 0.7;
    pointer-events: none;
}

@media (max-width: 768px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .about-image-wrapper.offset-up,
    .about-image-wrapper.offset-down {
        transform: translateY(0);
    }

    .about-images {
        padding-top: var(--space-2);
    }

    .contact-info-col {
        padding-right: 0;
    }

    .form-input, .form-textarea {
        font-size: 16px;
    }
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: 4px;
    margin-bottom: clamp(2rem, 4vw, 4rem);
    text-align: center;
    text-transform: uppercase;
    font-weight: 300;
}

/* ==========================================================================
   ABOUT SIMPLE SECTION (sobre.html)
   ========================================================================== */
.about-simple-section {
    padding: clamp(80px, 12vh, 140px) clamp(16px, 6vw, 6%) 80px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.about-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: clamp(20px, 3vw, 40px);
    letter-spacing: 2px;
}

.about-image {
    width: 100%;
    height: auto;
    margin-bottom: clamp(20px, 3vw, 40px);
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.about-text {
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.75;
    font-weight: 300;
    color: #222;
}

.about-text p {
    margin-bottom: 24px;
}

/* ==========================================================================
   FLOATING LANGUAGE SELECTOR (GLOBAL)
   ========================================================================== */
.language-selector {
    display: flex;
    gap: 12px;
    align-items: center;
}

.language-selector.floating,
div.language-selector[style*="position: fixed"] {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 200;
}

@media (max-width: 768px) {
    div.language-selector[style*="position: fixed"] {
        bottom: 20px !important;
        right: 20px !important;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    div.language-selector[style*="position: fixed"] {
        bottom: 14px !important;
        right: 14px !important;
        padding: 4px 10px;
    }
    
    .lang-option {
        font-size: 11px;
    }
}

