/* ========================================================================= */
/* --- GENERAL STYLES & RESETS --- */
/* ========================================================================= */

body {
    font-family: "Work Sans", sans-serif;
    /* Work Sans como fuente principal para el body */
    margin: 0;
    padding: 0;
    background-color: #fcfaf7;
    color: #1d2022;
    overflow-x: hidden;
    width: 100%;
  }

main {
    background-color: #fcfaf7;
    min-height: 100vh;
    padding: 20px;
    /* Consolidado para evitar duplicados */
}

section {
    margin-bottom: 50px;
}


/* Links Globales - Importante para evitar que el color del link sobreescriba */
/* Esto asegura que los links hereden el color de su padre a menos que se especifique lo contrario */
a {
    text-decoration: none;
    /* Elimina el subrayado por defecto */
    color: inherit;
    /* Hereda el color del texto del elemento padre */
    transition: color 0.3s ease;
    /* Transición para cambios de color */
}

a:hover {
    color: #007bff;
    /* Color por defecto de hover para los enlaces, puedes ajustarlo */
}



/* ========================================================================= */
/* --- FADE ANIMATION (CONTROLLED BY JAVASCRIPT) --- */
/* ========================================================================= */
/* Inicialmente, todos los elementos con la clase fade-element estarán ocultos */
.fade-element {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* Cuando el elemento entra en el viewport, se le aplica fade-in */
.fade-element.fade-in {
    /* Más específico que solo .fade-in */
    opacity: 1;
}

/* Back to portfolio */
.back-to-portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 1rem 0;
}

.back-to-portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(60, 60, 60, 0.5);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: color 0.3s ease;
}

.back-to-portfolio-link:hover {
    color: rgba(30, 30, 30, 0.7);
}

.arrow-left-icon {
    stroke: currentColor;
    width: 50px;
    height: 50px;
    transition: stroke 0.3s ease;
}

.back-to-portfolio-text {
    font-size: 1.4rem;
}


/* ========================================================================= */
/* --- HEADER & NAVIGATION --- */
/* ========================================================================= */
header {
    position: fixed;
    top: 0;
    z-index: 1000;
    background-color: #fcfaf7;
    color: #1d2022;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 0px;
    width: 100%;
    box-sizing: border-box;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* Importante para el posicionamiento absoluto del nav-links */
    height: 70px; /* AGREGAR: Define una altura para el navbar, ajusta según tu logo */
}

.logo {
    line-height: 0;
}

.logo img {
    height: 70px; /* CLAVE: Define un tamaño fijo para tu logo. */
    width: auto;
    /* font-weight: 600; */ /* ELIMINAR: Esto es para texto, no para imagen */
    display: block;
    vertical-align: middle;
}

.top-social {
  position: absolute;
  top: 1.2rem;
  right: -1rem; /* Ajustá si se superpone con el botón de toggle */
  z-index: 1000;
}

.top-social a {
  color: #333;
  font-size: 1.6rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.top-social a:hover {
  color: #0a66c2; /* color oficial de LinkedIn */
}


/* --- MOBILE FIRST: Estilos por defecto para el menú hamburguesa y el menú oculto --- */

/* AGREGAR: Ocultar el botón de escritorio por defecto en móvil */
#profile-toggle-desktop {
    display: none;
}

/* AGREGAR: Mostrar el botón de perfil móvil dentro del menú */
.profile-toggle-mobile {
    display: block; /* Asegúrate de que se muestre en móvil */
    margin-top: 25px; /* Espacio superior para separarlo de los enlaces */
}

/* CAMBIAR: Estilos para el botón de hamburguesa (visible en móvil) */
.hamburger-menu {
    display: flex; /* CAMBIAR: Muestra el botón de hamburguesa en móvil */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Asegura que el botón esté por encima del menú desplegado */
}

/* CAMBIAR: Animación del icono de hamburguesa a una 'X' */
.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #1d2022; /* Color de las barras */
    border-radius: 5px;
    transition: all 0.3s ease-in-out; /* Animación suave para el icono */
}
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* CAMBIAR: Estilos para el menú de navegación (inicialmente oculto en móvil) */
.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute; /* Posiciona el menú desplegable */
    top: 100%; /* Coloca el menú justo debajo del navbar */
    left: 0;
    width: 100%;
    background-color: #fcfaf7; /* Asegúrate de que este background coincida con el de tu header */
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    display: flex; /* CAMBIAR: Ahora es flex por defecto para apilar */
    flex-direction: column; /* Apila los links verticalmente */
    align-items: center; /* Centra los elementos horizontalmente */
    transform: translateX(100%); /* CLAVE: Oculta los links por defecto en móvil a la derecha */
    transition: transform 0.3s ease-in-out; /* Transición para el deslizamiento */
    z-index: 999; /* Asegura que el menú esté debajo del botón de hamburguesa pero encima del contenido */
    height: calc(100vh); /* AGREGAR: Ocupa el resto de la altura de la ventana (ajusta 70px si tu navbar tiene otra altura) */
    overflow-y: auto; /* AGREGAR: Permite scroll si hay muchos enlaces */
    
}

