/* ==========================================================================
     Tipografias
     ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bitter&display=swap');

    h1, h2, h3 {
        margin-bottom: var(--spacing-unit);
    }


/* ==========================================================================
     Variables y Estilos Base
     ========================================================================== */
:root {
    --color-primary: #007bff;
    --color-secondary: #6c757d;
    --color-background: #ffffff;
    --color-text: #000000;
    --color-gray: #666666;
    --grid-gap: 16px;
    --container-padding: 16px;
    --container-width-mobile: calc(100% - (var(--container-padding) * 2));
    --container-width-tablet: 768px;
    --container-width-desktop: 1200px;
    
    /* Theme colors */
    --theme-background: #FFFFFF;
    --theme-text: #131313;
    --theme-text-secondary: #8D8D8D;
    --theme-surface: #f0f0f0;
        --theme-border: #a0a0a0;
        --theme-border-strong: #666666;
    --theme-overlay: rgba(255, 255, 255, 0.8);
    --theme-transition-duration: 0.3s;
    --theme-transition-timing: ease;
}

* {
    box-sizing: border-box;
}
body {
    font-family: 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.4;
    color: var(--theme-text);
    background-color: var(--theme-background);
    margin: 0;
    transition: background-color var(--theme-transition-duration) var(--theme-transition-timing),
                color var(--theme-transition-duration) var(--theme-transition-timing);
    letter-spacing: 0.03em;
        min-height: 100vh;
    display: flex;
        flex-direction: column;
        height: 100%;
    }

    a {
        position: relative;
        text-decoration: none;
    }
    a:focus { /* Quita el contorno por defecto */
        outline: none;
    }
    a:focus-visible { /* Mantiene el contorno visible solo para la navegación por teclado */
        outline: 2px solid #000;
        outline-offset: 2px;
    }
    a::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 1px;
        bottom: -0.3em;
        left: 0;
        background-color: currentColor;
        transform-origin: left;
        transform: scaleX(0);
        transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    a:has(img)::after,
    a.project__image-container::after {
        display: none;
    }
    a:hover::after {
        transform: scaleX(1);
    }
    a:not(:hover)::after { /* Cuando no está sobre el enlace, el efecto se aplica desde la derecha */
        transform-origin: right;
        transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
 
    [data-theme="dark"] { /* Variables Tema Oscuro */
        --theme-background: #131313;
        --theme-text: #FFFFFF;
        --theme-text-secondary: #8D8D8D;
        --theme-surface: #1E1E1E;
        --theme-border: #2F2F2F;
        --theme-border-strong: #FFFFFF;
        --theme-overlay: rgba(19, 19, 19, 0.8);
    }

    ::selection { /* Color de selección para tema claro */
        background-color: #131313;
        color: #FFFFFF;
    }
        
    [data-theme="dark"] ::selection { /* Color de selección para tema oscuro */
        background-color: #FFFFFF;
        color: #131313;
    }


/* ==========================================================================
     Contenedor principal
     ========================================================================== */
    .page-content {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        opacity: 0;
        transform: translateY(80px);
    }
    .page-content.loaded {
        animation: fadeInUp 0.5s ease-out forwards;
    }
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(160px);  /* Increased starting position */
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .about-container, 
    .contact-container { /* contenedores de "Sobre mí" y "Contacto" */
        margin: 0 auto;
        padding: 86px 0 0;
    }


/* ==========================================================================
     Sistema de Grid para Proyectos (Home)
     ========================================================================== */
.projects {
        max-width: 1200px; 
    width: 100%;
        margin: 0 auto;
        padding: var(--container-padding) 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
}
.project {
    grid-column: span 4;
    margin-bottom: 24px;
}
.project:last-child {
    margin-bottom: 0;
}
.project--hidden {
    display: none;
}
.project__image-container {
    width: 100%;
    aspect-ratio: 3/2;
    border-radius: 8px;
        overflow: hidden;  /* Contiene la imagen escalada */
    margin-bottom: 8px;
        display: block;  /* Hace que el enlace se comporte como un elemento de bloque */
        text-decoration: none;  /* Elimina el subrayado del enlace */
    }
    .project__image-container::after {  /* Excluye el enlace de la imagen del efecto de subrayado */
        display: none;
}

.project__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); /* Efecto de zoom suave */
}
    .project__image-container:hover .project__image {
        transform: scale(1.05); /* Efecto de zoom suave */
}
.project__title {
    color: var(--theme-text);
        font-family: "Albert Sans";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    margin: 0;
    margin-bottom: 4px;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

.project__description {
    color: var(--theme-text-secondary);
    font-family: "Albert Sans";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

    @media (min-width: 701px) {
        .projects {
            max-width: fit-content; 
            width: 100%;
    margin: 0 auto;
            padding: var(--container-padding) 16px;
    display: grid;
            grid-template-columns: repeat(8, 1fr);
    gap: var(--grid-gap);
        }
    } 
    @media (min-width: 768px) {
        .projects {
    width: 100%;
            padding: var(--container-padding);
        }
    }
    @media (min-width: 1200px) {
        .projects {
            max-width: fit-content;
            width: 100%;
            margin: 0 auto;
            padding: var(--container-padding) 16px;
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: var(--grid-gap);
        }
        .project {
            grid-column: span 6;
            margin-bottom: 24px;
        }
    }
    

/* ==========================================================================
     Header
     ========================================================================== */
    .header {
        display: flex;
    justify-content: space-between;
        align-items: center;
        padding: 0 var(--container-padding);
        height: 56px;
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: var(--theme-background);
        transition: background-color var(--theme-transition-duration) var(--theme-transition-timing);
    }
    .header__title {
        font-size: 16px;
        font-weight: 500;
        letter-spacing: 0.03em;
    }
    .header__title-link {
        color: var(--theme-text);
    }
    .header__title-link::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 1px;
        bottom: -0.3em;  /* Closer underline for header */
        left: 0;
        background-color: currentColor;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform var(--theme-transition-duration) var(--theme-transition-timing);
    }
    .header__menu-button-theme-switcher,
    .header__menu-button-language-switcher {
        width: 24px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .header__menu-button {
        width: 24px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .header__menu-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 24px;
    }
    .header__menu-links-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 24px;
    }
    .header__menu-buttons-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 24px;
    }
    .header__menu-icon {
        display: block;
        filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(153deg) brightness(7%) contrast(95%);
        transition: filter 0.3s ease;
    }
    [data-theme="dark"] .header__menu-icon {
        filter: brightness(0) saturate(100%) invert(1);  /* Hace que el icono del menú sea blanco en el tema oscuro */
    }

    @media (max-width: 700px) {
        /* Hide .header__menu-container on screens smaller than 700px */
        .header__menu-container {
            display: none;
        }
    }
    @media (min-width: 701px) {
        /* Hide .header__menu-button on screens larger than 700px */
        .header__menu-button {
            display: none;
        }
    }
    

