/* --------- Dropdown menú de proyectos --------- */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-toggle {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  padding: 0 0.5em;
}
.dropdown-menu {
  display: none;
  position: absolute;
  
  left: 0;
  min-width: 160px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
  border-radius: 0.5em;
  z-index: 300;
  padding: 0.5em 0;
}
.dropdown-menu a {
  display: block;
  padding: 0.5em 1.2em;
  color: #111;
  text-decoration: none;
  font-size: 1em;
  transition: background 0.2s;
  margin-bottom: 0.3em;
}
/* Eliminar el margen en el último elemento */
.dropdown-menu a:last-child {
  margin-bottom: 0;
}
.dropdown-menu a:hover {
  background: #f5eee6;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}
/* --------- Botón volumen/mute en vídeos --------- */
.video-container {
  position: relative;
  width: 100%;
  height: 100%;
}
.video-mute-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.7);
  border: none;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 1.25rem;
  transition: background 0.2s;
}
.video-mute-btn:hover {
  background: rgba(255,255,255,0.95);
}
.mute-icon {
  pointer-events: none;
}
@media (max-width: 720px) {
  .polaroid-img,
  .about-image img {
    width: clamp(220px, 90vw, 380px) !important;
    max-width: 98vw !important;
  }
}
/* --------- Animación hamburguesa a X --------- */
.menu-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
/* --------- Menú hamburguesa --------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 1.7rem;
  height: 1.7rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 300;
}
.menu-toggle span {
  display: block;
  width: 1.3rem !important;
  height: 3px !important;
  margin: 0.22rem 0 !important;
  background: #111 !important;
  border-radius: 2px !important;
  transition: 0.3s;
}

/* --------- Lightbox global (galerías) --------- */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 1.2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  background: #222;
  object-fit: contain;
  display: block;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close { right: 2vw; top: 7vh; transform: none; }
.lightbox-prev { left: 2vw; }
.lightbox-next { right: 2vw; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: #fff; }
@media (max-width: 700px) {
  .lightbox-close, .lightbox-prev, .lightbox-next {
    width: 2rem; height: 2rem; font-size: 1.1rem;
  }
  .lightbox-close { right: 1vw; top: 2vh; }
  .lightbox-prev { left: 1vw; }
  .lightbox-next { right: 1vw; }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    z-index: 250;
    box-shadow: none;
    padding: 0;
  }
  .main-nav.open {
    display: flex;
  }
}
/* --------- Base --------- */

:root {
  --bg: #f5eee6;
  --bg-alt: #f0e5da;
  --text: #111111;
  --muted: #6b6460;
  --border: #d6c9bc;
  --accent: #111111;
  --accent-soft: #00000010;
  --btn-text: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  /* padding-bottom eliminado, footer ya no es fijo */
}

/* --------- Layout común --------- */

.section {
  padding: 6rem min(6vw, 5rem);
}

.section-header {
  max-width: 720px;
  margin-bottom: 3rem;
}

.section-header h1,
.section-header h2 {
  margin: 0 0 1rem;
}

.main-nav a,
.logo a {
  text-decoration: none;
  color: inherit;
}

/* --------- Header --------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem min(6vw, 5rem); /* antes 1.25rem */
  background-color: #fff;
  border-bottom: none;
  backdrop-filter: blur(12px);
}



.logo a {
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none; /* <-- Esto mantiene la escritura tal cual en HTML */
  font-size: 0.9rem;
}


.main-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.main-nav a {
  position: relative;
  padding-bottom: 0.2rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  width: 100%;
}

/* --------- Botones --------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn.primary {
  background-color: var(--accent);
  color: var(--btn-text);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px var(--accent-soft);
}

.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn.ghost:hover {
  background-color: var(--accent-soft);
}

.btn.wide {
  width: 100%;
}

/* --------- Hero --------- */

.hero {
  padding-top: 7rem;
  padding-bottom: 5rem;
}

