/* ---------------- Variables CSS ---------------- */
:root {
  --background: #FFFBFB;
  --text-primary: #202626;
  --text-secondary: #B1BABA;
  --accent: #C33C54;
  --accent-hover: #d85c6f;
  --max-width: 1200px;
}

/* ---------------- Estilos globales ---------------- */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--text-primary);
  font-family: 'Hind Siliguri', sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
}

main {
  padding: 0;
  margin: 0;
}
/* ---------------- Header ---------------- */
.site-header {
  width: 100%;
  background: var(--background);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.logo {
  margin: 0;
  font-family: 'Hubballi', cursive;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.brand-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.5;
}

.status {
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
  font-size: 0.85rem;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: -6px;
  border-radius: 50%;
  background-color: rgba(195, 60, 84, 0.25);
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.8); opacity: 0.1; }
  100% { transform: scale(1); opacity: 0.6; }
}

.main-nav {
  display: flex;
  justify-content: right;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-weight: 400;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.main-nav a.active {
  font-weight: 700;
  color: var(--accent);
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--accent);
}

.lang-toggle {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

/* ---------------- Carrusel de Proyectos ---------------- */
.carousel-section {
  position: relative;
  margin: 1rem auto 0; 
  padding: 0 1.5rem;
  max-width: var(--max-width);
}

.carousel-wrapper {
  position: relative;
}

.carousel-container {
  overflow-x: scroll;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  cursor: grab;
}

.carousel-container.active {
  cursor: grabbing;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.carousel {
  display: flex;
  gap: 20px;
  padding-bottom: 0;
  align-items: flex-start;
  max-width: var(--max-width);
  margin-top: 40px;
}

.project-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex: 0 0 calc((100% / 4.5) - 16px);
  scroll-snap-align: start;
}

.project-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 405px;
  width: 100%;
}

.project-card-content {
  padding: 0;
  flex-grow: 1;
}

.project-card h3 {
  margin: 0.75rem 0 0.25rem 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.project-card p {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.project-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease-in-out; /* Añadido para la transición del hover */
}

.project-card-process img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  cursor: default;
  opacity: 50%;
  transition: opacity 0.3s ease-in-out; /* Añadido para la transición del hover */
}

/* Reglas para el efecto de hover */
.project-card-link:hover .project-card img {
  opacity: 0.8;
}

.project-card-link-process:hover .project-card-process img {
  opacity: 0.8;
}

.project-card-process {
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 405px;
  width: 100%;
}

.project-card-process h3 {
  margin: 0.75rem 0 0.25rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: default;
}

.project-card-process p {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: default;
}

.project-card-link-process {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex: 0 0 calc((100% / 4.5) - 16px);
  scroll-snap-align: start;
  cursor: default;
}

/* Nuevos estilos para la navegación del carrusel */
.carousel-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
  padding-right: 0rem;
}

.carousel-btn {
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  color: var(--accent);
}

.carousel-btn:hover {
  background-color: var(--accent);
  color: var(--background);
}

.carousel-btn i {
  font-size: 1.5rem;
}


/* ---------------- Página de detalle de proyecto ---------------- */
.back-nav {
  max-width: var(--max-width);
  margin: 1rem auto 0 auto;
  padding: 0 1.5rem;
}

.back-button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: var(--accent-hover);
}

.arrow-left {
  font-size: 1rem;
}

.project-detail {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 1.5rem 0;
}

.project-detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-bottom: clamp(3rem, 8vw, 6rem);
}

.project-detail-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .project-detail-title {
    display: block;
    max-width: var(--max-width);
    margin: 0 auto 1.5rem auto; /* centrado con un margen inferior */
    white-space: normal; /* para que no se corte en una sola línea */
  }
}

.project-detail-body {
  max-width: 65ch;
  margin-left: 1rem;
}

.project-detail-video {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.video-audiovisual {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
  max-height: 80vh;
}

.detail-meta-text {
  color: var(--text-secondary);
}

/* Sección de imagen a pantalla completa */

.section-hero,
.full-width-section,
.full-width-section figure {
  margin: 0;
  padding: 0;
}

.full-width-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
}

/* * Aplica el sombreado únicamente a la imagen que está dentro de la
 * PRIMERA sección con la clase 'full-width-section'.
 */
section.full-width-section:first-of-type img {
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.full-width-section img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
}

/* boton link */
.btn-link {
  display: block;
  margin: 30px 0 0 0;
  padding: 0;
  color: var(--accent);
  border: none;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  background: none;
}

.btn-link:hover,
.btn-link:focus {
  color: #d85c6f;
}

/* ---------------- Galería ---------------- */
.gallery-section-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 0rem;
}

.gallery-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap; /* Permite que los elementos se ajusten a la siguiente línea */
  gap: 5rem; /* Reduce el espacio entre botones para mejor ajuste en móvil */
  justify-content: center;
  border-bottom: 3px solid var(--text-secondary);
  padding-bottom: 10px;
  margin-bottom: 60px;
}

.gallery-button {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0.5rem 0;
  white-space: nowrap;
}

.gallery-button.active {
  font-weight: 600;
}

/* Se ha eliminado el `gallery-underline` dinámico para simplificar */
.gallery-underline {
  display: none;
}

.gallery-content {
  display: none;
}

