/* ==============
   VARIABLES
   ============== */
:root {
  /* Paleta oficial */
  --color-deep-ocean-fog: #47556a;
  --color-pale-fog: #97afa9;
  --color-misty-plum: #dac1a6;
  --color-sea-mist: #f7f7f7;
  --color-deep-indigo: #2e2f32;
  --color-white: #ffffff;

  /* Derivados para UI */
  --color-bg-main: var(--color-pale-fog);
  --color-bg-soft: var(--color-pale-fog);
  --color-text-main: var(--color-sea-mist);
  --color-text-soft: var(--color-sea-mist);
  --color-border-soft: rgba(71, 85, 106, 0.22);

  --font-heading: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1120px;
  --radius-lg: 16px;
  --radius-md: 12px;

  --shadow-soft: 0 16px 35px rgba(46, 47, 50, 0.18);
}

/* ==============
   RESETEO BÁSICO
   ============== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--color-bg-main);
  color: var(--color-text-soft);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  margin-top: 0;
  color: var(--color-text-main);
}

/* ==============
   LAYOUT GENERAL
   ============== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

/* ==============
   HEADER
   ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 247, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(71, 85, 106, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo-wrapper {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* BOTÓN HAMBURGUESA */
.nav-toggle {
  display: none;            /* solo se muestra en móvil */
  position: relative;
  width: 26px;
  height: 20px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  margin-right: 1rem;
  padding: 0.75rem;
}

/* Barras de la hamburguesa */
.nav-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-deep-ocean-fog);
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    top 0.2s ease,
    bottom 0.2s ease;
}

/* Posiciones iniciales (tres líneas apiladas) */
.nav-toggle span:nth-child(1) {
  top: 2px;
}

.nav-toggle span:nth-child(2) {
  top: 9px;
}

.nav-toggle span:nth-child(3) {
  bottom: 2px;
}

/* Estado activo: se convierte en X */
.nav-toggle.is-active span:nth-child(1) {
  top: 9px;
  transform: rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  bottom: auto;
  top: 9px;
  transform: rotate(-45deg);
}

@media (max-width: 600px) {
  .logo-img {
    height: 40px;
  }
}

.logo-area {
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.logo-text {
  color: var(--color-deep-ocean-fog);
  font-weight: 600;
}

.logo-subtext {
  color: var(--color-deep-ocean-fog);
  font-size: 0.6rem;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.main-nav a {
  color: var(--color-deep-ocean-fog);
  position: relative;
  padding-bottom: 0.2rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-misty-plum);
  transition: width 0.2s ease-out;
}

.main-nav a:hover::after {
  width: 100%;
}

/* ==============
   HERO
   ============== */
.hero-section {
  padding: 5rem 0 4rem;
  background: radial-gradient(
    circle at top left,
    rgba(151, 175, 169, 0.9) 0%,
    rgba(151, 175, 169, 1) 40%,
    rgba(218, 193, 166, 0.5) 80%
  );
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-sea-mist);
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(247, 247, 247, 0.9);
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Botones genéricos */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background 0.15s ease-out,
    color 0.15s ease-out,
    border-color 0.15s ease-out;
}

.btn-primary {
  background: var(--color-deep-ocean-fog);
  color: var(--color-misty-plum);
  box-shadow: var(--shadow-soft);
  border-color: var(--color-deep-ocean-fog);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(46, 47, 50, 0.25);
  background: var(--color-misty-plum);
  color: var(--color-deep-ocean-fog);
}

.btn-secondary {
  background: var(--color-sea-mist);
  color: var(--color-deep-ocean-fog);
  border-color: rgba(71, 85, 106, 0.5);
}

.btn-secondary:hover {
  background: var(--color-misty-plum);
  color: var(--color-deep-ocean-fog);
}

.btn-outline {
  background: transparent;
  color: var(--color-deep-ocean-fog);
  border-color: var(--color-deep-ocean-fog);
}

.btn-outline:hover {
  background: rgba(151, 175, 169, 0.25);
}

.btn-block {
  width: 100%;
}

.hero-media {
  display: flex;
  justify-content: center;
}

.video-placeholder {
  width: 100%;
  min-height: 220px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  background: linear-gradient(
    135deg,
    rgba(247, 247, 247, 0.95),
    rgba(218, 193, 166, 0.9)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-deep-ocean-fog);
  font-size: 0.9rem;
  text-align: center;
}

.video-placeholder img {
  width: 95%;
  height: 95%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

/* ==============
   SECCIONES GENERALES
   ============== */
.section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--color-sea-mist);
}

.section-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem;
  align-items: center;
}

.section-text p {
  color: var(--color-sea-mist);
}

.section-media .image-placeholder,
.section-media .video-placeholder,
.mapa-placeholder {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-deep-ocean-fog);
  background: var(--color-bg-soft);
}

