@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.4;
    color: #000;
    background: #F5FFFA;
    font-size: 14px;
    display: flex;
    min-height: 100vh;
}

/* ===== LAYOUT PRINCIPAL ===== */
.sidebar {
    width: 280px;
    min-height: 100vh;
    padding: 50px 40px;
    border-right: 1px solid #f0f0f0;
    background: white;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar nav a {
    text-decoration: none;
    color: #000;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
    padding: 6px 0;
    line-height: 1.3;
}

.sidebar nav a:hover {
    opacity: 0.6;
}

.selector-idioma {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.selector-idioma a {
    text-decoration: none;
    color: #000;
    font-size: 13px;
    font-weight: 400;
}

.selector-idioma a.idioma-activo {
    font-weight: 500;
}

.separador-idioma {
    margin: 0 8px;
    color: #ccc;
}

main {
    flex: 1;
    padding: 50px;
    margin-left: 280px;
    width: calc(100% - 280px);
    max-width: none;
}

/* ===== PÁGINAS DE PROYECTO ===== */
.pagina-proyecto {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.pagina-proyecto h1 {
    font-size: 25px;
    font-weight: 400;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.descripcion-proyecto {
    margin-bottom: 60px;
    max-width: 1000px;
    width: 100%;
}

.descripcion-proyecto p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 300;
}

/* ===== LISTA DE PROYECTOS (REEMPLAZA GRID) ===== */
.lista-proyectos {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.proyecto {
    text-align: center;
    width: calc(40% - 20px); /* ← 2 columnas fijas */
}

.imagen-proyecto {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.imagen-proyecto img {
    width: 100%;
    height: auto;
    max-height: 300px;
    display: block;
    cursor: pointer;
}

.proyecto h2 {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 3px;
}

.proyecto p {
    font-size: 11px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.info-tecnica {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
    font-style: italic;
}

/* ===== PÁGINAS DE TEXTO ===== */
.pagina-texto {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.pagina-texto h1 {
    font-size: 25px;
    font-weight: 400;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.contenido-textual {
    font-size: 16px;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.contenido-textual p {
    margin-bottom: 20px;
    font-weight: 300;
}

/* ===== PÁGINA DE INICIO ===== */
.pagina-inicio {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.descripcion-inicio {
    margin-bottom: 60px;
    max-width: 600px;
}

.descripcion-inicio p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    font-weight: 300;
}

/* Imágenes más pequeñas en inicio */
.pagina-inicio .imagen-proyecto {
    max-width: 250px;
}

.pagina-inicio .imagen-proyecto img {
    max-height: 250px;
}

/* Enlaces de proyecto en inicio */
.enlace-proyecto {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.3s ease;
}

.enlace-proyecto:hover {
    opacity: 0.8;
}

/* ===== ELEMENTOS ESPECÍFICOS ===== */
.imagen-perfil {
    max-width: 300px;
    margin: 0 auto 40px;
    border-radius: 20px;
    overflow: hidden;
}

.imagen-perfil img {
    width: 100%;
    height: auto;
    display: block;
}

.gif-destacado {
    max-width: 250px;
    margin: 0 auto 40px;
    border-radius: 20px;
    overflow: hidden;
}

.gif-destacado img {
    width: 100%;
    height: auto;
    display: block;
}

.enlace-video {
    margin: 30px 0;
}

.enlace-video a {
    text-decoration: none;
    color: #000;
    font-size: 14px;
    font-weight: 400;
    transition: opacity 0.3s ease;
}

.enlace-video a:hover {
    opacity: 0.6;
}

/* ===== FORMULARIO ===== */
.formulario-contacto {
    max-width: 500px;
}

.campo {
    margin-bottom: 25px;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    font-size: 14px;
}

.campo input,
.campo textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.campo input:focus,
.campo textarea:focus {
    outline: none;
    border-color: #000;
}

.campo textarea {
    resize: vertical;
    min-height: 120px;
}

.campo.captcha {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.boton-enviar {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.boton-enviar:hover {
    opacity: 0.8;
}

.mensaje-exito {
    background: #f0f9f0;
    border: 1px solid #4CAF50;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

.mensaje-error {
    background: #fdf2f2;
    border: 1px solid #f56565;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    padding: 20px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 90%;
    margin: auto;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-info {
    color: white;
    text-align: center;
    margin-top: 20px;
    max-width: 600px;
}

.lightbox-title {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 10px;
}

.lightbox-details {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.8;
}

/* ===== RESPONSIVE ===== */

/* Tablets y móviles (0-1200px) */
@media (max-width: 1200px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 999;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    main {
        margin-left: 0 !important;
        padding: 100px 30px 30px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .hamburger {
        display: flex;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 4px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border: none;
        cursor: pointer;
        padding: 10px;
        flex-direction: column;
        gap: 4px;
    }
    
    .hamburger span {
        display: block;
        width: 25px;
        height: 2px;
        background: #000;
        transition: all 0.3s ease;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
    
    .overlay.active {
        display: block;
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

/* Móviles (0-768px) */
@media (max-width: 768px) {
    .sidebar {
        padding: 50px 30px;
    }
    
    main {
        padding: 90px 20px 20px !important;
    }
    
    .proyecto {
        margin-bottom: 40px;
    }
    
    .imagen-proyecto {
        max-width: 100%;
    }
    
    .hamburger {
        top: 15px;
        left: 15px;
        padding: 8px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 25px;
        padding: 10px;
    }
    
    .lightbox-image {
        max-width: 95%;
        max-height: 60%;
    }
    
    .lightbox-info {
        margin-top: 15px;
    }
}

/* Desktop (1201px+) */
@media (min-width: 1201px) {
    main {
        margin-left: 280px;
        width: calc(100% - 280px);
    }
}

/* Centrar todos los títulos h1 principales */
main h1:first-child {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* bandera idioma */
.bandera-idioma {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    transition: opacity 0.3s ease;
}

.selector-idioma a .bandera-idioma:hover {
    opacity: 0.7;
}

.bandera-idioma.idioma-activo {
    opacity: 1;
    border: 1px solid #000;
}
/* ===== FOOTER ===== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0px;
  width: 100%;
  text-align: center;
  padding: 10px 0;
  font-size: 11px;
  color: #000;
  background: white;
  border-top: 1px solid #f0f0f0;
  z-index: 99;
}
.footer-content {
  width: calc(100% - 280px);
  margin-left: 0px;
  text-align: center;
}

@media (max-width: 1200px) {
  .footer-content {
    width: 100%;
    margin-left: 0;
  }
}

/* Añade padding al contenido principal para que no quede debajo */
.content {
  padding-bottom: 50px !important;
}


/* RESPONSIVE: Footer en móviles */
@media (max-width: 1200px) {
  .site-footer {
    left: 0;
    width: 100%;
  }
  .content {
    padding-bottom: 40px !important;
  }
}