/* =========== CSS PERFECTAMENTE ADAPTADO - MOBILE FIRST =========== */

/* =========== VARIABLES BASE =========== */
:root {
    /* Colores */
    --color-bg: #0a0a0a;
    --color-bg-alt: #111111;
    --color-bg-accent: #1a1a1a;
    --color-primary: #134074;
    --color-primary-dark: #0b2545;
    --color-primary-light: #8da9c4;
    --color-accent: #c9a96e;
    --color-accent-alt: #e6c89f;
    --color-accent-dark: #a88a5a;
    --color-text: #ffffff;
    --color-text-alt: #cccccc;
    --color-text-muted: #888888;
    --color-border: #333333;
    --color-border-light: #444444;

    /* Tipografía */
    --font-display: "Unbounded", cursive;
    --font-body: "Space Grotesk", sans-serif;

    /* Transiciones */
    --transition-fast: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-medium: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Bordes */
    --border-radius-sm: 2px;
    --border-radius-md: 4px;
    --border-radius-lg: 8px;
}

/* =========== RESET Y BASE - MOBILE FIRST =========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 55%;
    /* 8.8px = 1rem - MÓVIL */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.8rem;
    /* 15.84px */
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========== NAVBAR - MOBILE FIRST =========== */
.project-nav {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.2rem;
}

.project-nav-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========== HERO SECTION - MOBILE FIRST =========== */
.project-hero {
    position: relative;
    width: 100%;
    height: 40vh;
    min-height: 280px;
    overflow: hidden;
    margin-top: 5.5rem;
}

.project-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: transform var(--transition-slow);
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.2), rgba(10, 10, 10, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 1.8rem;
    z-index: 1;
}

.project-hero-content {
    width: 100%;
}

.project-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-category {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-year {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--color-text-alt);
}

.project-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    /* MÓVIL */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    color: var(--color-text);
    text-transform: uppercase;
}

.project-description {
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-text-alt);
    margin-bottom: 1.8rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(26, 26, 26, 0.7);
    color: var(--color-text-alt);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    backdrop-filter: blur(5px);
}

/* =========== INFO SECTION - MOBILE FIRST =========== */
.project-info-section {
    padding: 3.5rem 1.8rem;
    background-color: var(--color-bg-alt);
}

.section-inner {
    width: 100%;
    margin: 0 auto;
}

.project-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.project-info-card {
    padding: 2.2rem;
    border-radius: var(--border-radius-md);
}

.project-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.8rem;
}

.meta-item {
    margin-bottom: 1.5rem;
}

.meta-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.meta-value {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
}

.project-cta {
    margin-top: 2.5rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1rem;
    padding: 1.2rem 1.8rem;
    background-color: var(--color-accent);
    color: var(--color-bg);
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.project-overview {
    padding: 0 1rem;
}

.section-heading {
    font-family: var(--font-display);
    font-size: 2.2rem;
    /* MÓVIL */
    font-weight: 700;
    margin-bottom: 1.8rem;
    color: var(--color-text);
    text-transform: uppercase;
    position: relative;
    padding-left: 1.5rem;
}

.section-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    height: 70%;
    width: 0.4rem;
    background-color: var(--color-accent);
}

.overview-content {
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-text-alt);
}

.overview-content p {
    margin-bottom: 1.5rem;
}

.project-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
    margin-top: 2.5rem;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.highlight-number {
    font-family: var(--font-display);
    font-size: 2.8rem;
    /* MÓVIL */
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.8rem;
}

.highlight-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-text-alt);
    max-width: 110px;
}

/* =========== GALLERY - MOBILE FIRST =========== */
.project-gallery-section {
    padding: 3.5rem 1.8rem;
    background-color: var(--color-bg);
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: transform var(--transition-medium);
    aspect-ratio: 4/3;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.gallery-subtitle {
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--color-text-alt);
    text-align: center;
    margin-bottom: 2.5rem;
    font-style: italic;
    padding: 0 1rem;
}

.gallery-subtitle::before,
.gallery-subtitle::after {
    content: '"';
    color: var(--color-accent);
    font-size: 1.8rem;
    font-weight: 700;
}

/* =========== PROCESS - MOBILE FIRST =========== */
.project-process-section {
    padding: 3.5rem 1.8rem;
    background-color: var(--color-bg-alt);
}

.process-step {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    order: 2;
}

.step-image {
    order: 1;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3.2rem;
    /* MÓVIL */
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 1.2rem;
    opacity: 0.5;
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    /* MÓVIL */
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.2rem;
}

.step-description {
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-text-alt);
    margin-bottom: 1.5rem;
}

.step-details {
    list-style: none;
    margin-top: 1.5rem;
}

.step-details li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--color-text-alt);
}

.step-details li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    font-size: 1.1rem;
}

.step-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

/* =========== RESULTS - MOBILE FIRST =========== */
.project-results-section {
    padding: 3.5rem 1.8rem;
    background-color: var(--color-bg);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.result-card {
    padding: 1.8rem 1.2rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: transform var(--transition-medium);
}

.result-icon {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
}

.result-number {
    font-family: var(--font-display);
    font-size: 2.8rem;
    /* MÓVIL */
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.8rem;
}

.result-text {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--color-text-alt);
}

