/* ===== VARIABLES CSS ===== */
:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray: #333333;
    --color-light-gray: #666666;
    --color-accent: #ffffff;
    --color-pastel-bg: #f8f6f3;
    --color-pastel-text: #2c2a27;
    
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-black);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-logo {
    width: 140px;
    height: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(1) brightness(1.2);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.loading-text {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-white);
    letter-spacing: 0.1em;
    opacity: 0.8;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== HERO MAIN SECTION ===== */
.hero-main {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
    outline: none;
}

.hero-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
    pointer-events: none;
    object-fit: cover;
    border: none;
    outline: none;
}

/* Hide all YouTube branding and UI elements */
.hero-video::after,
.hero-video::before {
    display: none !important;
}

/* Additional YouTube hiding styles */
.video-background iframe {
    border: none !important;
    outline: none !important;
}

.video-background iframe[src*="youtube"] {
    filter: none;
    -webkit-filter: none;
}

/* Fallback for when video doesn't load */
.video-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* remove solid dark overlay at the top to allow true blending with video */
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.20) 35%,
        rgba(0,0,0,0.45) 70%,
        rgba(0,0,0,0.55) 100%
    );
    z-index: 2;
}

/* Hide YouTube title and any text overlays */
.video-background {
    overflow: hidden;
}

/* Removed the top black overlay to show full video */

.video-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 80px;
    background: transparent;
    backdrop-filter: blur(0px);
    z-index: 15;
    pointer-events: none;
}

/* Additional overlay to hide YouTube logo completely */
.video-background .youtube-logo-blocker {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 120px;
    height: 40px;
    background: transparent;
    backdrop-filter: blur(20px);
    z-index: 20;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: var(--color-white);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2rem;
}

.hero-header {
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 0.1em;
}

/* ===== HERO NAVIGATION ===== */
.hero-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    align-self: center;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.nav-btn:active {
    transform: translateY(0);
}

/* ===== SECTIONS ===== */
.section {
    min-height: 100vh;
    background: #ffffff;
    padding: 0;
    position: relative;
}

/* Gradient overlay removed - clean header design */
.section::before {
    display: none;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.5rem 1rem 0 1rem;
    position: relative;
    z-index: 2;
}

.back-btn {
    background: transparent;
    border: none;
    color: #000000;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    z-index: 10;
    pointer-events: auto;
}

.back-btn:hover {
    color: #000000;
}

.back-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #000000;
    transition: width 0.3s ease;
}

.back-btn:hover::after {
    width: 100%;
}

.section-content {
    padding: 2rem 0;
}

.section-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

/* ===== ABOUT SECTION ===== */

/* Fondo idéntico a otras secciones */
#about {
    background: #ffffff !important;
    color: #111111 !important;
    min-height: 100vh;
    padding: 0;
}

#about,
#about * {
    background-color: unset !important;
    color: inherit !important;
}

.about-hero h2,
.about-lead,
.story-section h3,
.story-section p,
.info-card h4,
.info-card p,
.info-card li {
    color: var(--color-pastel-text) !important;
}

.about-hero h2,
.about-lead,
.story-section h3,
.story-section p,
.info-card h4,
.info-card p,
.info-card li {
    color: var(--color-white) !important;
}

#about .container {
    background: transparent !important;
    max-width: 1600px;
}

#about .back-btn {
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#about .back-btn:hover {
    background: transparent !important;
    color: #000000 !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#about .back-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #000000;
    transition: width 0.3s ease;
}

#about .back-btn:hover::after {
    width: 100%;
}

/* Hero section del about */
.about-hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.about-hero h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--color-pastel-text);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.about-intro {
    max-width: 800px;
    margin: 0 auto;
}

.about-lead {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: var(--color-pastel-text);
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
}

/* Layout principal */
.about-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-image-section {
    max-width: 300px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    background-color: var(--color-black);
    padding: 1rem;
    border-radius: 12px;
}

.about-portrait {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: none;
    object-fit: contain;
    background-color: transparent;
}