/* AGREGAR: Clase que JavaScript agregará para mostrar el menú */
.nav-links.active {
    transform: translateX(0); /* Muestra los links cuando el menú está activo */
}

/* CAMBIAR: Espaciado y padding para enlaces de menú móvil */
.nav-links li {
    margin: 0.5rem 0;
}

.nav-links a {
    color: #1d2022;
    font-size: 1.5rem; /* AGREGAR: Tamaño de fuente más grande para enlaces de menú móvil */
    font-weight: 500;
    display: block;
    padding: 15px 20px; /* AGREGAR: Ajusta el padding para que los enlaces sean fácilmente clicables en móvil */
    font-family: "Manrope", sans-serif;
    transition: background-color 0.3s ease;
    text-decoration: none; /* AGREGAR: Elimina subrayado por defecto */
}

/* CAMBIAR: Efecto hover para links en menú móvil */
.nav-links a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* CAMBIAR: Profile Toggle Button - Estas reglas son generales para ambos botones */
.profile-toggle {
    background-color: #1d2022;
    font-size: 1.2rem;
    color: #fcfaf7;
    padding: 12px 25px;
    border: none;
    border-radius: 25px !important;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap; /* AGREGAR: Evita que el texto se rompa */
}

.profile-toggle:hover {
    background-color: #4d555b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-toggle:active {
    background-color: #4d555b;
    transform: translateY(0);
    box-shadow: none;
}


/* --- DESKTOP FIRST: Media Query para pantallas grandes (≥ 769px) --- */
/* CAMBIAR: El breakpoint a min-width y todo el contenido dentro */
@media (min-width: 769px) {

    /* AGREGAR: Ocultar el botón de hamburguesa en escritorio */
    .hamburger-menu {
        display: none;
    }

    /* AGREGAR: Mostrar el botón de escritorio y ocultar el móvil */
    #profile-toggle-desktop {
        display: block;
        margin-left: 30px; /* Espacio entre los nav-links y el botón de toggle */
    }

    .profile-toggle-mobile {
        display: none;
    }

    /* CAMBIAR: Muestra los links en escritorio */
    .nav-links {
        display: flex; /* Muestra los links */
        position: static; /* Quita el posicionamiento absoluto */
        width: auto; /* Ancho automático */
        flex-direction: row; /* Coloca los links en fila */
        background-color: transparent; /* Fondo transparente */
        box-shadow: none; /* Sin sombra */
        padding: 0; /* Sin padding vertical extra */
        margin-left: auto; /* Empuja los enlaces hacia la derecha del logo */
        transform: translateX(0); /* Asegura que siempre esté visible */
        height: auto; /* Quita la altura fija del móvil */
        overflow-y: visible; /* Permite que el contenido no se recorte */
    }

    /* CAMBIAR: Espacio horizontal entre links en escritorio */
    .nav-links li {
        margin: 0 15px;
    }

    /* CAMBIAR: Vuelve al tamaño original para escritorio y efecto hover */
    .nav-links a {
        font-size: 1.1rem;
        padding: 10px 0px;
        border-bottom: 2px solid transparent; /* Para efecto de subrayado en hover */
    }

    /* CAMBIAR: Quita el fondo en hover para desktop, usa el subrayado */
    .nav-links a:hover {
        background-color: transparent;
        border-color: #8c8375; /* Subraya con el color del botón de toggle */
    }

    /* CAMBIAR: Ajuste del navbar en escritorio para espaciar bien los elementos */
    .navbar {
        justify-content: space-between; /* Espacio entre logo, nav y el botón toggle */
    }
}


/* --- Profile Toggle Button Disabled State Styles --- */
/* MANTENER TAL CUAL, ya los tenías bien definidos */
.profile-toggle.disabled-toggle {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
    background-color: #dcdcdc;
    border-color: #bbb;
    color: #888;
}

.profile-toggle.disabled-toggle:hover {
    background-color: #dcdcdc;
}

.profile-toggle.disabled-toggle:active,
.profile-toggle.disabled-toggle:focus {
    outline: none;
    box-shadow: none;
}

/* ========================================================================= */
/* --- HERO SECTION --- */
/* ========================================================================= */
#hero {
    width: 100%;
    max-width: 1070px;
    margin: 80px auto;
    padding: 2% 2%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.hero-content {
    text-align: left;
}