/* ==========================================================================
     Desplegable de idiomas
     ========================================================================== */
    .header__language-container {
        position: relative;
        z-index: 11;
    }

    .header__language-options {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--theme-background);
        border-radius: 0px 0px 8px 8px;
        padding: 8px;
        margin-top: 16px;
        flex-direction: column;
        gap: 8px;
        z-index: 11;
        display: none;  /* Hide by default */
        transition: background-color var(--theme-transition-duration) var(--theme-transition-timing);
    }

    .header__language-options.is-active {
        display: flex;  /* Show when active */
    }

    .header__language-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px;
        border: none;
        background: none;
        cursor: pointer;
        width: 100%;
        color: var(--theme-text);
        transition: background-color var(--theme-transition-duration) var(--theme-transition-timing),
                    color var(--theme-transition-duration) var(--theme-transition-timing);
    }

    .header__language-option:hover {
        background-color: var(--theme-surface);
    }

    .header__language-flag {
        object-fit: cover;
        filter: none !important;
        transform: translateZ(1px);
    }

    .header__language-text {
        font-family: "Albert Sans";
        font-size: 16px;
        font-weight: 500;
        letter-spacing: 0.03em;
    }

    .header__language-option:hover {
        background-color: var(--theme-surface);
    }

    .header__language-option--active {
        color: var(--theme-text-secondary);
        cursor: default;
    }

    .header__language-option--active:hover {
        background-color: transparent;
    }