/* Historia principal */
.about-story {
    font-family: 'Montserrat', sans-serif;
}

.story-section {
    margin-bottom: 3rem;
}

.story-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--color-pastel-text);
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.story-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-pastel-text);
    margin-bottom: 1.2rem;
    opacity: 0.9;
}

.story-section p strong {
    font-weight: 600;
    color: var(--color-pastel-text);
}

/* Sidebar con información */
.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background: rgba(44, 42, 39, 0.03);
    border: 1px solid rgba(44, 42, 39, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(44, 42, 39, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 42, 39, 0.1);
}

.info-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-pastel-text);
    margin-bottom: 0.8rem;
    letter-spacing: 0.01em;
}

.info-card p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-pastel-text);
    margin: 0;
    opacity: 0.8;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--color-pastel-text);
    padding: 0.4rem 0;
    position: relative;
    padding-left: 1.2rem;
    opacity: 0.8;
}

.info-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #111111;
    font-weight: bold;
}

/* Países filmados */
.countries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.country {
    background: #f3f4f6;
    color: #111111;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

/* Remove specific about section category button overrides to maintain consistency */

/* Título ALEJANDRO negro en todas las secciones */
.section .hero-title,
.section h1,
#about .hero-title,
#about h1 {
    color: #000000 !important;
    text-shadow: none !important;
}