.hero-title {
    font-family: "Manrope", sans-serif;
    width: 100%;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: #4d555b;
    margin: 0 0 20px 0;
}

.hero-description {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 40px;
    line-height: 1.6;
    width: 100%;
    color: #4d555b;
}

.image-content {
    width: 100%;
    text-align: right;
}

.image-content img {
    margin-top: 20%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

/* ========================================================================= */
/* --- ABOUT SECTION --- */
/* ========================================================================= */
#about {
    max-width: 1000px;
    margin: 80px auto;
    padding: 2% 2%;
    text-align: left;
}

#about h2 {
    font-family: "Manrope", sans-serif;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #4d555b;
}

#about-text {
    font-size: 1.4rem;
    line-height: 1.4;
    color:#4d555b;
    margin-bottom: 20px;
    text-align: left;
}



/* ========================================================================= */
/* --- PROJECTS SECTION (CARDS OVERVIEW) --- */
/* ========================================================================= */
#projects {
    margin: 80px auto;
    background-color: #fcfaf7;
}

#projects h2 {
    font-family: "Manrope", sans-serif;
    max-width: 1000px;
    margin: 80px auto;
    font-size: 2.5rem;
    text-align: left;
    margin-bottom: 60px;
    color: #4d555b;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 1000px;
    margin: 80px auto;
    padding: 0 2rem;
}

.project-card {
    position:relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/4;
    z-index: 1;
    /* Base z-index for the card */
}

/* Overlay que aparece al hacer hover sobre la tarjeta */
.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    /* Capa oscura translúcida */
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    /* Asegura que esté debajo de la imagen y el texto */
    pointer-events: none;
    /* Permite que los clics pasen a los elementos subyacentes */
}

.project-card:hover::after {
    opacity: 1;
}

/* Título de la tarjeta (el que está dentro del 'a') */
.project-card a .project-title {
    /* ¡Selector más específico para el color! */
    font-family: "Manrope", sans-serif;
    font-weight: 600;
    color: #fcfaf7;
    /* <-- ¡Cambiado a blanco para que se vea sobre el overlay oscuro! */
    font-size: 1.8rem;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0 10px;/* Propiedades de posicionamiento y z-index para visibilidad sobre overlay */
    position: absolute;
    /* Posiciona el título sobre la card */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Centra el título */
    z-index: 2;
    /* Más alto que el overlay y la imagen */
    width: 100%;
    /* Para que el text-align center funcione bien */
    box-sizing: border-box;
    opacity: 0;
    /* Inicialmente oculto para que aparezca con el hover */
    transition: opacity 0.3s ease;
    /* Transición suave para la aparición */
}

/* Hace que el título aparezca cuando se hace hover sobre la tarjeta */
.project-card:hover .project-title {
    opacity: 1;
    /* Título visible al hacer hover sobre la card */
}

/* Contenedor de la imagen dentro de la tarjeta */
.project-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
    z-index: 1;
    /* Asegura que el contenedor de la imagen esté sobre el after */
}

/* La imagen real */
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cambiado a cover para que la imagen ocupe todo el espacio */
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.20);
}

.hidden {
    display: none !important;
}


/* ========================================================================= */
/* --- PROJECT DETAIL PAGE TEMPLATE --- */
/* ========================================================================= */
.project-detail {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-container {
    max-width: 1200px;
    margin: 0 auto;
    /* Centra el contenedor principal */
    padding: 1rem;
    font-family: Arial, sans-serif;
    color: #222222;
}

/* Header: título a la izquierda, brief a la derecha */
.project-header {
    display: flex;
    /* Habilita Flexbox para organizar los hijos */
    flex-wrap: wrap;
    /* Permite que los elementos se envuelvan en pantallas pequeñas */
    justify-content: space-between;
    /* Empuja el título a la izquierda y el brief a la derecha */
    gap: 2rem;
    /* Espacio entre el título y el brief */
    margin-bottom: 2rem;
    align-items: flex-start;
    /* Alinea los elementos al inicio (arriba) */
    /* Añadido padding horizontal para que el contenido no toque los bordes */
    padding: 0 1rem;
}

/* Título de la página de detalle (el H1 grande) */
.project-container .project-header .project-title {
    font-family: "Manrope", sans-serif;
    font-weight: 700;
    color: #1d2022;
    font-size: 2.8rem;
    /* El tamaño de la captura */
    text-align: left;
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding: 0;
    position: static;
    /* Asegura que se comporte normalmente */
    z-index: auto;

    flex: 1 1 50%;
    /* Permite que crezca/encoga, base del 50% */
    max-width: 40%;
    /* Limita el ancho máximo para el título */
    min-width: 300px;
    /* Asegura que el título no sea demasiado pequeño en pantallas intermedias */
    box-sizing: border-box;
    /* Para que el padding no afecte el ancho total */
    padding-right: 1rem;
    /* Margen interno a la derecha para separar del brief */
}

/* Brief ocupa otra parte del ancho (derecha) */
.project-brief {
    flex: 1 1 45%;
    /* Permite que crezca/encoga, base del 45% (un poco menos que el título para el gap) */
    text-align: left;
    /* Alinea el texto a la izquierda dentro del brief */
    margin-top: 3rem;
    /* Alinea su parte superior con el título */
    box-sizing: border-box;
    padding-left: 6rem;
    /* Margen interno a la izquierda para separar del título */
}

.project-brief h2 {
    /* Estilo para el "Brief" h2 */
    font-family: "Manrope", sans-serif;
    font-size: 2rem;
    /* Ajusta el tamaño si es necesario */
    margin-bottom: 0.8rem;
    /* Espacio debajo del título del brief */
    color: #1d2022;
}

.project-brief p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    /* Espacio debajo del párrafo del brief */
    color: #4d555b;
    /* Un color de texto más suave */
}