/* ==========================================================================
     Menú de navegación para "Categorías"
     ========================================================================== */
    .categories {
        padding: 0.5rem 1rem;
        margin-top: 24px;
    }
    .categories__list {
        display: flex;
        flex-wrap: wrap; 
        list-style: none;
        gap: 16px;
        row-gap: 4px;
    }
    .categories__item {
        min-width: max-content;
    }
    .categories__link {
        color: var(--theme-text);
    text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        padding: 0.25rem 0;
        display: inline-block;
        transition: color var(--theme-transition-duration) var(--theme-transition-timing);
        letter-spacing: 0.03em;
    }
    .categories__link::after {
        background-color: var(--theme-text);  /* Color por defecto para los enlaces de categoría */
        bottom: -0.05em;
    }
    
    .categories__link--active { /* Color de la categoría activa en el tema claro */
        color: #0021A5;
        pointer-events: none;
    }
    .categories__link--active::after {
        background-color: #0021A5;
    }
    
    [data-theme="dark"] .categories__link--active { /* Color de la categoría activa en el tema oscuro */
        color: #4399FF;
    }

    [data-theme="dark"] .categories__link--active::after {
        background-color: #4399FF;
    }
    
    /* ==========================================================================
       Menú Overlay
       ========================================================================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Modern viewport units that account for mobile browser UI */
    height: 100dvh;
    background-color: var(--theme-background);
    z-index: 1000;
    display: none;
}
.menu-overlay.is-active {
    display: block;
}
.menu-overlay__content {
    height: 100dvh;
    padding: 16px;
    padding-top: 0px;
    display: flex;
    flex-direction: column;
    /* Ensure content is scrollable if needed */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.menu-overlay__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}
.menu-overlay__title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}
.menu-overlay__title-link {
    color: var(--theme-text);
    text-decoration: none;
}
.menu-overlay__close {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-overlay__close-icon {
    filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(153deg) brightness(7%) contrast(95%);
    transition: filter 0.3s ease;
}

    [data-theme="dark"] .menu-overlay__close-icon { /* cambia el color del icono del menú en el tema oscuro */
        filter: brightness(0) saturate(100%) invert(1);
}

.menu-overlay__nav {
    margin-top: 8px;
}
.menu-overlay__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
    .menu-overlay__list li {
        margin: 4px 0px;
    }
.menu-overlay__link {
        font-family: "Albert Sans", sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: var(--theme-text);
    text-decoration: none;
        position: static;
    letter-spacing: 0.03em;
}
    .menu-overlay__link--active {
        color: var(--theme-text-secondary);
    } 
.menu-overlay__footer {
    margin-top: auto;
    /* Add padding for iOS safe area */
    padding-bottom: env(safe-area-inset-bottom, 1rem);
}
    
.menu-overlay__language-switcher,
    .menu-overlay__theme-switcher { /* Quita el estilo por defecto de los botones */
    display: flex;
    align-items: center;
    font-size: 32px;
    font-weight: 500;
    color: var(--theme-text);
    padding: 4px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Albert Sans";
    font-style: normal;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}
.menu-overlay__option-icon {
    width: 40px; 
    height: 40px;
    filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(153deg) brightness(7%) contrast(95%);
    transition: filter 0.3s ease;
}

    [data-theme="dark"] .menu-overlay__option-icon { /* Cambia el color del icono en el tema oscuro */
        filter: brightness(0) saturate(100%) invert(1);  
}
.menu-overlay__option-text {
    font-family: "Albert Sans";
    font-size: 32px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.03em;
}
.theme-switch {
    position: relative;
    width: 40px;
    height: 40px;
}
.theme-switch__background {
    transition: fill 0.3s ease;
}
.theme-switch__toggle {
    transition: transform 0.3s ease, fill 0.3s ease;
    transform-origin: center;
}

    [data-theme="dark"] .theme-switch__background { /* Estados del tema oscuro */
    fill: #333333;
}
[data-theme="dark"] .theme-switch__toggle {
    fill: white;
    transform: translateX(12px);
}

.menu-overlay__languages {
    position: relative;
    margin-bottom: 4px;
}

.menu-overlay__language-active {
    display: flex;
    align-items: center;
    font-size: 32px;
    font-weight: 500;
    color: var(--theme-text);
    padding: 4px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Albert Sans";
    font-style: normal;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

.menu-overlay__language-options {
    display: flex;
    flex-direction: column-reverse;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    bottom: 100%;
    left: 40px;
    transform: translateX(-50%);
    transition: transform 0.5s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.3s ease;
    padding-bottom: 8px;
}

.menu-overlay__language-options.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.menu-overlay__language-option {
    display: flex;
    align-items: center;
    font-size: 32px;
    font-weight: 500;
    color: var(--theme-text-secondary);
    padding: 4px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Albert Sans";
    font-style: normal;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
    white-space: nowrap;
}


/* ==========================================================================
     Loading Overlay
     ========================================================================== */
    .loading-overlay {
        position: fixed;
        top: 56px;  /* Start below the header height */
        left: 0;
        width: 100%;
        height: calc(100% - 56px);  /* Subtract header height */
        background-color: var(--theme-background);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9;  /* Below header (z-index: 10) but above content */
        transition: opacity 0.3s ease-out;
    }
    .loading-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }
    .loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid var(--theme-surface);
        border-top: 3px solid var(--theme-text);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }


/* ==========================================================================
     Estilos para la página "Sobre mí"
     ========================================================================== */
    .about-container {
        margin: 0 auto;
        padding: 86px 0 0;
    }
    
    .about-images {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 0 16px;
        margin-bottom: 32px;
    }
    
    .about-image-container {
        aspect-ratio: 2 / 3;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .about-image {
        width: 100%;
        height: 100%;
        background-color: var(--theme-surface);
        border-radius: 8px;
    }
    
    .desktop-only {
        display: none;
    }
    
    .about-section {
        padding: 0 16px;
        margin-bottom: 60px;
        border-top: 1px solid var(--theme-border);
    }
    .about-section:last-child {
        margin-bottom: -28px;
    }
    
    .about-intro {
        border-top: none;
    }
    
    .about-intro__title {
        font-family: "Albert Sans", sans-serif;
        font-size: 24px;
        line-height: 1.4;
        color: var(--theme-text);
        margin: 16px 0 0 0;
        font-weight: 400;
        max-width: 680px;
    }
    
    .about-section__title {
        font-family: "Albert Sans", sans-serif;
        font-size: 16px;
        font-weight: 400;
        margin: 16px 0 24px 0;
        color: var(--theme-text);
    }
    
    .about-services__list {
        list-style: none;
        padding: 0;
        margin: 0;
        font-family: "Albert Sans", sans-serif;
        font-size: 16px;
        color: var(--theme-text);
    }
    
    .about-services__list li {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    .about-vision__text,
    .about-location__text {
        font-family: "Albert Sans", sans-serif;
        font-size: 20px;
        color: var(--theme-text);
        margin: 0 0 24px 0;
        max-width: 830px;
    }
    
    .theme-shapes {
        display: flex;
        gap: 16px;
    }
    
    .theme-shape {
        width: 40px;
        height: 40px;
    }
    
    .theme-circle {
        border-radius: 50%;
    }
    
    /* Light theme colors */
    .theme-shape--dark {
        background-color: #131313;
    }
    
    .theme-shape--blue {
        background-color: #0021A5;
    }
    
    /* Dark theme colors */
    [data-theme="dark"] .theme-shape--dark {
        background-color: #FFFFFF;
    }
    
    [data-theme="dark"] .theme-shape--blue {
        background-color: #4399FF;
    }
    
    @media (min-width: 700px) {
        .about-images {
            grid-template-columns: repeat(3, 1fr);
        }
        
        .desktop-only {
            display: block;
        }
    }


/* ==========================================================================
     Estilos para la página "Contacto"
     ========================================================================== */
    .contact-container {
        margin: 0 auto;
        padding: 86px 16px;
        width: 100%;
        max-width: 100%;
    }
    .contact-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .contact-text {
        font-family: "Albert Sans", sans-serif;
        font-size: 21px;
        line-height: 1.4;
        font-weight: 400;
        color: var(--theme-text);
        margin: -48px 0 0;  /* Default margin for mobile */
        max-width: 680px;
    }
    .contact-text p {
        margin: 0 0 24px 0;
    }
    .contact-text p:last-of-type {
        margin-bottom: 24px;
    }
    .contact-email {
        display: inline-block;
        color: #0021A5;
        text-decoration: none;
        font-family: "Albert Sans", sans-serif;
        font-weight: 500;
    position: relative;
}
    .contact-email::after {
        content: '';
    position: absolute;
        width: 100%;
        height: 1px;
        bottom: -4px;  /* Match the header links distance */
        left: 0;
        background-color: currentColor;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform var(--theme-transition-duration) var(--theme-transition-timing);
    }
    .contact-email:hover::after {
        transform: scaleX(1);
    }
    [data-theme="dark"] .contact-email {
        color: #4399FF;
    }


/* ================= Estilos para el formulario ================= */
    .form-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .form-group {
        display: flex;
    flex-direction: column;
        gap: 4px;
    }

    .form-group--full {
        grid-column: 1 / -1;
    }

    .form-label {
        font-family: "Albert Sans", sans-serif;
        font-size: 14px;
        color: var(--theme-text);
    }

    .form-input {
        font-family: "Albert Sans", sans-serif;
        font-size: 16px;
        padding: 12px;
        border: 1px solid var(--theme-border);
        background: var(--theme-background);
        color: var(--theme-text);
        transition: border-color var(--theme-transition-duration) var(--theme-transition-timing),
                    background-color var(--theme-transition-duration) var(--theme-transition-timing),
                    color var(--theme-transition-duration) var(--theme-transition-timing);
    }

    .form-input--textarea {
        min-height: 120px;
        resize: vertical;
    }

    .form-input:focus {
        outline: none;
        border-color: var(--theme-text);
    }

    .form-submit {
        width: 100%;
        padding: 16px;
        background: var(--theme-text);
        color: var(--theme-background);
    border: none;
        font-family: "Albert Sans", sans-serif;
        font-size: 16px;
        font-weight: 400;
    cursor: pointer;
        transition: opacity var(--theme-transition-duration) var(--theme-transition-timing),
                    background-color var(--theme-transition-duration) var(--theme-transition-timing),
                    color var(--theme-transition-duration) var(--theme-transition-timing);
    }

    .form-submit:hover {
        opacity: 0.9;
    }

    @media (min-width: 768px) {
        .contact-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin-top: -24px;
        }

        .form-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .contact-container {
            max-width: 1080px;  /* Good width for readability and form usability */
            padding-left: 24px;  /* Slightly larger padding for desktop */
            padding-right: 24px;
        }

        .contact-text {
            margin: 24px 0 0;  /* Reset margin for tablet and up */
        }
    }


/* ================= Estilos para los mensajes del formulario ================= */
    .form-message {
        padding: 16px;
        border-radius: 4px;
        margin-bottom: 24px;
        font-family: "Albert Sans", sans-serif;
        font-size: 14px;
        transition: all var(--theme-transition-duration) var(--theme-transition-timing);
    }

    .form-message--success {
        background-color: #e8f5e9;
        color: #2e7d32;
        border: 1px solid #c8e6c9;
        margin-top: 16px;
        transition: all var(--theme-transition-duration) var(--theme-transition-timing);
    }

    .form-message--error {
        background-color: #fbe9e7;
        color: #c62828;
        border: 1px solid #ffccbc;
        margin-top: 16px;
        transition: all var(--theme-transition-duration) var(--theme-transition-timing);
    }

    [data-theme="dark"] .form-message--success {
        background-color: #1b5e20;
        color: #ffffff;
        border-color: #2e7d32;
    }

    [data-theme="dark"] .form-message--error {
        background-color: #b71c1c;
        color: #ffffff;
        border-color: #c62828;
    }


/* ==========================================================================
     Estilos para la página "Proyecto"
     ========================================================================== */
     .project-content {
        padding: 16px;
        margin: 0 auto;
    width: 100%;
    }
    
    .project-header {
        margin: 24px 0 32px;
    }
    
    .project-image-row {
        display: grid;
        grid-template-columns: 1fr;  /* One column for mobile */
        gap: 16px;
        grid-column: span 12;  /* Make row span full width in parent grid */
    }
    
    .project-info-wrapper {
        margin: 0 -16px;  /* Negative margin to extend beyond container */
        padding: 0 16px;  /* Padding to maintain content alignment */
        border-top: 1px solid var(--theme-border);
    }
    
    .project-info {
        margin-top: 16px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    .teaser-box {
        margin-top: 32px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .teaser__title {
        margin: 8px 0px 0px 0px;
        font-family: "Albert Sans", sans-serif;
        font-size: 20px;
    color: var(--theme-text);
    }
    .teaser__description {
        font-family: "Albert Sans", sans-serif;
        font-size: 16px;
        font-weight: 500;
        color: var(--theme-text-secondary);
    }
    .project-info-block,
    .project-teaser {
        grid-column: span 4;
        padding-top: 16px;
        display: contents;
    }
    
    .project-info-block__title {
        display: none;
        font-family: "Albert Sans", sans-serif;
        font-size: 16px;
        font-weight: 400;
        margin: 16px 0 24px 0;
        color: var(--theme-text);
    }
    
    .project-description-block {
        margin: 0px 0px 32px 0px;
        font-family: "Albert Sans", sans-serif;
        font-size: 20px;
        color: var(--theme-text);
        grid-column: span 4;
    }
    
    
    .project-section__title {
        font-family: "Albert Sans", sans-serif;
        font-size: 16px;
        font-weight: 400;
        margin: 16px 0 24px 0;
        color: var(--theme-text);
    }
    
    .project-section__text {
        font-family: "Albert Sans", sans-serif;
        font-size: 20px;
        font-weight: 400;
        color: var(--theme-text);
    }   
    
    .project-section__list {
        list-style: none;
        padding: 0;
        margin: 0;
        font-family: "Albert Sans", sans-serif;
        font-size: 16px;
        color: var(--theme-text);
    }
    
    .project-section__list li {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    
    .project-images {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        margin-bottom: 64px;
        margin-top: 86px;
    }
    
    .project-image {
        margin: 0;
        padding: 0;
        grid-column: span 4;  /* Full width on mobile by default */
    }
    
    .project-image--quarter {
        grid-column: span 2;  /* 2 columns on mobile */
    }
    
    .project-image img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 8px;
    }
    
    .related-project-image  {
        width: 100%;
        display: block;
        border-radius: 8px;
    object-fit: cover;
        aspect-ratio: 3 / 2;
    }
    
    .project-teaser-col-1 {
        grid-column: 1 / 3;
        display: none;
    }
    .project-teaser-col-3 {
        grid-column: span 2;
    }
    .project-teaser-col-4 {
        grid-column: span 2;
    }
    
    
    .project-info-col-1 {
        grid-column: span 4;
        display: block;
    }
    .project-info-col-2 {
        grid-column: span 4;
    }   
    .project-info-col-3 {   
        grid-column: span 4;
    }
    .project-info-col-4 {
        grid-column: span 4;
        margin-bottom: 40px;
    }
    
    .project-description-block {
        font-family: "Albert Sans", sans-serif;
        font-size: 20px;
        color: var(--theme-text);
        margin: 0px 0px -16px;
    }
    
    
    @media (min-width: 768px) {
        .project-header {
            margin: 48px 0 64px;
        }
    
        .project-info {
            margin: 48px 0px;
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 16px;
        }
        .teaser-box {
            margin-top: 48px;
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 16px;
        }
        .project-images {
            gap: 16px;
            grid-template-columns: repeat(8, 1fr);
        }
    
        .project-image {
            grid-column: span 8;  /* Default full width */
        }
    
        .project-image--half {
            grid-column: span 4;  /* Half width (4 columns) */
        }
    
        .project-image--third {
            grid-column: span 8;  /* One third width (4 columns) */
        }
    
        .project-image--quarter {
            grid-column: span 2;  /* Quarter width (3 columns) */
        }
    
        .project-info-block {
            grid-column: span 8;
            display: contents;  /* This will make children align with parent grid */
        }
        .project-info-block__title {
            display: block;
            margin: 0px;
        }
    
        .project-info-col-1,
        .project-teaser-col-1 {
            grid-column: 1 / 2;
            display: block;
        }
        .project-info-col-2,
        .project-teaser-col-2 {
            grid-column: 4 / 5;
        }   
        .project-info-col-3,
        .project-teaser-col-3 {   
            grid-column: 5 / 7;
        }
        .project-info-col-4,
        .project-teaser-col-4 {
            grid-column: 7 / 9;
        }
    
        .project-description-block {
            margin: 0px 0px 32px 0px;
            font-family: "Albert Sans", sans-serif;
            font-size: 20px;
            color: var(--theme-text);
            grid-column: 4 / 9;
        }
    
        .project-section__title {
            margin: 0px;
        }

        .project-section__text {
            font-family: "Albert Sans", sans-serif;
            font-size: 20px;
            font-weight: 400;
            margin: 16px 0 24px 0;
            color: var(--theme-text);
        }
    
        .project-section__list {
            list-style: none;
            padding: 0;
            font-family: "Albert Sans", sans-serif;
    font-size: 16px;
            color: var(--theme-text);
            margin: 16px 0px 0px;
        }
    }
    
    /* Desktop styles */
    @media (min-width: 1024px) {
    
        .project-header {
            margin: 48px 0 64px;
        }
    
        .project-info {
            margin: 48px 0px;
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 16px;
        }
        .teaser-box {
            margin-top: 48px;
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 16px;
        }
        .project-images {
            gap: 16px;
            grid-template-columns: repeat(12, 1fr);
        }
    
        .project-image {
            grid-column: span 12;  /* Default full width */
        }
    
        .project-image--half {
            grid-column: span 6;  /* Half width (6 columns) */
        }
    
        .project-image--third {
            grid-column: span 4;  /* One third width (4 columns) */
        }
    
        .project-image--quarter {
            grid-column: span 3;  /* Quarter width (3 columns) */
        }
    
    
    
        .project-info {
            grid-template-columns: repeat(12, 1fr);  /* Back to 12 columns for desktop */
        }
        .teaser-box {
            grid-template-columns: repeat(12, 1fr);  /* Back to 12 columns for desktop */
        }
    
        .project-description-block {
            grid-column: 6 / 13;
        }
    
        .project-info-block {
            grid-column: span 12;
            grid-template-columns: repeat(12, 1fr);
        }
        .project-info-col-1 {
            grid-column: 1 / 3;
        }
        .project-info-col-2,
        .project-teaser-col-2 {
            grid-column: 6 / 7;
        }   
        .project-info-col-3,
        .project-teaser-col-3 {   
            grid-column: 7 / 10;
        }
        .project-info-col-4,
        .project-teaser-col-4 {
            grid-column: 10 / 13;
        }
    
        .related-project-image {
            grid-column: 6 / 9;  /* Same columns as project-info-col-3 */
        }
    }
    
/* ==========================================================================
     Estilos para el reproductor de video
     ========================================================================== */    

/* Video Player Styles */
.video-player {
    background-color: var(--theme-surface);
    border-radius: 8px 8px 8px 0px;
    padding: 16px;
    grid-column: span 4;  /* Mobile: full width of 4-column grid */
    position: relative;
}

.video-container {
    width: 100%;
    position: relative;
    padding-top: 56.25%;  /* 16:9 Aspect Ratio */
}

.video-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.video-controls {
    position: absolute;
    bottom: -40px;
    left: 0px;
    display: flex;
}

.video-control-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: var(--theme-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-control-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--theme-text);
    transition: fill var(--theme-transition-duration) var(--theme-transition-timing);
}

@media (min-width: 768px) {
    .video-player {
        grid-column: span 4;
    }
}

@media (min-width: 1024px) {
    .video-player {
        grid-column: span 6;
    }
}

.video-player img {
    fill: currentColor;
}

.video-control-btn img {
    transition: filter 0.3s ease;
}

[data-theme="dark"] .video-control-btn img {
    filter: invert(1);
}



/* ==========================================================================
     Footer
     ========================================================================== */

    .footer__grid {
        padding: 24px 16px 8px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        margin-top: 100px;
        border-top: 1px solid var(--theme-border);
    }
    
    .footer__column-1 {
        grid-column: span 4;  /* Ancho completo en móvil */
        gap: 32px;
    }
    .footer__column-3 {
        grid-column: span 2;
    }
    
    .footer__column-mail {
        margin-top: 1em;
    }
    
    .footer__description {
        font-family: "Bitter", serif;
        font-weight: 400;
        font-size: 20px;
        letter-spacing: 0.03em;
        line-height: 1.6;
        color: var(--theme-text);
    }
    
    .footer__email,
    .footer__email:visited,
    .footer__email:link,
    .footer .footer__email,
    .footer a.footer__email { /* Estilos para el correo electrónico en el footer */
        color: #0021A5 !important;
        text-decoration: none;
        font-family: 'Bitter', serif;
        font-size: 20px;
        font-style: normal;
        font-weight: 700;
    }
    
    [data-theme="dark"] .footer__email,
    [data-theme="dark"] .footer__email:visited,
    [data-theme="dark"] .footer__email:link,
    [data-theme="dark"] .footer .footer__email,
    [data-theme="dark"] .footer a.footer__email { /* Modo oscuro para el correo electrónico en el footer */
        color: #4399FF !important;
    }
    
    .footer__column h3 {
        color: #131313;
        font-family: "Albert Sans";
        font-size: 15px;
        font-style: normal;
        font-weight: 600;
        margin-bottom: 16px;
    }
    
    [data-theme="dark"] .footer__column h3 {  /* Modo oscuro para el encabezado en el footer */
        color: #FFFFFF;
    }
    .footer__column ul {
        list-style: none;
        padding: 0;
        margin: 16px 0px 0px 0px;
    }
    .footer__column li {
        margin-bottom: 8px;
        color: #131313;
        font-family: "Albert Sans";
        font-size: 15px;
        font-style: normal;
        font-weight: 400;
    }
    [data-theme="dark"] .footer__column li { /* Modo oscuro para los elementos de la lista en el footer */
        color: #FFFFFF;
    }
    .footer__column a {
        color: inherit;
        text-decoration: none;
    }
    
    .footer__social-link { /* Estilos específicos para los enlaces de redes sociales */
        display: inline-block;
        color: #131313;
        font-family: "Albert Sans";
        font-size: 15px;
        font-style: normal;
        font-weight: 400;
        text-decoration: none;
    }
    .footer__social-link::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 1px;
        bottom: -0.2em;  /* Coincide con el estilo base */
        left: 0;
        background-color: currentColor;
        transform-origin: left;
        transform: scaleX(0);
        transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    [data-theme="dark"] .footer__social-link { /* Cambia el color de los enlaces de redes sociales en el tema oscuro */
        color: #FFFFFF;
    }
    

    @media (min-width: 768px) {
        .footer__grid {
            grid-template-columns: repeat(8, 1fr);  /* 8 columns for tablet */
            gap: 16px;
        }
    
        .footer__column-1 {
            grid-column: span 5;
        }
    
        .footer__column-2 {
            grid-column: span 8;
        }
        
        .footer__column-3 {
            grid-column: span 2;
        }
    }
    @media (min-width: 1024px) {
        .footer__grid {
            grid-template-columns: repeat(12, 1fr);  /* 12 columns for desktop */
        }
    
        .footer__column-1 {
            grid-column: span 6;
        }
    
        .footer__column-2 {
            grid-column: span 7;
        }
    
        .footer__column-3 {
            grid-column: 12 / 13;
        }
    }