/* =========================
   SECCIÓN DOCTOR
   ========================= */
.doctor-section {
  background: var(--color-bg-soft);
}

.doctor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.doctor-card {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.doctor-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.doctor-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.doctor-slide.active {
  opacity: 1;
}

.doctor-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 840px) {
  .doctor-layout {
    grid-template-columns: 1fr;
  }

  .doctor-card {
    height: 380px;
  }
}

/* ==============
   SERVICIOS
   ============== */
.services-section {
  background: var(--color-bg-soft);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--color-sea-mist);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 10px 24px rgba(46, 47, 50, 0.08);
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-deep-ocean-fog);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--color-deep-ocean-fog);
}

.section-cta {
  margin-top: 2.5rem;
  text-align: center;
}

/* ==============
   TECNOLOGÍA
   ============== */
.tech-section {
  background: linear-gradient(
    135deg,
    rgba(151, 175, 169, 0.85) 0%,
    rgba(151, 175, 169, 1) 40%,
    rgba(218, 193, 166, 0.6) 100%
  );
}

/* ==============
   TESTIMONIOS
   ============== */
.testimonials-section {
  background: var(--color-bg-soft);
}

.section-intro {
  max-width: 32rem;
  color: var(--color-sea-mist);
}

.testimonios-text,
.testimonios-text h2,
.testimonios-text .section-intro {
  text-align: left;
}

.testimonios-header {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.testimonios-text {
  min-width: 0;
  text-align: left;
}

.testimonios-logo {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.testimonios-logo img {
  max-width: 260px;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
}

/* Slider testimonios */
.testimonials-slider {
  position: relative;
  margin-top: 2rem;
  min-height: 220px;
}

.testimonial-card {
  position: absolute;
  inset: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  color: var(--color-sea-mist);
  animation: testimonialFade 60s infinite;
}

.testimonial-card:nth-child(1) { animation-delay: 0s; }
.testimonial-card:nth-child(2) { animation-delay: 15s; }
.testimonial-card:nth-child(3) { animation-delay: 30s; }
.testimonial-card:nth-child(4) { animation-delay: 45s; }

@keyframes testimonialFade {
  0%   { opacity: 0; transform: translateY(8px); }
  5%   { opacity: 1; transform: translateY(0); }
  25%  { opacity: 1; }
  30%  { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 0; transform: translateY(-6px); }
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  max-width: 44rem;
}

.testimonial-author {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-sea-mist);
}

/* ==============
   GALERÍA QUIRÓFANO
   ============== */
.gallery-section {
  background: var(--color-bg-soft);
}

.gallery-header {
  margin-bottom: 2rem;
}

.gallery-header h2 {
  margin-bottom: 0.75rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "hero hero"
    "left right";
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    opacity 0.18s ease-out;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gallery-item--hero {
  grid-area: hero;
  height: 260px;
}

.gallery-item--left {
  grid-area: left;
  height: 520px;
}

.gallery-right-column {
  grid-area: right;
  display: grid;
  grid-template-rows: repeat(2, 252px);
  gap: 1rem;
}

.gallery-right-column .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 90;
}

.gallery-lightbox.is-open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.lightbox-content {
  position: relative;
  max-width: 960px;
  width: 100%;
  z-index: 1;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: var(--color-sea-mist);
  color: var(--color-deep-indigo);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

/* Ajuste de encuadre desktop */
.gallery-item--hero img {
  object-position: 60% 60%;
}

.gallery-item--left img {
  object-position: 50% 20%;
}

.gallery-right-column .gallery-item:nth-child(1) img {
  object-position: 50% 25%;
}

.gallery-right-column .gallery-item:nth-child(2) img {
  object-position: 50% 35%;
}

/* Responsive galería */
@media (max-width: 840px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "hero"
      "left"
      "right";
  }

  .gallery-item--hero {
    height: 220px;
  }

  .gallery-item--left {
    height: 280px;
  }

  .gallery-right-column {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
  }
}

/* ==============
   MODAL DOCTORALIA
   ============== */
.appointment-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 95;
}

.appointment-modal.is-open {
  display: flex;
}

.appointment-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.appointment-card {
  position: relative;
  z-index: 1;
  max-width: 540px;
  width: 100%;
  background: var(--color-sea-mist);
  border-radius: 24px;
  padding: 1.75rem 1.75rem 1.6rem;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "photo info"
    "review review"
    "brand  brand";
  gap: 1.25rem 1.5rem;
  align-items: center;
}

.appointment-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: rgba(151, 175, 169, 0.15);
  color: var(--color-deep-indigo);
  font-size: 1.2rem;
  cursor: pointer;
}

.appointment-photo-wrapper {
  grid-area: photo;
  width: 96px;
  height: 96px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.appointment-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.appointment-info {
  grid-area: info;
  min-width: 0;
}

.appointment-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 0 0 0.2rem;
  color: var(--color-deep-indigo);
}

