:root {
  /* Paleta de colores */
  --color-bg: #fafaf8;
  --color-text: #555555;
  --color-purple: #c3aafd;
  --color-green: #234A46;
  --color-beig:#f1dfc9;

  /* Tipografía */
  --font-family-base: 'Inter', sans-serif;
  --font-size-base: 20px;
  --font-regular: 500;
  --font-bold: 700;

  /* Layout */
  --container-max-width: 1366px;
  --container-width: 92%;
  --section-padding-y: 100px;
  --section-padding-y-mobile: 60px;
  --grid-gap: 32px;
  --hero-height:700px;

  /* Animaciones */
  --transition-fast: 0.3s ease;
  --transition-menu: right 0.4s ease;

  /* Formulario */
  --mf-font-size: 18px;
  --mf-label-size: 13px;
  --mf-padding-y: 12px;
  --mf-padding-x: 4px;
  --mf-border: 1.5px;
  --mf-transition: .3s ease;
}

/* =============================================
   GENERIC - Reset & Base
   ============================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-regular);
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

/* =============================================
   ELEMENTS - Elementos HTML base
   ============================================= */

/* -----Accesibilidad navegación por teclado -------*/
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-purple);
  outline-offset: 4px;
}

button {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3 {
  color: var(--color-green);
  font-family: 'Georgia', serif;
  font-weight: bold;
}

h1,
h2,
p {
  margin-bottom: 25px;
}

h3 {
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(2.5rem, 2.2rem + 0.8vw, 3.125rem);
  line-height: 1;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  line-height: 1.1;
}

h3 {
  font-size: clamp(0.8rem, 1.3rem + 0.5vw, 1.7rem);
  line-height: 1.1;
}

.descri-block ul,
.grid ul {
  display: table;
  margin-inline: auto;
  text-align: left;
}

.descri-block ul li,
.grid ul li {
  margin-bottom: 10px;
}

p {
  line-height: 1.4;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =============================================
   OBJECTS - Patrones de layout reutilizables (MÓVIL POR DEFECTO)
   ============================================= */

/* Contenedor de sección */
header,
section,
footer {
  position: relative;
  width: min(var(--container-max-width), var(--container-width));
  margin-inline: auto;
}

section {
  padding-block: var(--section-padding-y-mobile);
  /* Por defecto móvil */
}

.section-header {
  text-align: center;
}

/* Contenedores descriptivos */
.descri-block {
  margin-inline: auto;
  max-width: 800px;
  text-align: center;
}

.descri-block {
  margin-bottom: 60px;
}

.descri-image{
  aspect-ratio: 1/1;
}

.descri-image img {
  transition: var(--transition-fast);
  border-radius: 20px;
  margin: 0 auto;
}

.descri-image img:hover {
  transform: scale(1.05);
}

/* Grid layouts básicos */
.grid {
  display: grid;
  gap: var(--grid-gap);
  margin-bottom: 60px;
}

.grid-start{
  align-items: start;
}

/* Comportamiento natural en móvil: fluyen en una sola columna */
.grid-2,
.grid-3 {
  grid-template-columns: 1fr;
}

.grid img {
  justify-self: center;
  margin-inline: auto;
}

/* --- Tarjetas glass --- */
.glass-card,
.contact-card {
  border: 1px solid #ddd;
  border-radius: 24px;
  padding: 20px;
}

.glass-card {
  transition: var(--transition-fast);
}

.glass-card:hover {
  transform: scale(1.05);
}

.glass-card img {
  width: 100%;
  margin-block: 40px;
}

/* --- Botones --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 16px 32px;
  border-radius: 16px;
  text-decoration: none;
  margin-top: 32px;
  color: var(--color-bg);
  font-weight: var(--font-bold);
  background-color: var(--color-green);
}

.btn-primary:hover {
  color:var(--color-green);
  background-color: var(--color-beig);
}

.btn-link {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 3px solid var(--color-green);
}

.btn-link:hover {
  border: none;
}

/* Contenedor flex para centrar botones */
.btn-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* --- Eyebrow --- */
.eyebrow {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
  padding-bottom: 10px;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--color-green);
}

.eyebrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 60px;
  height: 2px;
  background: var(--color-green);
  transform: translateX(-50%);
}

/* =============================================
   HEADER & NAVEGACIÓN (MÓVIL POR DEFECTO)
   ============================================= */
header {
  z-index: 1000;
}