/* Ficha dentro del brief */
.project-ficha {
    margin-top: 1rem;
    /* Margen superior para separarlo del párrafo del brief */
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.project-ficha>div {
    flex: 1 1 120px;
    background: #f5f5f5;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 1.2rem;
    color: #222;
    /* Color para el texto dentro de la ficha */
}


.project-media img {
    width: 100%;
    max-width:800px;
    height: auto; 
    border-radius: 0px;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: zoom-in; /* Indicate it's clickable */
   }

.project-media img:hover {
    /* Efecto de hover para las imágenes de galería */
    transform: scale(1.02);
}

.project-media {
  width: auto;
  overflow: hidden;
  border-radius: 8px;
}

.project-challenge,
.project-gallery,
.project-result,
.project-content-section,
.project-process,
.project-learnings,
.project-contribution,
.project-inspiration {
    /* Consolidado para evitar duplicados */
    line-height: 1.6;
    font-size: 1.6rem;
    margin-top: 10%;
    margin-bottom: 60px;
    /* Usar el valor mayor de los dos */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1200px;
}

.project-content-section h2 {
    font-family: "Manrope", sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.project-caption {
  font-size: 16px;
  color: #555;
  margin-top: 10px;
  line-height: 1.5;
  text-align: center; /* o left, según preferencia */
}


/* Grid estático para mostrar imágenes en cuadrícula */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid img {
  width: 100%;
  border-radius: 6px;
  height: auto;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

/* Para imagenes que deben ocupar todo el ancho en grid */
.full-width-image {
  grid-column: 1 / -1;
}

/* Asymmetrical layout tweaks */
.gallery-grid .wide {
  grid-column: span 2;
}

.gallery-grid .tall {
  grid-row: span 2;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid .wide {
    grid-column: auto;
  }

  .gallery-grid .tall {
    grid-row: auto;
  }
}

/* --- Project status note --- */
.project-status {
  max-width: 720px;
  margin: 1.5rem auto 2rem auto;
  padding: 1rem 1.5rem;
  background-color: #fff9f0;
  border-left: 5px solid #ff9800;
  border-radius: 12px;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #e65100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: 'Manrope', sans-serif;
  text-align: center;
}




/* Video */
.project-video {
  width: 80%;
  max-width: 1000px;
  height: auto;
  display: block;
  margin: 4rem auto 2rem auto; /* ↑ más espacio arriba */
  border-radius: 12px; /* un poco más redondeado, elegante */
  object-fit: cover;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); /* sombra más suave y amplia */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fallback-text {
  font-size: 1.4rem;
  color: #999;
  padding: 1rem;
  text-align: center;
}

.video-description {
  font-size: 16px;
  color: #555;
  margin-top: 12px;
  text-align: center; /* o left, según preferencia */
  max-width: 800px; /* o el ancho que quieras */
  margin-left: auto;
  margin-right: auto;
}

/* Cambia el color del fondo del overlay */
.lb-overlay {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.back-to-portfolio {
    display: inline-block;
    margin: 30px 0;
    color: #1d2022;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.back-to-portfolio:hover {
    transform: translateX(-5px);
}

.back-to-portfolio i {
    margin-right: 5px;
}

.ver-proyecto-link {
    display: inline-block;
    margin-top: 30px;
    background-color: #1d2022;
    color: #fcfaf7;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.ver-proyecto-link:hover {
    background-color: #4d555b;
    /* Ajustado el color de hover para este botón */
    transform: translateY(-2px);
}

/* ========================================================================= */
/* --- SKILLS SECTION --- */
/* ========================================================================= */
#skills {
    /* ¡Ajustado a #skills! */
    max-width: 1000px;
    margin: 80px auto;
    padding: 2% 2%;
    text-align: center;
}

#skills h2 {
    /* ¡Ajustado a #skills! */
    font-family: "Manrope", sans-serif;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #4d555b;
    text-align: center;
}

#skills-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

#skills-list li {
    background-color: #fcfaf7;
    color:  #1d2022b;
    padding: 10px 20px;
    border: 1px solid #4d555b;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

#skills-list li:hover {
    background-color: #1d2022;
    color: #fcfaf7;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ========================================================================= */
/* --- CONTACT SECTION --- */
/* ========================================================================= */
#contact {
    max-width: 700px;
    /* Un poco más estrecho para el formulario */
    margin: 80px auto;
    padding: 2% 2%;
    text-align: center;
    /* Centra el contenido general de la sección */
}

#contact h2 {
    font-family: "Manrope", sans-serif;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #4d555b;
    text-align: center;
    /* Asegura que el título H2 esté centrado */
}

