* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; 
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #060606;
    color: #e0e0e0;
    overflow-x: hidden;
}

/* PORTADA EDITORIAL */
.portada-editorial {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 30%, #111822 0%, #050505 100%);
}

.editorial-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 85%;
    max-width: 1200px;
    z-index: 10;
    gap: 60px;
}

.editorial-bloque-izq { flex: 1.2; }

.etiqueta-portada {
    font-size: 11px;
    letter-spacing: 3px;
    color: #4da6ff;
    text-transform: uppercase;
    font-weight: 700;
}

.editorial-bloque-izq h1 {
    font-size: 56px;
    line-height: 1.1;
    margin: 15px 0 20px 0;
    color: #ffffff;
    letter-spacing: -2px;
}

.editorial-bloque-izq h1 span { color: #555; }

.editorial-bloque-izq p {
    font-size: 15px;
    color: #999;
    line-height: 1.6;
    max-width: 440px;
}

.editorial-bloque-der { flex: 0.8; }

.tarjeta-acceso {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.tarjeta-acceso > span {
    font-size: 12px;
    color: #777;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.menu-editorial {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0 25px 0;
}

.menu-editorial a {
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.3s, padding-left 0.3s;
}

.menu-editorial a span { color: #4da6ff; }
.menu-editorial a:hover { color: #4da6ff; padding-left: 6px; }

.btn-explorar-todo {
    display: block;
    text-align: center;
    background: #ffffff;
    color: #000000;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
}

.btn-explorar-todo:hover {
    background: #4da6ff;
    color: #fff;
    transform: translateY(-2px);
}

/* FONDO DINÁMICO */
.fondo-dinamico {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.forma { position: absolute; opacity: 0.18; }
.rojo { background-color: rgba(235, 50, 50, 0.7); }
.azul { background-color: rgba(40, 120, 255, 0.7); }

.rectangulo { width: 80px; height: 150px; border-radius: 4px; }
.triangulo {
    width: 0; height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(40, 120, 255, 0.7);
    background: transparent !important;
}
.triangulo.rojo { border-bottom: 100px solid rgba(235, 50, 50, 0.7); }

.forma:nth-child(1) { left: 8%; bottom: -150px; animation: subirForma 18s infinite linear; }
.forma:nth-child(2) { left: 45%; top: -150px; animation: bajarForma 22s infinite linear; }
.forma:nth-child(3) { left: 78%; bottom: -150px; animation: subirForma 26s infinite linear; }
.forma:nth-child(4) { left: 92%; top: -150px; animation: bajarForma 20s infinite linear; }

@keyframes subirForma {
    0% { transform: translateY(110vh) rotate(0deg); }
    100% { transform: translateY(-120vh) rotate(360deg); }
}
@keyframes bajarForma {
    0% { transform: translateY(-120vh) rotate(0deg); }
    100% { transform: translateY(110vh) rotate(-360deg); }
}

/* PÁGINA DE PROYECTOS */
.cuerpo-proyectos { background-color: #080808; }

.pagina-contenedor-original {
    position: relative;
    z-index: 10;
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 40px 80px 40px;
}

.header-flotante {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 50px;
    background: rgba(8, 8, 8, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-autor {
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 15px;
    color: #fff;
}

.nav-links { display: flex; gap: 25px; }
.nav-links a { color: #888; text-decoration: none; font-size: 13px; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: #fff; }

.malla-proyectos { display: flex; flex-direction: column; gap: 60px; }

/* NUEVO DISEÑO: TARJETA DE PROYECTO */
.tarjeta-proyecto {
    display: flex;
    gap: 0px;
    background: rgba(16, 16, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 35px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.tarjeta-proyecto:hover {
    border-color: rgba(77, 166, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* NUEVO DISEÑO: CONTENEDOR CON DEGRADADO (SIN TRIÁNGULO) */
.media-container {
    flex: 0 0 0px;
    position: relative;
    height: 220px;
    opacity: 0;
    overflow: hidden;
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, margin-right 0.5s ease;
    border-radius: 10px;
    pointer-events: none;
    margin-right: 0px;
}

/* Degradado difuminado con el fondo de la tarjeta */
.media-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(16, 16, 16, 0.95) 100%);
    pointer-events: none;
}

.media-container img.interactiva {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    filter: brightness(0.9) contrast(1.05);
}

/* DESPLIEGUE Y REVELACIÓN AL PASAR EL CURSOR (HOVER) */
.tarjeta-proyecto:hover .media-container {
    flex: 1;
    opacity: 1;
    margin-right: 35px;
}

/* ANIMACIÓN INDEFINIDA DE FLOTACIÓN SUTIL */
.tarjeta-proyecto:hover .media-container img.interactiva {
    animation: flotacionSutil 3.5s ease-in-out infinite alternate;
}

@keyframes flotacionSutil {
    0% {
        transform: translateY(-6px) scale(1.02);
    }
    100% {
        transform: translateY(6px) scale(1.02);
    }
}

.info-container {
    flex: 1;
    transition: flex 0.5s ease;
}

.num-proyecto {
    font-size: 11px;
    color: #4da6ff;
    font-weight: 700;
    letter-spacing: 2px;
}

.info-container h2 { font-size: 20px; color: #fff; margin: 6px 0 10px 0; }

.wiki-link {
    display: inline-block;
    font-size: 12px;
    color: #4da6ff;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 10px;
}
.wiki-link:hover { text-decoration: underline; }

.info-container p { font-size: 13.5px; color: #aaa; line-height: 1.55; margin: 0; }

.footer-original {
    margin-top: 80px;
    padding: 35px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #777;
}
.footer-original a { color: #4da6ff; text-decoration: none; }
.derechos { color: #555; }

/* VISTA Y MARCO PARA ENCARGOS (IFRAME) */
.selector-encargos {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-tab {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.btn-tab.activo, .btn-tab:hover {
    background: #4da6ff;
    border-color: #4da6ff;
    color: #000;
    font-weight: 600;
}

.titulo-encargo {
    text-align: center;
    font-size: 26px;
    color: #ffffff;
    margin-bottom: 30px;
}

/* Marco del Iframe */
.marco-visor-iframe {
    width: 100%;
    height: 550px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    background: #ffffff;
}

.marco-visor-iframe iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.contenedor-pantalla-completa {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

/* ==========================================
   ESTILOS VISTA DE CONTACTO
   ========================================== */

.seccion-contacto-completa {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.banner-contacto-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    background: radial-gradient(circle at 10% 20%, rgba(77, 166, 255, 0.15) 0%, rgba(16, 16, 16, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.texto-hero-contacto {
    flex: 1.2;
}

.texto-hero-contacto h1 {
    font-size: 44px;
    color: #ffffff;
    margin: 10px 0 15px 0;
    letter-spacing: -1px;
}

.texto-hero-contacto p {
    font-size: 14.5px;
    color: #aaa;
    line-height: 1.6;
    max-width: 480px;
}

.tarjeta-institucional {
    flex: 0.9;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(77, 166, 255, 0.25);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.subtitulo-card {
    font-size: 10px;
    letter-spacing: 2px;
    color: #4da6ff;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.tarjeta-institucional h3 {
    font-size: 16px;
    color: #fff;
    margin: 0 0 6px 0;
    word-break: break-all;
}

.tarjeta-institucional p {
    font-size: 12px;
    color: #777;
    margin: 0;
}

/* Formulario */
.bloque-formulario-contacto {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.info-formulario {
    flex: 1;
}

.info-formulario h2 {
    font-size: 28px;
    color: #ffffff;
    margin: 10px 0 15px 0;
}

.info-formulario p {
    font-size: 14px;
    color: #aaa;
    line-height: 1.6;
}

.redes-directas {
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.redes-directas a {
    color: #4da6ff;
    text-decoration: none;
}

.formulario-glass {
    flex: 1.3;
    background: rgba(16, 16, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 35px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fila-doble {
    display: flex;
    gap: 20px;
}

.campo-grupo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.campo-grupo label {
    font-size: 12px;
    color: #ccc;
    font-weight: 500;
}

.campo-grupo input,
.campo-grupo textarea {
    background: rgba(5, 5, 5, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.3s;
}

.campo-grupo input:focus,
.campo-grupo textarea:focus {
    border-color: #4da6ff;
}

@media (max-width: 768px) {
    .banner-contacto-top,
    .bloque-formulario-contacto,
    .fila-doble {
        flex-direction: column;
    }
}