.navbar {
  max-height: 100%;
  margin-inline: auto;
  padding: 1rem clamp(15px, 5vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  max-width: clamp(180px, 30vw, 353px);
}

/* Menú oculto lateral por defecto (Móvil) */
.nav-links {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(300px, 80vw);
  height: 100dvh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding: 100px 2rem 2rem;
  gap: 2rem;
  list-style: none;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition-menu);
  z-index: 1000;
  overflow-y: auto;
}

.nav-links a {
  color: var(--color-green);
  text-decoration: none;
  padding: 10px;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

/* Hamburguesa visible por defecto */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  border-radius: 5px;
  transition: var(--transition-fast);
  background-color: var(--color-green);
}

.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Interacciones del menú hamburguesa */
.menu-toggle:checked~.nav-links {
  right: 0;
}

.menu-toggle:checked~.hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle:checked~.hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked~.hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* =============================================
    HERO (MÓVIL POR DEFECTO)
   ============================================= */
#hero {
  padding-block: 0;
  background-image: url('../images/bg.jpg');
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--grid-gap);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 20px;
}

.hero-visual {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  display: none;
}

.hero-visual img {
  position: relative;
  overflow: hidden;
}

.hero-image {
  object-fit: contain;
  height: 100%;
  width: auto;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  #hero {
    background-image: none;
  }

  .hero-visual {
    display: block;
  }

  .hero-grid {
    padding-block: 0;
  }
}

/* =============================================
    SECCIONES - Reglas particulares
   ============================================= */

/* =============================================
   COLLAGE - MOBILE FIRST
   ============================================= */

/* CONTAINER */
.collage-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* IMAGE SLOT */
.image-slot {
  flex: none;
  width: min(88vw, 420px);
  display: flex;
  justify-content: center;
}

/* IMAGE WRAPPER */
.collage-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  z-index: 2;
}

/* PIECES */
.collage-pieces {
  display: none;
  position: absolute;
  inset: 0;
}

/* FULL IMAGE */
.collage-full {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  opacity: 1;
  z-index: 1;
  transition: var(--transition-fast);
}

.collage-full:hover {
  transform: scale(1.05);
}

/* TILES */
.tile {
  position: absolute;
  width: calc(50% - 2px);
  height: calc(50% - 2px);
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
  will-change: transform;
}

.t1 {
  top: 0;
  left: 0;
}

.t2 {
  top: 0;
  left: calc(50% + 2px);
}

.t3 {
  top: calc(50% + 2px);
  left: 0;
}

.t4 {
  top: calc(50% + 2px);
  left: calc(50% + 2px);
}

/* TEXT SLOT */
.text-slot {
  flex: none;
  width: 100%;
  max-width: 480px;
  opacity: 1;
  will-change: opacity, transform;
}

/* DESKTOP - ACTIVACIÓN DEL COLLAGE */

@media (min-width: 768px) {

  /* CONTAINER */
  .collage-container {
    flex-direction: row;
    align-items: start;
    gap: 60px;
  }

  /* IMAGE SLOT */
  .image-slot {
    flex: 0 0 calc(50% - 30px);
    width: auto;
  }

  /* IMAGE WRAPPER */
  .collage-wrapper {
    width: 100%;
    max-width: 600px;
  }

  /* PIECES */
  .collage-pieces {
    display: block;
  }

  /* FULL IMAGE */
  .collage-full {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
  }

  /* TEXT SLOT */
  .text-slot {
    flex: 0 0 calc(50% - 30px);
    width: auto;
    max-width: none;
    opacity: 0;
  }

}

/* =============================================
   FAQ
   ============================================= */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  padding: 30px 20px;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-question {
  width: 100%;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  font-size: 1.8rem;
  font-weight: var(--font-regular);
  transition: transform var(--transition-fast);
  line-height: 1;
}

details.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  margin-top: 20px;
  animation: fadeIn 0.3s ease-in-out;
}

.faq-answer p {
  margin-bottom: 0;
}