#contact p {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #4d555b;
    /* Un color de texto un poco más suave para los párrafos */
    margin-bottom: 25px;
}

#contact p a {
    color:#4d555b;
    /* Color de link más oscuro para contraste */
    font-weight: 600;
    /* Hace los links más destacados */
}

#contact p a:hover {
    color: #007bff;
    /* Mantiene el hover global, o puedes elegir uno específico */
    text-decoration: underline;
    /* Agrega un subrayado al hover para más feedback */
}

/* Estilos del Formulario */
#contact-form {
    display: flex;
    flex-direction: column;
    /* Apila los elementos del formulario */
    gap: 20px;
    /* Espacio entre los campos */
    margin-top: 40px;
    /* Margen superior para separar del texto */
    text-align: left;
    /* Alinea los inputs y el botón a la izquierda dentro del formulario */
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    /* Ocupa todo el ancho disponible del contenedor del formulario */
    padding: 15px;
    border: 1px solid #cccccc;
    /* Borde suave */
    border-radius: 8px;
    /* Bordes ligeramente redondeados */
    font-family: "Work Sans", sans-serif;
    font-size: 1.1rem;
    color: #1d2022;
    background-color: #fcfaf7;
    /* Coherente con el fondo */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: #007bff;
    /* Borde azul al enfocar */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    /* Sombra sutil al enfocar */
    outline: none;
    /* Elimina el contorno por defecto del navegador */
}

#contact-form textarea {
    resize: vertical;
    /* Permite redimensionar verticalmente */
    min-height: 120px;
    /* Altura mínima del área de texto */
}

#contact-form button[type="submit"] {
    background-color: #1d2022;
    /* Fondo oscuro, coherente con tus botones */
    color: #fcfaf7;
    /* Texto claro */
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: center;
    /* Centra el botón si es de ancho variable */
    max-width: 200px;
    /* O un ancho fijo para el botón */
}

#contact-form button[type="submit"]:hover {
    background-color: #4d555b;
    /* Color de hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#contact-form button[type="submit"]:active {
    background-color: #4d555b;
    transform: translateY(0);
    box-shadow: none;
}

/* ========================================================================= */
/* --- SUCCESS MESSAGE STYLE & ANIMATION --- */
/* ========================================================================= */
#success-message {
    opacity: 0; /* Inicialmente invisible */
    transition: opacity 1s ease-in; /* Transición para el fade-in */
    margin-top: 2rem;
    padding: 20px;
    color:  #4d555b;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

#success-message.show {
    opacity: 1; /* Hace visible el mensaje */
}

/*back to top*/

.back-to-top-section {
    display: flex;
    justify-content: center;
    margin: 60px 0 40px;
}

.back-to-top-link {
    display: flex;
    flex-direction: row;
    /* de columna a fila para alineación horizontal */
    align-items: center;
    text-decoration: none;
    color: rgba(60, 60, 60, 0.6);
    gap: 6px;
    font-size: 1.15rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
}

.back-to-top-link:hover {
    color: rgba(30, 30, 30, 0.9);
    background-color: #f0f0f0;
    border-color: #ccc;
    box-shadow: none;
}

.back-to-top-text {
    margin: 0;
    user-select: none;
}

.arrow-icon {
    stroke: currentColor;
    width: 24px;
    /* antes 50px, ahora 24px */
    height: 24px;
    transition: stroke 0.3s ease;
    user-select: none;
}


/* --- Profile Toggle Button Disabled State Styles --- */
.profile-toggle.disabled-toggle {
    opacity: 0.5; /* Make it semi-transparent */
    cursor: default; /* Change cursor to default, indicating no action */
    pointer-events: none; /* Crucial: Prevents click events from firing */
    background-color: #dcdcdc; /* A slightly darker grey background */
    border-color: #bbb; /* Adjust border color */
    color: #888; /* Grey out the text */
}