.hero-text {
  max-width: 720px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin: 0 0 0.5rem;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  font-weight: 500;
}

.hero-description {
  max-width: 480px;
  margin-bottom: 2rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --------- Polaroid hero --------- */
.polaroid-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
}

/* La clase .section mete padding; aquí lo anulamos para la portada */
.polaroid-hero.section {
  padding: 0;
}

.polaroid-img {
  width: clamp(280px, 50vw, 560px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
}

/* (Showcase eliminado: se integra en el carrusel) */

/* --------- Carrusel --------- */

.featured-projects {
  border-top: 0;
  padding: 0;
}

/* La clase .section mete padding; aquí lo anulamos para full-bleed */
.featured-projects.section {
  padding: 0;
}

.carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.carousel-track-container {
  overflow: hidden;
  flex: 1;
}

/* Flechas sin "margen" lateral: van superpuestas */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.carousel-control.prev { left: 1rem; }
.carousel-control.next { right: 1rem; }

.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
}

/* En home: deja asomar el siguiente proyecto */
.featured-projects .project-slide {
  min-width: 92%;
}

.project-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: center;
}

.project-slide.full {
  display: block;
}

.project-slide.full .project-media {
  position: relative;
  height: clamp(60vh, 75vh, 85vh);
  border-radius: 0;
  overflow: hidden;
  background-color: var(--bg-alt);
}

.project-media.has-poster {
  position: relative;
}

.project-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.project-slide.full .project-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease;
}

/* En cualquier slide con portada: por defecto se ve la imagen */
.project-media.has-poster .project-video {
  opacity: 0;
}

/* Cuando se reproduce, se muestra el vídeo y se oculta la portada */
.project-media.is-playing .project-video {
  opacity: 1;
}

.project-media.is-playing .project-poster {
  opacity: 0;
}

.project-overlay {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  z-index: 2;
}

.overlay-title {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: #ffffff;
}

.overlay-type {
  margin: 0 0 1rem;
  color: #ffffffcc;
}

.project-overlay .btn.ghost {
  border-color: rgba(255,255,255,0.6);
  color: #ffffff;
  background: rgba(255,255,255,0.15);
}

.project-overlay .btn.ghost:hover {
  background: rgba(255,255,255,0.25);
}

.project-media {
  border-radius: 1.25rem;
  overflow: hidden;
  background-color: var(--bg-alt);
}

