/* --- VARIABLES --- */
:root {
    --azul-elegante: #007BA7;
    --azul-glow: rgba(0, 123, 167, 0.4);
    --negro: #000000;
    --blanco: #ffffff;
    --gris-texto: #888888;
    --fuente-texto: 'Lato', sans-serif;
}

/* --- RESET GENERAL --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body.interna-body {
    background: radial-gradient(circle at top right, #00081a, #000000);
    background-attachment: fixed;
    color: var(--blanco);
    font-family: var(--fuente-texto);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- HEADER --- */
.header-interna {
    position: sticky; top: 0; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 5%; background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand a { 
    text-decoration: none; color: var(--blanco); 
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    letter-spacing: 4px; text-transform: uppercase; font-weight: 300;
}

.nav-principal { display: flex; align-items: center; gap: 18px; }
.nav-principal a { color: var(--blanco); text-decoration: none; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.nav-principal a:hover, .nav-principal a.active { color: var(--azul-elegante) !important; }

/* --- DROPDOWN (PC) --- */
.nav-item.dropdown { position: relative; display: flex; align-items: center; padding-bottom: 10px; margin-bottom: -10px; }
.dropdown-arrow { font-size: 0.6rem; color: var(--azul-elegante); margin-left: 6px; transition: transform 0.3s; cursor: pointer; }

.dropdown-menu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(0);
    background: var(--negro); border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 240px; padding: 10px 0; opacity: 0; visibility: hidden; transition: 0.3s;
}

.nav-item.dropdown::after { content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: 20px; }

@media (min-width: 901px) {
    .nav-item.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(10px); }
    .nav-item.dropdown:hover .dropdown-arrow { transform: rotate(180deg); }
}

.dropdown-menu a { display: block; padding: 12px 20px; font-size: 0.7rem !important; text-align: left; color: var(--blanco) !important; text-decoration: none; }
.dropdown-menu a:hover { color: var(--azul-elegante) !important; background: rgba(0, 123, 167, 0.1); }

/* --- BOTÓN IDIOMA --- */
.lang-btn {
    background: transparent; border: 1px solid var(--azul-elegante); color: var(--azul-elegante);
    padding: 4px 10px; font-size: 0.7rem; cursor: pointer; text-transform: uppercase; margin-left: 10px; transition: all 0.3s ease;
    font-weight: bold;
}

@media (hover: hover) {
    .lang-btn:hover { background: var(--azul-elegante); color: #fff; box-shadow: 0 0 15px var(--azul-elegante); }
}

/* --- SECCIÓN PROYECTOS --- */
.proyectos-container { padding: 60px 5% 120px; max-width: 1200px; margin: 0 auto; }
.proyectos-header { text-align: center; margin-bottom: 80px; }
.proyectos-header h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: 12px; text-transform: uppercase; }
.linea-decorativa { width: 60px; height: 1px; background: var(--azul-elegante); margin: 20px auto; }

.proyectos-vertical-list { display: flex; flex-direction: column; gap: 150px; }
.proyecto-block { display: flex; flex-direction: column; align-items: center; width: 100%; }

.proyecto-visual { width: 100%; margin-bottom: 40px; display: flex; justify-content: center; }
.proyecto-visual img {
    max-width: 100%; height: auto; max-height: 80vh; 
    object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    filter: grayscale(15%); transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.proyecto-block:hover .proyecto-visual img { filter: grayscale(0%); transform: translateY(-8px); }

.proyecto-contenido { text-align: center; max-width: 750px; }
.proyecto-contenido p { font-size: 1.1rem; color: var(--gris-texto); line-height: 1.8; margin-bottom: 35px; }

.btn-proyecto {
    display: inline-block; text-decoration: none; color: var(--blanco); border: 1px solid var(--azul-elegante);
    padding: 15px 45px; font-size: 0.75rem; letter-spacing: 3px; background: transparent; transition: all 0.4s ease; text-transform: uppercase;
}
.btn-proyecto:hover { background: var(--azul-elegante); box-shadow: 0 0 25px var(--azul-glow); }


/* --- RESPONSIVE / MÓVIL --- */
@media (max-width: 900px) {
    .header-interna { flex-direction: column; padding: 25px 5%; gap: 15px; position: relative; }
    .nav-principal { justify-content: center; flex-wrap: wrap; gap: 12px; width: 100%; }

    .dropdown-menu.active { 
        display: block !important; opacity: 1 !important; visibility: visible !important; 
        position: absolute; 
        top: 25px; /* VALOR CORREGIDO: Menos distancia para que no se vaya abajo */
        left: 50%; transform: translateX(-50%);
        width: 260px; background: var(--negro); border: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 2000;
    }
    .dropdown-arrow.active { transform: rotate(180deg); }

    /* Fix botón lenguaje en móvil */
    .lang-btn:hover { background: transparent; color: var(--azul-elegante); box-shadow: none; }
    .lang-btn:active { background: var(--azul-elegante); color: #fff; }

    .proyectos-vertical-list { gap: 80px; }
    .proyecto-visual img { max-height: 350px; filter: grayscale(0%); }
    .proyecto-contenido p { font-size: 0.95rem; max-width: 320px; margin: 0 auto 25px; }
}

/* Modificamos el footer para que los elementos se repartan */
.home-footer {
    position: fixed;
    bottom: 20px;
    left: 5%;
    right: 5%; /* Añadimos margen derecho */
    z-index: 100;
    pointer-events: none;
    display: flex;
    justify-content: space-between; /* Esto empuja el nombre de Iván a la izquierda y el tuyo a la derecha */
    align-items: center;
}

.home-footer p {
    font-family: var(--fuente-texto);
    font-size: 0.7rem;
    color: var(--gris);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    margin: 0;
}

/* Estilos específicos para tu crédito */
.creador {
    pointer-events: auto; /* IMPORTANTE: Para que el enlace sea clickable */
    text-align: right;
}

.link-creador {
    color: var(--gris); /* O puedes usar var(--azul-maestro) si quieres que resalte */
    text-decoration: none;
    transition: 0.3s;
    font-weight: 700;
}

.link-creador:hover {
    color: var(--azul-elegante); /* Se ilumina al pasar el ratón */
    opacity: 1;
}

/* Ajuste para móviles: uno encima de otro */
@media (max-width: 900px) {
    .home-footer {
        position: relative;
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 30px 0;
        left: 0;
        width: 100%;
    }
    .creador {
        text-align: center;
    }
}

/* Busca tu bloque de @media (max-width: 900px) y añade/modifica esto: */

@media (max-width: 900px) {
    /* ... otros estilos ... */

    .proyectos-header h1 {
        font-size: 1.8rem !important; /* Ajustamos tamaño para móvil */
        letter-spacing: 4px !important; /* Reducimos el espaciado para que no empuje el texto */
        text-indent: 4px; /* Compensamos el espacio de la última letra para un centrado perfecto */
        padding: 0 10px;
        width: 100%;
        display: block;
    }
    
    .proyectos-header {
        margin-bottom: 40px; /* Reducimos margen para que no haya tanto hueco */
        padding: 0 5%;
    }
}