/* Optional: Add hover effect to the disabled state (or lack thereof) */
.profile-toggle.disabled-toggle:hover {
    background-color: #dcdcdc; /* Keep background same on hover */
    /* No change in opacity or color on hover */
}

/* If your button has active/hover states for general use,
   make sure the disabled state overrides them. */
.profile-toggle.disabled-toggle:active,
.profile-toggle.disabled-toggle:focus {
    outline: none; /* Remove focus outline if undesired */
    box-shadow: none; /* Remove any active/focus box-shadow */
}


/* === PREVIOUS / NEXT PROJECT STYLES === */
.project-navigation-section {
    display: flex;
    justify-content: space-between;
    /* Distribuye los 3 items en los extremos y centro */
    align-items: center;
    margin: 60px auto 10px; /* Increased top margin from 40px to 80px, kept bottom small */
    /* centrado horizontal con margen */
    max-width: 1200px;
    /* ancho máximo para controlar la separación */
    padding: 0 20px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: #444;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: rgba(60, 60, 60, 0.7);
    font-size: 1.15rem;
    transition: color 0.3s ease;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-link:hover {
    color: rgba(30, 30, 30, 0.9);
    background-color: #f0f0f0;
    border-color: #ccc;
    box-shadow: none;
}

.nav-text {
    display: inline-block;
}

.rotate-left {
    transform: rotate(-90deg);
    /* flecha izquierda */
}

.rotate-right {
    transform: rotate(90deg);
    /* flecha derecha */
}

/* ========================================================================= */
/* --- FOOTER --- */
/* ========================================================================= */

footer,
#footer {
    background-color: #1d2022;
    /* Color de fondo oscuro */
    color: #fcfaf7;
    /* Texto claro */
    padding: 20px 0;
    /* Padding superior/inferior y lateral */
    margin-top: 20px;
    /* Espacio por encima del footer */
    /* text-align: center;  Quitamos esto del padre para que flexbox lo maneje mejor */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
}

.footer-content {
    display: flex;
    flex-direction: column; /* Apila los elementos principales: copyright, nav, social */
    align-items: center; /* Centra horizontalmente los elementos apilados */
    max-width: 1200px; /* Mismo ancho que tu contenido principal */
    margin: 0 auto; /* Centra el contenedor del footer */
    gap: 20px; /* Espacio entre el copyright, nav y social */
    list-style: none;
}


.footer-section {
    flex: 1;
    /* Permite que las secciones crezcan y se encojan */
    min-width: 180px;
    /* Ancho mínimo antes de que se envuelvan */
    margin: 20px;
    /* Espacio entre las secciones */
    text-align: left;
    /* Alinea el texto a la izquierda dentro de cada sección */
}

/* Estilos para los enlaces de navegación */
.footer-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    /* Para que los enlaces estén en una línea */
    justify-content: center;
    /* Centra los enlaces de navegación */
    flex-wrap: wrap;
    /* Permite que los enlaces se envuelvan si no hay espacio */
    gap: 25px;
    /* Espacio entre cada enlace de navegación */
}

.footer-nav-links li a {
    color: #fcfaf7;
    /* Color de los enlaces de navegación */
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-nav-links li a:hover {
    color: #007bff;
    /* Color de acento al pasar el ratón */
}

/* Estilos para los enlaces de redes sociales/contacto */
.footer-social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    /* Para que los iconos estén en una línea */
    justify-content: center;
    /* Centra los iconos de redes sociales */
    flex-wrap: wrap;
    /* Permite que los iconos se envuelvan si no hay espacio */
    gap: 25px;
    /* Espacio entre cada icono social */
}

.footer-social-links li a {
    color: #fcfaf7;
    /* Color de los iconos sociales */
    font-size: 1.6rem;
    /* Tamaño de los iconos, ajusta a tu gusto */
    transition: color 0.3s ease;
}

.footer-social-links li a:hover {
    color: #007bff;
    /* Color de acento al pasar el ratón */
}


.footer-copyright {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    /* Un color más tenue para el copyright */
}

.footer-copyright p {
    margin: 5px 0;
    /* Espacio entre las líneas de copyright */
}

/* ========================================================================= */
/* --- RESPONSIVE STYLES (General) --- */
/* ========================================================================= */