.project-video {
  width: 100%;
  display: block;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.project-slide:hover .project-video {
  transform: scale(1.02);
}

.project-info h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.project-type {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.project-desc {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.project-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--accent);
  position: relative;
  padding-bottom: 0.1rem;
}

.project-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.project-link:hover::after {
  width: 100%;
}

.carousel-control {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: inherit;
}

.carousel-control::before {
  display: block;
  font-size: 2.25rem;
  line-height: 1;
  color: #ffffff;
  opacity: 0.75;
}

.carousel-control.prev::before { content: "⟵"; }
.carousel-control.next::before { content: "⟶"; }

.carousel-control:hover::before {
  opacity: 1;
}

/* --------- Grid proyectos --------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.project-card {
  border-radius: 1.25rem;
  overflow: hidden;
  background-color: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px var(--accent-soft);
  border-color: var(--accent);
}

.project-thumb img {
  width: 100%;
  display: block;
}

.project-card-body {
  padding: 1.25rem 1.5rem 1.4rem;
}

.project-card-body h2 {
  margin: 0 0 0.35rem;
}

/* --------- About --------- */

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.about-layout.compact {
  padding-top: 3rem;
  padding-bottom: 3rem;
  margin-bottom: 50px;
}

.about-image img {
  width: clamp(280px, 50vw, 560px);
  max-width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 1.5rem;
  object-fit: cover;
}

.about-image .image-placeholder {
  width: 100%;
  padding-top: 120%;
  background: var(--bg-alt);
  border-radius: 1.5rem;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

  .about-text p {
    margin-top: 0;
    margin-bottom: 0;
  text-align: center;
  font-size: 0.95rem;
  color: #111;
}

.about-text {
  font-size: 0.82rem;
}

/* Primer párrafo: margen inferior */
.about-text p:first-child {
  margin-bottom: 0.5rem;
}

/* Último párrafo: margen superior */
.about-text p:last-child {
  margin-top: 0.5rem;
}
    font-size: 0.82rem;
.about-text strong {
  color: var(--text);
  font-weight: 600;
}

/* --------- Contact --------- */

.contact-section {
  padding: 6rem min(6vw, 5rem);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  position: relative;
  overflow: hidden;
  padding-top: 7rem;
}

.contact-bg-video {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.65) saturate(1.1);
  pointer-events: none;
  opacity: 0.7;
}

.contact-image img {
  width: 100%;
  display: block;
  border-radius: 1.2rem;
  object-fit: cover;
}

.contact-panel {
  border: none;
  border-radius: 0;
  padding: 0;
  display: block;
  background: none;
  color: #fff;
  position: relative;
  z-index: 2;
}

.contact-panel h1 {
  margin-top: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  margin-bottom: 2rem;
  text-align: center;
}

.contact-inner {
  border: none;
  border-radius: 0;
  padding: 0;
  display: block;
  background: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 0.35rem;
  color: #fff;
}

.contact-form input,
.contact-form textarea {
  border: none;
  border-bottom: 1.5px solid #fff;
  padding: 0.4rem 0;
  background: rgba(0,0,0,0.25);
  font-family: inherit;
  font-size: 0.9rem;
  color: #fff;
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #eee;
  opacity: 1;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--accent);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
  font-size: 0.9rem;
  color: #fff;
}

.contact-info a {
  color: #fff;
}

.contact-info a[href^="mailto"] {
  color: #fff !important;
}

.contact-block h2 {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}

.contact-block p {
  margin: 0;
  color: var(--muted);
}

.contact-block a {
  color: var(--accent);
  text-decoration: none;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.15rem;
}

.social-links a {
  color: #fff;
}

.social-links a:hover {
  text-decoration: underline;
}

/* --------- Footer --------- */

.site-footer {
  padding-top: 2.5rem;
  padding-bottom: 0;
  padding-left: min(6vw, 5rem);
  padding-right: min(6vw, 5rem);
  border-top: none;
  font-size: 0.8rem;
  color: var(--muted);
  /* Footer vuelve a ser estático */
}

/* --------- Animaciones scroll --------- */

.fade-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* --------- Responsive --------- */

@media (max-width: 960px) {
  .project-slide {
    grid-template-columns: 1fr;
  }

  .about-layout,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .contact-inner {
    grid-template-columns: 1fr;
  }

  .site-header {
    gap: 1rem;
  }
}

@media (max-width: 720px) {
  .section,
  .contact-section {
    padding-inline: 1.5rem;
  }

  .main-nav {
    display: none; /* Mantenerlo simple. Más adelante se podría hacer menú hamburguesa. */
  }

  .hero {
    padding-top: 5.5rem;
  }
}

/* Masonry grid para galerías tipo proyecto-beachclub */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
  grid-auto-flow: dense;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.masonry-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1.1rem;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  background: #f5eee6;
  transition: box-shadow 0.2s;
  cursor: pointer;
}
.masonry-grid img.wide {
  grid-column: span 2;
}
@media (max-width: 700px) {
  .masonry-grid {
    grid-template-columns: 1fr 1fr;
  }
  .masonry-grid img.wide {
    grid-column: span 2;
  }
}

/* Layout de dos columnas para contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: start;
  max-width: 800px;
  margin: 0 auto;
}
.contact-form-col {
  min-width: 0;
}
.contact-info-col {
  min-width: 0;
}
@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-info-col {
    margin-top: 2.5rem;
  }
}