/* Responsive para about */
@media (max-width: 1024px) {
    .about-main {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-sidebar {
        grid-row: 1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    #about {
        padding: 1.5rem 0 3rem 0;
    }
    
    .about-hero {
        margin-bottom: 3rem;
        padding: 1rem 0;
    }
    
    .about-hero h2 {
        font-size: clamp(2rem, 6vw, 3rem);
        margin-bottom: 1.5rem;
    }
    
    .about-lead {
        font-size: clamp(1rem, 3vw, 1.2rem);
    }
    
    .about-main {
        gap: 2rem;
    }
    
    .story-section {
        margin-bottom: 2rem;
    }
    
    .story-section h3 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .story-section p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .info-card {
        padding: 1.2rem;
    }
    
    .info-card h4 {
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }
    
    .about-sidebar {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

@media (max-width: 480px) {
    .about-hero {
        margin-bottom: 2rem;
    }
    
    .about-hero h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
    
    .about-lead {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
    }
    
    .story-section h3 {
        font-size: 1.3rem;
    }
    
    .story-section p {
        font-size: 0.95rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .countries {
        gap: 0.3rem;
    }
    
    .country {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #333, #666);
    position: relative;
    overflow: hidden; /* ensure inner media covers fully without overflow */
}

/* Make preview thumbnails cover the full card area */
.project-image img {
    position: absolute;
    inset: 0;                  /* top:0; right:0; bottom:0; left:0 */
    width: 100%;
    height: 100%;
    object-fit: cover;         /* full bleed (no letterbox) */
    display: block;
}

.project-image::after {
    content: '🎬';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.5;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-info p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.project-year {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .loading-logo {
        width: 100px;
        height: 100px;
    }
    
    .loading-text {
        font-size: 0.9rem;
    }
    
    .hero-content {
        padding: 1.5rem 1rem;
        justify-content: space-between;
        min-height: 100vh;
    }
    
    .hero-header {
        margin-top: 2rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 2.8rem);
        margin-bottom: 0.8rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: clamp(0.8rem, 2vw, 1rem);
        line-height: 1.4;
    }
    
    .hero-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        margin-bottom: 3rem;
        padding: 0 1rem;
    }
    
    .nav-btn {
        padding: 1rem 0.8rem;
        font-size: 0.85rem;
        min-width: auto;
        text-align: center;
        border-radius: 6px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .about-text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .about-text p {
        margin-bottom: 1.2rem;
    }
    
    .about-info h3 {
        font-size: 1.2rem;
        margin: 1.5rem 0 0.8rem 0;
    }
    
    .about-info li {
        padding: 0.4rem 0;
        font-size: 0.95rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        margin: 0 0.5rem;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-info {
        padding: 1.2rem;
    }
    
    .project-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    .project-info p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }
    
    .project-year {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .section-content {
        padding: 1.5rem 0;
    }
    
    .section-content h2 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        margin-bottom: 2rem;
    }
    
    .back-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        width: 80px;
        height: 80px;
    }
    
    .loading-text {
        font-size: 0.8rem;
    }
    
    .hero-content {
        padding: 1rem 0.8rem;
        justify-content: space-between;
        min-height: 100vh;
    }
    
    .hero-header {
        margin-top: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 7vw, 2.2rem);
        margin-bottom: 0.6rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
        line-height: 1.3;
    }
    
    .hero-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }
    
    .nav-btn {
        padding: 0.8rem 0.5rem;
        font-size: 0.75rem;
        min-width: auto;
        text-align: center;
        border-radius: 4px;
        line-height: 1.2;
    }
    
    .about-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .about-text p {
        margin-bottom: 1rem;
    }
    
    .about-info h3 {
        font-size: 1.1rem;
        margin: 1.2rem 0 0.6rem 0;
    }
    
    .about-info li {
        padding: 0.3rem 0;
        font-size: 0.85rem;
    }
    
    .projects-grid {
        gap: 1.2rem;
    }
    
    .project-card {
        margin: 0 0.2rem;
    }
    
    .project-image {
        height: 160px;
    }
    
    .project-info {
        padding: 1rem;
    }
    
    .project-info h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .project-info p {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 0.7rem;
    }
    
    .project-year {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
    
    .container {
        padding: 0 0.8rem;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    .section-content {
        padding: 1rem 0;
    }
    
    .section-content h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 1.5rem;
    }
    
    .back-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
}

/* ===== MOBILE LANDSCAPE ADJUSTMENTS ===== */
@media (max-width: 768px) and (max-height: 500px) {
    .hero-content {
        justify-content: center;
        gap: 2rem;
        padding: 1rem;
    }
    
    .hero-nav {
        margin-bottom: 1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeIn 1s ease-out 0.5s both;
}

.project-card {
    animation: fadeIn 0.6s ease-out both;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

/* ===== NEW HORIZONTAL HEADER LAYOUT ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Left: Title + Navigation */
.header-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.header-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.02em;
    margin: 0;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.category-btn {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    text-decoration: none;
    letter-spacing: 0.01em;
    padding: 0.5rem 0;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    text-transform: capitalize;
    background: transparent;
    white-space: nowrap;
}

.category-btn:hover {
    color: #000000;
}

.category-btn.active {
    color: #000000;
}

.category-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #000000;
    transition: width 0.3s ease;
}

.category-btn:hover::after,
.category-btn.active::after {
    width: 100%;
}

/* Center: Social Networks */
.header-center {
    display: flex;
    justify-content: center;
    flex: 1;
}

.social-networks {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #000000;
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px;
}

.social-btn:hover {
    color: #666666;
    transform: translateY(-2px);
}

.social-btn i {
    display: block;
}

/* Right: Back Button */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-right .back-btn {
    margin-bottom: 0;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}

/* Responsive for new horizontal header */
@media (max-width: 1024px) {
    .section-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .header-left {
        gap: 2rem;
    }
    
    .header-nav {
        gap: 1.5rem;
    }
    
    .header-title {
        font-size: 1.5rem;
    }
    
    .social-networks {
        gap: 0.8rem;
    }
    
    .social-btn {
        width: 35px;
        height: 35px;
        font-size: 0.6rem;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
        align-items: center;
    }
    
    .header-left {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .header-nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header-center {
        order: -1;
        flex: none;
    }
    
    .header-right {
        order: 1;
    }
    
    .category-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }
    
    .header-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .section-header {
        padding: 0.8rem;
        gap: 1rem;
    }
    
    .header-nav {
        gap: 0.8rem;
    }
    
    .category-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0;
    }
    
    .header-title {
        font-size: 1.1rem;
    }
    
    .social-networks {
        gap: 0.6rem;
    }
    
    .social-btn {
        width: 30px;
        height: 30px;
        font-size: 0.55rem;
    }
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== LIGHT THEME OVERRIDES (Frontend) ===== */
:root {
    --color-black: #000000;
    --color-white: #ffffff;
}

/* Global */
body {
    background: #ffffff;
    color: #111111;
}

/* Sections */
.section {
    background: #ffffff;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=Montserrat:wght@300;400;500;600&display=swap');

body, .category-btn, .nav-btn, .back-btn, .project-info p {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

h1, h2, h3, h4,
.about-hero h2,
.info-card h4,
.story-section h3,
.project-description h2,
.section-title {
    font-family: 'Cormorant Garamond', serif;
    color: #111111;
}

/* About section to light */
#about,
#about * {
    background-color: unset !important;
    color: inherit !important;
}
#about {
    background: #ffffff !important;
    color: #111111 !important;
}
#about .container {
    background: transparent !important;
}
.about-hero h2,
.about-lead,
.story-section h3,
.story-section p,
.info-card h4,
.info-card p,
.info-card li {
    color: #111111 !important;
}
.about-lead,
.story-section p,
.info-card p,
.info-card li {
    color: #374151 !important; /* gray-700 */
}
.about-image-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}
.info-card {
    background: #f9fafb !important; /* gray-50 */
    border: 1px solid #e5e7eb !important; /* gray-200 */
    box-shadow: none;
}
.info-card:hover {
    background: #f3f4f6 !important; /* gray-100 */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.country {
    background: rgba(212, 175, 55, 0.08);
    color: #8b7355;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Category nav inside sections (light) */
.section-categories {
    border-bottom: 1px solid #e5e7eb;
}
.category-btn {
    color: #000000 !important;
    background: transparent !important;
    border: none !important;
}
.category-btn:hover {
    color: #000000 !important;
    background: transparent !important;
    border: none !important;
}
.category-btn.active {
    color: #000000 !important;
    background: transparent !important;
    border: none !important;
}

/* Back button */
.back-btn {
    border: none !important;
    color: #000000 !important;
    background: transparent !important;
    z-index: 10;
    pointer-events: auto;
}
.back-btn:hover {
    background: transparent !important;
    color: #000000 !important;
    border: none !important;
}

/* Project cards (home lists) */
.project-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}
.project-card:hover {
    background: #ffffff;
    border-color: #d1d5db; /* gray-300 */
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.project-image {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}
.project-info h3 {
    color: #111111;
}
.project-info p {
    color: #374151;
}
.project-year {
    background: #f3f4f6;
    color: #111111;
}

/* Ensure hero nav remains legible over video */
.nav-btn {
    color: #ffffff;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.25);
}
.nav-btn:hover {
    background: rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.45);
}

/* ===== PROJECT GRID REDESIGN: Large previews + hover overlay ===== */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* two big tiles */
    gap: 32px; /* increased center separation without shrinking tiles */
    width: calc(100% + 16px); /* expand slightly to keep tile size while leaving small side gutters */
    margin-left: -8px;        /* leave small side space */
    margin-right: -8px;
}

.projects-grid .project-card {
    position: relative;
    overflow: hidden;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    margin: 0 !important;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.projects-grid .project-card:hover {
    transform: translateY(-2px);
}

/* 16:9 media container */
.projects-grid .project-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    overflow: hidden;
}

/* Ensure media fills area */
.projects-grid .project-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: saturate(0.9) contrast(0.98) brightness(0.95);
}