/* CAMBIAR: La media query (antes 768px, ahora 769px para que no se superponga con min-width) */
@media (max-width: 768px) {
    /* General Mobile Adjustments */
    body {
        padding: 0;
        margin: 0;
    }

    /* Hero Section */
    #hero {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 6rem 1.5rem;
        margin-top: 40px; /* Reduce margin top for mobile */
    }

    .hero-content,
    .image-content {
        width: 100%;
        text-align: center;
        padding: 0 0rem;
        box-sizing: border-box;
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: 1px;
        line-height: 1.2;
        text-align: left;
    }

    .hero-description {
        font-size: 1.4rem; /* Ligeramente más pequeño para móviles */
        margin-bottom: 20px;
        padding: 0 0rem;
        text-align: left;
    }

    /* Image content */
    .image-content {
        margin-top: 20px; /* Espacio entre el texto y la imagen en móvil */
    }

    /* Back to Portfolio */
    .back-to-portfolio-container {
        padding: 15px 1rem 0;
    }

    .back-to-portfolio {
        font-size: 0.9rem;
        text-align: left;
    }

    /* Projects Section (Cards) */
    #projects h2 {
        margin: 40px auto 40px; /* Ajusta márgenes para móvil */
        padding: 0 1rem; /* Añade padding horizontal */
        font-size: 2rem; /* Reduce el tamaño del título de sección */
    }

    .project-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1.5rem;
        margin: 40px auto; /* Ajusta márgenes para móvil */
    }

    .project-card a .project-title {
        font-size: 1.3rem;
    }

    /* Project Detail Page */
    .project-container {
        padding: 2rem;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 1rem;
        gap: 1rem; /* Reduce el gap */
    }

    .project-container .project-header .project-title {
        flex: none;
        width: 100%;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
        margin-top: 2rem; /* Ajusta márgenes para que se vean bien apilados */
        margin-bottom: 1rem;
        box-sizing: border-box;
        font-size: 2rem; /* Reduce el tamaño del título de detalle */
    }

    .project-brief {
        flex: none;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-top: 1rem;
        margin-bottom: 1rem;
        box-sizing: border-box;
    }

    .project-brief h2 {
        font-size: 1.6rem; /* Reduce el tamaño del h2 del brief */
    }

    .project-brief p {
        font-size: 1.2rem; /* Reduce el tamaño del párrafo del brief */
    }

    .project-ficha {
        flex-direction: column; /* Apila los elementos de la ficha */
        gap: 0.8rem; /* Reduce el espacio */
    }

    .project-ficha > div {
        flex: none;
        width: 100%; /* Ocupa todo el ancho */
        padding: 0.8rem; /* Ajusta el padding */
        font-size: 1.1rem; /* Reduce el tamaño de fuente */
    }

    .project-media img {
        margin-bottom: 1rem; /* Menos margen entre imágenes */
    }

    .project-challenge,
    .project-gallery,
    .project-result,
    .project-content-section,
    .project-process,
    .project-learnings,
    .project-contribution,
    .project-inspiration {
        font-size: 1.2rem; /* Reduce el tamaño del texto del cuerpo */
        margin-top: 5%; /* Menos margen superior */
        margin-bottom: 30px; /* Menos margen inferior */
        
    }

    .project-content-section h2 {
        font-size: 1.8rem; /* Reduce el tamaño de los subtítulos */
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* Una columna para galerías en móvil */
        padding: 0 1rem; /* Añade padding horizontal */
        gap: 0.8rem; /* Reduce el espacio entre imágenes */
    }

    .project-video {
        width: 90%; /* Más ancho en móvil */
        margin: 2rem auto 1rem auto; /* Ajusta márgenes */
    }

    .fallback-text,
    .video-description {
        font-size: 1rem; /* Más pequeño para móvil */
        padding: 0 1rem;
    }

    /* Skills Section */
    #skills {
        margin: 40px auto; /* Ajusta márgenes */
        padding: 2rem 1rem; /* Ajusta padding */
    }

    #skills h2 {
        font-size: 2rem; /* Reduce el tamaño del título */
        margin-bottom: 30px;
    }

    #skills-list li {
        font-size: 0.9rem; /* Reduce el tamaño de los tags */
        padding: 8px 15px;
    }

    /* Contact Section */
    #contact {
        margin: 40px auto; /* Ajusta márgenes */
        padding: 2rem 1rem; /* Ajusta padding */
    }

    #contact h2 {
        font-size: 2rem; /* Reduce el tamaño del título */
        margin-bottom: 20px;
    }

    #contact p {
        font-size: 1.1rem; /* Reduce el tamaño del texto */
    }

    #contact-form {
        gap: 15px; /* Reduce espacio entre campos */
        margin-top: 20px;
    }

    #contact-form input[type="text"],
    #contact-form input[type="email"],
    #contact-form textarea {
        padding: 12px; /* Reduce padding de inputs */
        font-size: 1rem;
    }

    #contact-form button[type="submit"] {
        padding: 12px 20px; /* Reduce padding del botón */
        font-size: 1.1rem;
    }

    /* Footer */
    .footer-content {
        gap: 15px; /* Reduce el espacio entre elementos del footer */
        padding: 0 1rem; /* Añade padding horizontal */
    }

    .footer-nav-links,
    .footer-social-links {
        gap: 15px; /* Reduce el espacio entre enlaces/iconos */
    }

    .footer-nav-links li a {
        font-size: 0.9rem; /* Reduce el tamaño de los enlaces del footer */
    }

    .footer-social-links li a {
        font-size: 1.4rem; /* Reduce el tamaño de los iconos sociales */
    }

    .footer-copyright {
        font-size: 0.75rem; /* Más pequeño para copyright */
    }

    /* Previous/Next Project Nav */
    .project-navigation-section {
        flex-direction: column; /* Apila los enlaces de navegación */
        gap: 15px; /* Espacio entre ellos */
        margin: 40px auto 10px; /* Ajusta márgenes */
        padding: 0 1rem; /* Añade padding horizontal */
    }

    .nav-link {
        font-size: 1rem; /* Reduce tamaño de fuente */
        padding: 6px 12px;
    }
}



    /* Swiper (Carousels) */
    .swiper {
        max-width: 100%;
        margin: 1rem auto;
        padding: 0 1rem; /* Asegura que el swiper no toque los bordes */
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none; /* Ocultar en móvil para mejor UX, ya que se suele usar el swipe */
    }

    .swiper-pagination {
        position: relative; /* Ajusta la posición si es necesario */
        bottom: -10px; /* Mueve la paginación un poco hacia abajo */
    }