/* =========== NAVIGATION - MOBILE FIRST =========== */
.project-navigation {
    padding: 3rem 1.8rem;
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.nav-projects {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-project {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--color-bg-alt);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    width: 100%;
}

.nav-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.nav-direction {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.nav-project-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    /* MÓVIL */
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.nav-project-category {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-accent);
}

/* =========== CTA - MOBILE FIRST =========== */
.project-cta-section {
    padding: 3.5rem 1.8rem;
    background-color: var(--color-bg-alt);
}

.cta-content {
    width: 100%;
    padding: 3rem 1.8rem;
    text-align: center;
    border-radius: var(--border-radius-md);
}

.cta-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    /* MÓVIL */
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.cta-description {
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-text-alt);
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* =========== BACK TO TOP - MOBILE FIRST =========== */
.back-to-top {
    position: fixed;
    bottom: 1.8rem;
    right: 1.8rem;
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--color-accent);
    color: var(--color-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* =========== MODAL - MOBILE FIRST =========== */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 90%;
    max-height: 75%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.modal-close {
    position: absolute;
    top: -35px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 1;
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2.2rem;
    padding: 0.8rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-prev {
    left: 10px;
}

.modal-next {
    right: 10px;
}

.modal-counter {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.3rem;
}

/* =========== UTILIDADES =========== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-card {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.brutalist-border {
    border: 2px solid var(--color-text);
    position: relative;
}

.brutalist-border::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 100%;
    height: 100%;
    background-color: var(--color-accent);
    z-index: -1;
}

.brutalist-heading {
    font-family: var(--font-display);
    font-size: 3.2rem;
    /* MÓVIL */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.9;
    color: var(--color-text);
    position: relative;
    display: inline-block;
}

.brutalist-number {
    font-family: var(--font-display);
    font-size: 7rem;
    /* MÓVIL */
    font-weight: 900;
    line-height: 1;
    color: var(--color-text);
    opacity: 0.05;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: -1;
}

/* =========== SCROLLBAR =========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

/* =========== MEDIA QUERIES - PERFECTAMENTE BALANCEADAS =========== */

/* Tablet pequeña (480px+) */
@media (min-width: 480px) {
    html {
        font-size: 58%;
        /* 9.28px = 1rem */
    }

    .project-hero {
        height: 45vh;
    }

    .project-title {
        font-size: 3.2rem;
    }

    .section-heading {
        font-size: 2.4rem;
    }
}

/* Tablet (576px+) */
@media (min-width: 576px) {
    html {
        font-size: 60%;
        /* 9.6px = 1rem */
    }

    .project-hero {
        height: 50vh;
    }

    .project-title {
        font-size: 3.6rem;
    }

    .project-meta {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }

    .project-year {
        padding-left: 2rem;
        position: relative;
    }

    .project-year::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1px;
        background-color: var(--color-text-muted);
    }

    .project-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }

    .project-link {
        width: auto;
    }
}

/* Tablet grande (768px+) */
@media (min-width: 768px) {
    html {
        font-size: 62.5%;
        /* 10px = 1rem - ESTÁNDAR */
    }

    .project-hero {
        height: 60vh;
        margin-top: 7rem;
    }

    .project-title {
        font-size: 4.5rem;
        /* PERFECTO PARA TABLET */
    }

    .section-heading {
        font-size: 2.8rem;
    }

    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-projects {
        flex-direction: row;
        gap: 2rem;
    }

    .nav-project {
        width: 48%;
    }

    .highlight-number {
        font-size: 3.5rem;
    }

    .step-number {
        font-size: 4rem;
    }

    .step-title {
        font-size: 2.2rem;
    }
}

/* Escritorio (992px+) */
@media (min-width: 992px) {
    html {
        font-size: 62.5%;
        /* 10px = 1rem */
    }

    .project-hero {
        height: 70vh;
        margin-top: 8rem;
    }

    .project-title {
        font-size: 5.5rem;
        /* PERFECTO PARA ESCRITORIO */
    }

    .section-heading {
        font-size: 3.2rem;
    }

    .project-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .process-step {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .process-step:nth-child(even) .step-content {
        order: 1;
    }

    .process-step:nth-child(even) .step-image {
        order: 2;
    }

    .step-content {
        order: 1;
    }

    .step-image {
        order: 2;
    }

    .results-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .section-inner {
        max-width: 1200px;
        margin: 0 auto;
    }

    .highlight-number {
        font-size: 4rem;
    }

    .step-number {
        font-size: 5rem;
    }

    .step-title {
        font-size: 2.8rem;
    }

    .brutalist-heading {
        font-size: 4.5rem;
    }

    .brutalist-number {
        font-size: 10rem;
    }
}

/* Escritorio grande (1200px+) */
@media (min-width: 1200px) {
    .project-hero {
        height: 75vh;
    }

    .project-title {
        font-size: 6.5rem;
        /* PERFECTO PARA PANTALLAS GRANDES */
    }

    .section-heading {
        font-size: 3.6rem;
    }

    .project-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-inner {
        max-width: 1400px;
    }

    .cta-content {
        max-width: 800px;
        margin: 0 auto;
    }

    .cta-title {
        font-size: 4rem;
    }

    .highlight-number {
        font-size: 4.5rem;
    }

    .step-number {
        font-size: 6rem;
    }

    .step-title {
        font-size: 3.2rem;
    }

    .brutalist-heading {
        font-size: 5rem;
    }

    .brutalist-number {
        font-size: 12rem;
    }
}

/* Pantalla muy grande (1400px+) */
@media (min-width: 1400px) {
    .project-title {
        font-size: 7.5rem;
        /* MÁXIMO PARA PANTALLAS MUY GRANDES */
    }

    .section-heading {
        font-size: 4rem;
    }

    .cta-title {
        font-size: 4.5rem;
    }

    .highlight-number {
        font-size: 5rem;
    }

    .step-number {
        font-size: 7rem;
    }

    .step-title {
        font-size: 3.6rem;
    }

    .brutalist-heading {
        font-size: 5.5rem;
    }

    .brutalist-number {
        font-size: 14rem;
    }
}