.appointment-specialty {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--color-deep-ocean-fog);
}

.appointment-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
}

.appointment-stars {
  color: #00c6a7;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.appointment-rating-count {
  color: var(--color-deep-ocean-fog);
}

.appointment-cta {
  width: 100%;
  justify-content: center;
  margin-bottom: 0.2rem;
}

.appointment-review {
  grid-area: review;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding-top: 0.9rem;
  font-size: 0.9rem;
}

.appointment-review-meta {
  font-size: 0.8rem;
  color: rgba(71, 85, 106, 0.95);
  margin-bottom: 0.35rem;
}

.appointment-review-text {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
}

.appointment-review-link {
  color: #2d6cdf;
  font-weight: 600;
  margin-left: 0.25rem;
}

.appointment-brand {
  grid-area: brand;
  margin-top: 0.4rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.doctoralia-logo {
  width: 110px;
  height: auto;
  opacity: 0.9;
}

@media (max-width: 600px) {
  .appointment-card {
    max-width: 100%;
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "info"
      "review"
      "brand";
    text-align: left;
  }

  .appointment-photo-wrapper {
    width: 80px;
    height: 80px;
  }

  .appointment-name {
    font-size: 1.15rem;
  }

  .appointment-cta {
    margin-top: 0.4rem;
  }
}

/* ==============
   CONTACTO
   ============== */
.contact-section {
  background: var(--color-bg-soft);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.contact-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.contact-form {
  background: var(--color-sea-mist);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 10px 24px rgba(46, 47, 50, 0.08);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: var(--color-deep-ocean-fog);
}

.form-group input,
.form-group textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 106, 0.35);
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--color-white);
  color: var(--color-deep-ocean-fog);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-misty-plum);
  box-shadow: 0 0 0 1px rgba(218, 193, 166, 0.6);
}

.mapa-wrapper {
  margin-top: 2rem;
}

/* ==============
   FOOTER
   ============== */
.site-footer {
  background: var(--color-deep-indigo);
  padding: 2rem 0;
  border-top: 1px solid rgba(151, 175, 169, 0.5);
}

.footer-content {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-sea-mist);
}

.footer-links {
  margin: 1rem 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--color-sea-mist);
  opacity: 0.9;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-social {
  font-size: 0.8rem;
}

/* ==============
   RESPONSIVE GLOBAL
   ============== */
@media (max-width: 840px) {
  /* Menos padding vertical en secciones en móvil */
  .section {
    padding: 2.5rem 0;
  }

  .hero-content,
  .section-layout,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-section {
    padding-top: 4.5rem;
  }

  .hero-media {
    order: -1;
  }

    /* Header en móvil */
  .header-content {
    position: relative; /* para contener al menú desplegable */
  }

  /* Menú hamburguesa visible en móvil */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Menú colapsado por defecto */
  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: rgba(247, 247, 247, 0.98);
    border-bottom: 1px solid rgba(71, 85, 106, 0.25);
    padding: 0.75rem 1.5rem 1.1rem;
    display: none;                 /* oculto por defecto */
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  }

  /* Cuando JS le ponga la clase, se abre */
  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    color: var(--color-deep-ocean-fog);
  }

  .doctor-section .section-media {
    margin-top: 1.5rem;
  }

  /* Testimonios en móvil */
  .testimonios-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: left;
    gap: 1.5rem;
    margin-bottom: 2.75rem;
  }

  .testimonios-text {
    text-align: left;
  }

  .testimonios-logo {
    text-align: center;
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .testimonios-logo img {
    max-width: 240px;
    margin: 0 auto;
  }

  .testimonials-slider {
    margin-top: 0;
    min-height: 280px;
  }

  .testimonial-card {
    align-items: flex-start;
    padding: 0 0.5rem;
  }

  .testimonial-text {
    font-size: 1.15rem;
  }

  .testimonial-author {
    font-size: 1rem;
  }

  /* Afinar espacio entre galería y contacto en móvil */
  #galeria {
    padding-bottom: 0.5rem !important;
    margin-bottom: 0 !important;
  }

  #contacto {
    padding-top: 1rem !important;
    margin-top: 0 !important;
  }
}
/* Ajuste fino del espacio entre galería y contacto en móvil */
@media (max-width: 840px) {
  /* Quitamos prácticamente todo el colchón inferior de la galería */
  #galeria.section {
    padding-bottom: 0.2rem !important;
    margin-bottom: 0 !important;
  }

  /* Pegamos la sección de contacto hacia arriba */
  #contacto.section {
    padding-top: 1rem !important;
    margin-top: -15.5rem !important; /* si lo ves demasiado pegado, súbelo a -1rem o bájalo a -2rem */
  }
}