.gallery-content.active {
  display: block;
}

.gallery-image-single img {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-1 * ((100vw - 100%) / 2));
  height: auto;
  display: block;
}

.gallery-image-grid {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-1 * ((100vw - 100%) / 2));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.gallery-image-grid img {
  width: 100%;
  height: 100%;
  display: block;
}

/* ----------------- Acordion --------------*/
.accordion-section {
  max-width: 100%;
  margin: 0 auto;
}

.accordion-item {
  border-bottom: 1px solid #ddd;
  margin-top: 0.5rem;
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.accordion-header:hover {
  color: var(--accent);
}

.accordion-header i {
  transition: transform 0.3s ease;
}

.accordion-header.active i {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-1 * ((100vw - 100%) / 2));
}

.accordion-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  margin: 0;
}

/* ---------------- Contacto ---------------- */
.contact-section {
  max-width: var(--max-width);
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.contact-wrapper {
  /* Cambios clave: centramos el contenido y eliminamos la cuadrícula */
  display: flex;
  flex-direction: column;
  align-items: center; /* Centra el contenido horizontalmente */
  gap: 2rem; /* Reduce el espacio entre elementos si es necesario */
}

.contact-intro {
  /* Alineamos el texto de introducción al centro */
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
  max-width: 600px; /* Le damos un ancho máximo para que no sea una línea muy larga en pantallas grandes */
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  /* Centramos los elementos de la lista */
  align-items: flex-start;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--text-primary);
}

.info-item i {
  font-size: 1rem;
  color: var(--accent);
}

.info-item a {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.info-item a:hover {
  color: var(--accent);
}

/* Hemos eliminado todas las reglas relacionadas con el formulario (.contact-form, .form-group, .contact-button, etc.)
*/

/* Opcional: ajustamos el responsive */
@media (max-width: 768px) {
  .contact-wrapper {
    gap: 2rem;
  }
}

/* Nuevo estilo para la sección "Sobre Mí" */
.about-me-section {
  max-width: var(--max-width);
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.about-me-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.about-me-intro {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-right: 100px;
}

.intro-text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent);
}

.about-me-content {
  display: flex;
  flex-direction: column;
}

.tabs-nav {
  display: flex;
  gap: 3rem;
  padding-bottom: 10px;
}

.tab-button {
  background: none;
  border: none;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem 0;
  white-space: nowrap;
  position: relative;
  transition: color 0.3s ease;
}

.tab-button.active {
  color: var(--text-primary);
  font-weight: 600;
}

.tab-button:hover:not(.active) {
  color: var(--accent);
}

.tab-content-container {
  margin-top: 1rem;
}

.tab-content {
  display: none;
  line-height: 1.6;
}

.tab-content.active {
  display: block;
}

.tab-content p {
  margin: 0;
  color: var(--text-primary);
}

.flags {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
}

.flags img {
  width: 40px;
  height: auto;
  border-radius: 50%;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive para la sección */
@media (max-width: 768px) {
  .about-me-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .tabs-nav {
    gap: 1.5rem;
  }
}

/* ---------------- Footer ---------------- */
.site-footer {
  margin-top: 0;
  padding: 4rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.footer-logo {
  margin: 0 0 2rem 0;
  font-family: 'Hubballi', cursive;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  font-weight: 400;
}

.footer-links a {
  text-decoration: none;
  color: var(--accent);
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--accent-hover);
}

/* ---------------- Botón Volver Arriba ---------------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 200;

  display: flex;
  justify-content: center;
  align-items: center;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ==================================
  ESTILOS RESPONSIVE
================================== */
@media (max-width: 1024px) {
  /* Cabecera */
  .header-inner {
    padding: 1rem 1rem;
  }
  
  .main-nav {
    gap: 1.5rem;
  }

  /* Carrusel */
  .carousel-section {
    margin-top: 1rem;
    padding: 0 1rem;
  }
  
  .project-card-link,
  .project-card-link-process {
    flex: 0 0 calc((100% / 3.5) - 14px);
  }
  
  /* Galería */
  .gallery-nav {
    gap: 1rem; /* Reduce el espacio entre botones en tablets */
  }

}

@media (max-width: 768px) {
  /* Cabecera */
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1rem 0.5rem;
  }

  .brand-status {
    width: 100%;
    align-items: center; /* Centra los elementos dentro de .brand-status */
  }

  .main-nav {
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
  }

  /* Carrusel */
  .carousel-section {
    margin-top: 1rem;
  }

  .project-card-link,
  .project-card-link-process {
    flex: 0 0 calc((100% / 1.5) - 10px);
  }
  
  .carousel-nav {
    justify-content: center;
    padding-right: 0;
  }
  
  .project-card {
    min-height: 350px;
  }

  /* Detalle de proyecto */
  .project-detail-header {
    display: block; /* Cambia el grid a un bloque para apilar los elementos */
  }

  .project-detail-body {
    margin-left: 0; /* Elimina el margen para que se alinee correctamente */
    margin-top: 2rem; /* Agrega un espacio entre los bloques */
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }
  
  /* Carrusel */
  .project-card-link,
  .project-card-link-process {
    flex: 0 0 calc((100% / 1.1) - 10px);
  }
  
  .project-card {
    min-height: 300px;
  }
}