/* =============================================
    CONTACTO & FORMULARIO (MÓVIL POR DEFECTO)
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-item {
  margin-bottom: 24px;
}

.contact-item label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--color-green);
  margin-bottom: 4px;
}

.mf-form-group {
  position: relative;
  margin-bottom: 32px;
}

.mf-select-group {
  position: relative;
}

.mf-input,
.mf-textarea {
  width: 100%;
  border: none;
  border-bottom: var(--mf-border) solid var(--color-text);
  background: transparent;
  padding: var(--mf-padding-y) var(--mf-padding-x);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--mf-font-size);
  font-weight: inherit;
  line-height: 1.5;
  outline: none;
  transition: border-color var(--mf-transition);
}

.mf-input:focus,
.mf-textarea:focus {
  border-bottom-color: var(--color-accent, var(--color-text));
}

.mf-input:disabled,
.mf-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-bottom-style: dashed;
}

.mf-input:disabled~.mf-label,
.mf-textarea:disabled~.mf-label {
  opacity: 0.5;
  cursor: not-allowed;
}

.mf-textarea {
  resize: none;
  min-height: 140px;
}

select.mf-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
  cursor: pointer;
  padding-right: 36px;
  color: inherit;
}

select.mf-input:disabled {
  cursor: not-allowed;
}

.mf-select-group::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid var(--color-text);
  border-bottom: 2px solid var(--color-text);
  transform: rotate(45deg);
  transform-origin: center;
  pointer-events: none;
}

.mf-label {
  position: absolute;
  left: 4px;
  color: var(--color-text);
  pointer-events: none;
  transform-origin: left top;
  transition: transform var(--mf-transition), font-size var(--mf-transition), opacity var(--mf-transition);
}

input.mf-input~.mf-label,
textarea.mf-textarea~.mf-label {
  top: 12px;
  font-size: var(--mf-font-size);
}

select.mf-input~.mf-label {
  top: calc(-1 * var(--mf-padding-y) - var(--mf-label-size) + 3px);
  font-size: var(--mf-label-size);
  opacity: 0;
  transform: translateY(18px);
}

select.mf-input.has-value~.mf-label {
  opacity: 1;
  transform: translateY(0);
}

input.mf-input:focus~.mf-label,
input.mf-input:not(:placeholder-shown)~.mf-label,
textarea.mf-textarea:focus~.mf-label,
textarea.mf-textarea:not(:placeholder-shown)~.mf-label {
  transform: translateY(-24px);
  font-size: var(--mf-label-size);
}

.input-highlight {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-text);
  transition: width var(--mf-transition);
}

.mf-input:focus~.input-highlight,
.mf-textarea:focus~.input-highlight {
  width: 100%;
}

.mf-input:-webkit-autofill,
.mf-textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--color-text) !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  transition: background-color 5000s ease-in-out 0s, color 5000s ease-in-out 0s;
}

.texto-privacidad {
  font-size: 16px;
}

.label-privacidad {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.checkbox-grande {
  width: 30px;
  height: 30px;
  cursor: pointer;
  accent-color: var(--color-teal);
}

/* =============================================
FOOTER, COOKIE & SCROLL
============================================= */
footer {
  background-color: var(--color-green);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  flex-direction: column;
  text-align: center;
  color: white;
}

.footer-copyright {
  margin-top: 30px;
}

.footer-links {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-bottom: 30px;
}

.footer-links a {
  font-size: 14px;
  text-decoration: none;
  color: white;
  padding: 10px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copyright p {
  margin: 0;
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000000;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 15px 10px;
  display: none;
  z-index: 800;
  color: #ffffff;
}

.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--color-green);
  color: var(--color-bg);
  border: none;
  border-radius: 4px;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  display: none;
  z-index: 999;
}

.scroll-top.show {
  display: block;
}

/* ==========================================================================
MEDIA QUERIES (MIN-WIDTH) - Crecimiento progresivo del diseño
========================================================================== */

@media (min-width: 768px) {
  section {
    padding-block: var(--section-padding-y);
  }

    /* Activación de Grids paralelos */
  .grid-2{
    grid-template-columns: repeat(2, 1fr);
  }

  #hero{
    min-height:var(--hero-height);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .hero-text {
    text-align: left;
    padding-left: 40px;
    padding-right: 0;
    padding-top: 60px;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 60px;
  }

  .glass-card,
  .contact-card {
    padding: 40px;
  }
}

/* MONITORES GRANDES: A partir de 1024px de ancho */
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Ocultar menú hamburguesa */
  .hamburger {
    display: none;
  }

  /* Restaurar barra de navegación horizontal estándar */
  .nav-links {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    flex-direction: row;
    padding: 0;
    gap:6px;
    box-shadow: none;
    overflow-y: visible;
  }

  .nav-links a{
    font-size: 14px;
    font-weight: var(--font-bold);
  }

  .nav-links a:hover {
    border-bottom: 2px solid var(--color-green);
  }

}