/* Remove previous placeholder icon */
.projects-grid .project-image::after {
    content: none !important;
    display: none !important;
}

/* Details overlay */
.projects-grid .project-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.50) 45%, rgba(0,0,0,0) 75%);
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none; /* keep click on card */
}

.projects-grid .project-info h3,
.projects-grid .project-info p,
.projects-grid .project-info .project-year {
    color: #fff !important;
}

.projects-grid .project-info .project-year {
    align-self: flex-start;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}

/* Show overlay on hover/focus */
.projects-grid .project-card:hover .project-info,
.projects-grid .project-card:focus-within .project-info {
    opacity: 1;
    transform: translateY(0);
}

/* High-contrast hover treatment */
.projects-grid .project-card:hover .project-image img {
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.10) brightness(0.92);
}

.projects-grid .project-card:hover {
    box-shadow: inset 0 0 0 2px #ffffff;
}

/* Improve overlay text contrast */
.projects-grid .project-info h3 {
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.projects-grid .project-info h3,
.projects-grid .project-info p,
.projects-grid .project-info .project-year {
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* Optional call-to-action - removed hardcoded text, will be handled by JavaScript */
.projects-grid .project-info::after {
    content: '';
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 860px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;        /* reset expansion */
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 600px) {
    .projects-grid .project-info {
        padding: 1rem;
    }
}

/* ===== HERO ADAPTIVE CONTRAST ===== */
.hero-header {
    position: relative;
    isolation: isolate; /* ensure blend computes against video/backdrop, not siblings */
}
.hero-header::before {
    content: none; /* remove extra dark layer that looked like a black overlay */
}
.hero-title,
.hero-subtitle {
    position: relative;
    z-index: 1;
    color: #ffffff !important;
    mix-blend-mode: difference;
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

/* ===== STILLS GALLERY ===== */
.stills-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-top: 2rem !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
}

.still-card {
    background: #f8f9fa !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: transform 0.3s ease !important;
    box-shadow: none !important;
    height: auto !important;
}

.still-card:hover {
    transform: scale(1.02) !important;
}

.still-image {
    aspect-ratio: 16/9 !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
}

.still-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.still-info {
    padding: 1rem !important;
    background: #ffffff !important;
}

.still-info h3 {
    color: #333 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* Responsive design for stills */
@media (max-width: 1024px) {
    .stills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 640px) {
    .stills-grid {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 15px !important;
    }
}

/* ===== BIOGRAFIA ESTILO ERNESTO TRUJILLO ===== */
.biografia-ernesto-style {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background: #ffffff;
    color: #000000;
    min-height: 80vh;
}

.biografia-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: start;
    margin-bottom: 3rem;
}

.biografia-text {
    padding-right: 2rem;
}

.biografia-main-title {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 400;
    line-height: 1.4;
    color: #000000;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

/* Estilos para contenido HTML formateado desde Quill.js */
.biografia-main-title p {
    margin-bottom: 1.5rem;
    color: #000000;
    line-height: 1.6;
}

.biografia-main-title h1,
.biografia-main-title h2,
.biografia-main-title h3,
.biografia-main-title h4,
.biografia-main-title h5,
.biografia-main-title h6 {
    font-family: 'Cormorant Garamond', serif;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.biografia-main-title h1 { font-size: 2.5rem !important; }
.biografia-main-title h2 { font-size: 2rem !important; }
.biografia-main-title h3 { font-size: 1.5rem !important; }
.biografia-main-title h4 { font-size: 1.25rem !important; }
.biografia-main-title h5 { font-size: 1.1rem !important; }
.biografia-main-title h6 { font-size: 1rem !important; }

.biografia-main-title strong {
    font-weight: 600 !important;
    color: #000000;
}

.biografia-main-title em {
    font-style: italic !important;
}

.biografia-main-title ul,
.biografia-main-title ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.biografia-main-title li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.biografia-main-title a {
    color: #000000;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.biografia-main-title a:hover {
    opacity: 0.7;
}

/* Soporte para estilos inline de Quill.js */
.biografia-main-title [style*="text-align: center"] {
    text-align: center !important;
}

.biografia-main-title [style*="text-align: left"] {
    text-align: left !important;
}

.biografia-main-title [style*="text-align: right"] {
    text-align: right !important;
}

.biografia-main-title [style*="text-align: justify"] {
    text-align: justify !important;
}

/* Soporte para tamaños de Quill.js */
.biografia-main-title .ql-size-small {
    font-size: 0.75em !important;
}

.biografia-main-title .ql-size-large {
    font-size: 1.5em !important;
}

.biografia-main-title .ql-size-huge {
    font-size: 2.5em !important;
}

/* Soporte para fuentes de Quill.js */
.biografia-main-title .ql-font-arial {
    font-family: Arial, sans-serif !important;
}

.biografia-main-title .ql-font-cormorant-garamond {
    font-family: 'Cormorant Garamond', serif !important;
}

.biografia-main-title .ql-font-montserrat {
    font-family: 'Montserrat', sans-serif !important;
}

.biografia-main-title .ql-font-times-new-roman {
    font-family: 'Times New Roman', serif !important;
}

/* Soporte para colores inline */
.biografia-main-title [style*="color:"] {
    color: inherit !important;
}

.biografia-main-title [style*="background-color:"] {
    background-color: inherit !important;
}

/* Preservar todos los estilos inline */
.biografia-main-title * {
    font-size: inherit !important;
    color: inherit !important;
    background-color: inherit !important;
    text-align: inherit !important;
    font-family: inherit !important;
}

/* Reset específico para elementos con estilos inline */
.biografia-main-title *[style] {
    font-size: revert !important;
    color: revert !important;
    background-color: revert !important;
    text-align: revert !important;
    font-family: revert !important;
}

.biografia-details {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.7;
    color: #000000;
    margin-bottom: 2rem;
}

.biografia-details p {
    margin-bottom: 1.5rem;
}

.biografia-contact-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    justify-items: start;
}

.biografia-contact:nth-child(2) {
    justify-self: center;
}

.biografia-contact:nth-child(3) {
    justify-self: end;
}

.biografia-contact {
    color: #000000;
}

.biografia-contact h4 {
    margin-bottom: 0.75rem;
    color: #000000;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-primary);
}

.biografia-contact p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #000000;
    line-height: 1.5;
}

.biografia-link {
    color: #000000;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.biografia-link:hover {
    opacity: 0.7;
}

/* Responsive para la sección de contacto */
@media (max-width: 768px) {
    .biografia-contact-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        justify-items: start;
    }
    
    .biografia-contact:nth-child(1),
    .biografia-contact:nth-child(2),
    .biografia-contact:nth-child(3) {
        justify-self: start;
        width: 100%;
        text-align: left;
    }
    
    .biografia-contact {
        padding: 1rem 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .biografia-contact:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .biografia-contact-section {
        gap: 1rem;
        padding-top: 1rem;
    }
    
    .biografia-contact {
        padding: 0.75rem 0;
    }
    
    .biografia-contact h4 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .biografia-contact p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
}

.biografia-image {
    position: sticky;
    top: 2rem;
}

.biografia-portrait {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.biografia-portrait:hover {
    filter: grayscale(0%);
}

.biografia-social {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.biografia-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #000000;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.biografia-social-link:hover {
    background: #333333;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .biografia-content {
        grid-template-columns: 1fr 300px;
        gap: 3rem;
    }
    
    .biografia-text {
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    .biografia-ernesto-style {
        padding: 3rem 1.5rem;
    }
    
    .biografia-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .biografia-text {
        padding-right: 0;
        order: 2;
    }
    
    .biografia-image {
        order: 1;
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .biografia-main-title {
        font-size: clamp(1.5rem, 4vw, 2.2rem);
        margin-bottom: 1.5rem;
    }
    
    .biografia-details {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .biografia-ernesto-style {
        padding: 2rem 1rem;
    }
    
    .biografia-main-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
        line-height: 1.3;
    }
    
    .biografia-details {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .biografia-social {
        justify-content: center;
        gap: 1rem;
    }
    
    .biografia-social-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* ===== SOCIAL LINKS STYLES ===== */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.social-link i {
    width: 1.25rem;
    text-align: center;
}

/* ===== PROJECT FOOTER STYLES ===== */
.project-footer {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
}

.footer-logo span:first-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111111;
}

.footer-logo span:last-child {
    font-size: 0.8rem;
    color: #6b7280;
    letter-spacing: 0.1em;
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: #111111;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .footer-nav a {
        font-size: 0.8rem;
    }
}