/* =============================
   LIGHTBOX STYLES MEJORADOS
   ============================= */

.custom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  width: 90%;
  height: 90%;
  max-width: 1200px;
  max-height: 800px;
  display: flex;
  flex-direction: column;
}

/* BOTÓN DE CERRAR MEJORADO */
.lightbox-close {
  position: absolute;
  top: -20px;
  right: 70px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
  stroke: #333;
  stroke-width: 2.5;
}

/* Swiper container */
.mySwiper {
  width: 100%;
  height: calc(100% - 60px);
  border-radius: 8px;
  overflow: visible; /* Permitir que las flechas se vean fuera */
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent;
  text-align: center;
}

.swiper-slide img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

/* Navegación del swiper - SIN CÍRCULO */
.swiper-button-next,
.swiper-button-prev {
  color: rgba(255, 255, 255, 0.9) !important;
  background: none !important; /* Sin fondo circular */
  border-radius: 0 !important;
  width: 50px !important;
  height: 50px !important;
  margin-top: -25px !important;
  transition: all 0.2s ease;
  font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  color: rgba(255, 255, 255, 1) !important;
  transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 24px !important;
  font-weight: 900 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Paginación */
.swiper-pagination {
  bottom: 10px !important;
}

.swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5) !important;
  opacity: 1 !important;
  transition: all 0.2s ease;
}

.swiper-pagination-bullet-active {
  background: rgba(255, 255, 255, 1) !important;
  transform: scale(1.2);
}

/* Título del lightbox */
.lightbox-title {
  color: white;
  text-align: center;
  font-size: 16px;
  margin-top: 15px;
  padding: 0 20px;
  font-weight: 500;
  line-height: 1.4;
}

/* Cursor pointer para imágenes clickeables - SOLO LA IMAGEN */
[data-lightbox] img {
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-lightbox] img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* El contenedor no debe tener cursor pointer */
[data-lightbox] {
  cursor: default;
}

.zoomable-image {
  transition: transform 0.3s ease;
  will-change: transform;
  cursor: zoom-in;
  cursor: default;
  max-width: 100%;
  max-height: 100%;
  user-select: none;
}

.zoomed-in {
  cursor: zoom-out;
}

/* Responsive */
@media (max-width: 768px) {
  .lightbox-content {
    width: 95%;
    height: 95%;
  }
  
  .lightbox-close {
    top: -40px;
    right: -5px;
    width: 40px;
    height: 40px;
  }
  
  .lightbox-close svg {
    width: 20px;
    height: 20px;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px !important;
  }
  
  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 20px !important;
  }
  
  .swiper-slide img {
    max-width: 95%;
    max-height: 95%;
  }
  
  .lightbox-title {
    font-size: 14px;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .lightbox-close {
    top: -35px;
    right: 0;
    width: 36px;
    height: 36px;
  }
  
  .lightbox-close svg {
    width: 18px;
    height: 18px;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    width: 40px !important;
    height: 40px !important;
    margin-top: -20px !important;
  }
  
  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 18px !important;
  }
  
  .swiper-slide img {
    max-width: 98%;
    max-height: 98%;
  }
}