/* ============================================================
   Clínica García Salas — Estilos principales
   style.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:      #2E2B55;
  --navy-lt:   #3D3A6E;
  --lav:       #9B8EC4;
  --lav-lt:    #C8BDE4;
  --lav-pale:  #EDE9F7;
  --cream:     #FAF8F5;
  --warm:      #F4EFF8;
  --gold:      #C9A96E;
  --text:      #2A2640;
  --text-sm:   #6B6585;
  --white:     #ffffff;
  --radius:    6px;
  --radius-sm: 2px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Jost', sans-serif;
  background-color: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ── Utility ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-pad {
  padding: 100px 5%;
}

/* ── Reveal animation ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 15px 36px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover {
  background: var(--navy-lt);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  padding: 14px 36px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  transition: all var(--transition);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-white {
  display: inline-block;
  background: var(--white);
  color: var(--navy);
  padding: 15px 36px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn-white:hover {
  background: var(--lav-pale);
}

/* ── Section Header ─────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header.left {
  text-align: left;
}
.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lav);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.2;
}
.section-title em {
  font-style: italic;
  color: var(--lav);
}
.section-line {
  width: 44px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--lav), var(--navy));
  margin: 18px auto 0;
}
.section-header.left .section-line {
  margin: 18px 0 0;
}
.section-sub {
  max-width: 580px;
  margin: 20px auto 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-sm);
  font-weight: 300;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background: rgba(250, 248, 245, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(155, 142, 196, 0.15);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  transition: box-shadow var(--transition);
}
#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(46, 43, 85, 0.08);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-logo img {
  height: 50px;
  width: auto;
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
}
.nav-logo-text .logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.nav-logo-text .logo-sub {
  font-size: 0.67rem;
  letter-spacing: 0.18em;
  color: var(--lav);
  text-transform: uppercase;
  font-weight: 500;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-sm);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--lav);
  transition: width var(--transition);
}
.nav-links a:hover {
  color: var(--navy);
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-links .nav-cta {
  background: var(--navy);
  color: var(--white);
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav-links .nav-cta:hover {
  background: var(--navy-lt);
  color: var(--white);
}
.nav-links .nav-cta::after {
  display: none;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--navy);
  transition: all 0.3s;
}
.nav-hamburger.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: 78px;
  left: 0;
  right: 0;
  background: var(--cream);
  border-bottom: 1px solid rgba(155, 142, 196, 0.2);
  padding: 24px 5%;
  flex-direction: column;
  gap: 0;
  z-index: 998;
  box-shadow: 0 8px 32px rgba(46, 43, 85, 0.08);
}
.nav-mobile.open {
  display: flex;
}
.nav-mobile a {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text);
  padding: 16px 0;
  border-bottom: 1px solid rgba(155, 142, 196, 0.15);
  transition: color var(--transition);
}
.nav-mobile a:last-child {
  border-bottom: none;
  margin-top: 8px;
  background: var(--navy);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.nav-mobile a:hover {
  color: var(--lav);
}
.nav-mobile a:last-child:hover {
  background: var(--navy-lt);
  color: var(--white);
}

/* ── HERO ───────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  padding-top: 78px;
}

.hero-left {
  width: 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 5% 80px 7%;
  animation: fadeUp 0.9s ease both;
}

.hero-tag {
  display: inline-block;
  background: var(--lav-pale);
  color: var(--lav);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 28px;
  width: fit-content;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.6rem, 4.5vw, 4.2rem);
  font-weight: 500;
  line-height: 1.12;
  color: var(--navy);
  margin-bottom: 22px;
}
.hero-title em {
  font-style: italic;
  color: var(--lav);
}

.hero-sub {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--text-sm);
  max-width: 460px;
  font-weight: 300;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-stat-item {
  display: flex;
  flex-direction: column;
}
.hero-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lav);
  font-weight: 500;
  margin-top: 4px;
}

.hero-right {
  width: 45%;
  position: relative;
  overflow: hidden;
}
.hero-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.88);
}
.hero-right::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, var(--cream) 0%, transparent 25%),
    linear-gradient(0deg, rgba(46, 43, 85, 0.3) 0%, transparent 50%);
}
.hero-right::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--lav), var(--navy));
  z-index: 2;
}

/* ── SERVICES ───────────────────────────────────────────────── */
#servicios {
  padding: 100px 5%;
  background: var(--cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(155, 142, 196, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(46, 43, 85, 0.12);
}

.service-card-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}
.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-card-img img {
  transform: scale(1.06);
}
.service-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(46, 43, 85, 0.35) 0%, transparent 55%);
}

.service-card-body {
  padding: 30px 28px 34px;
}
.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  background: var(--lav-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--lav);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}
.service-desc {
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--text-sm);
  font-weight: 300;
}

/* ── GALLERY / INSTALACIONES ────────────────────────────────── */
#instalaciones {
  padding: 100px 5%;
  background: var(--warm);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 16px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.gallery-item.tall {
  grid-row: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(46, 43, 85, 0.8) 0%, transparent 100%);
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 28px 18px 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
}

/* ── ABOUT / NOSOTROS ───────────────────────────────────────── */
#nosotros {
  padding: 100px 5%;
  background: var(--navy);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-img-wrap {
  position: relative;
}
.about-img-frame {
  position: absolute;
  top: -20px; left: -20px;
  right: 20px; bottom: 20px;
  border: 1.5px solid rgba(155, 142, 196, 0.3);
  border-radius: var(--radius);
  pointer-events: none;
}
.about-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  display: block;
}
.about-badge {
  position: absolute;
  bottom: -16px; right: -16px;
  background: var(--lav);
  padding: 18px 22px;
  border-radius: 4px;
  text-align: center;
}
.about-badge strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  display: block;
  line-height: 1.2;
  color: var(--white);
}
.about-badge span {
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.about-text .section-header {
  text-align: left;
  margin-bottom: 28px;
}
.about-text .section-title {
  color: var(--white);
}
.about-text .section-tag {
  color: var(--lav-lt);
}
.about-text .section-line {
  margin: 18px 0 0;
  background: linear-gradient(90deg, var(--lav-lt), rgba(255,255,255,0.5));
}

.about-body {
  font-size: 0.93rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  margin-bottom: 22px;
}
.about-features {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}
.about-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lav-lt);
  flex-shrink: 0;
}

/* ── WHY US ─────────────────────────────────────────────────── */
#por-que {
  padding: 100px 5%;
  background: var(--cream);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.why-item {
  text-align: center;
  padding: 20px 16px;
}
.why-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.8rem;
  font-weight: 300;
  color: var(--lav-pale);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}
.why-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}
.why-body {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-sm);
  font-weight: 300;
}

/* ── TESTIMONIALS ───────────────────────────────────────────── */
#testimonios {
  padding: 100px 5%;
  background: var(--warm);
}

.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testi-card {
  background: var(--white);
  border: 1px solid rgba(155, 142, 196, 0.2);
  border-radius: var(--radius);
  padding: 34px 28px;
  transition: box-shadow var(--transition);
}
.testi-card:hover {
  box-shadow: 0 12px 40px rgba(46, 43, 85, 0.08);
}
.testi-stars {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 3px;
  margin-bottom: 18px;
}
.testi-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-sm);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 22px;
}
.testi-author {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lav);
  font-weight: 600;
}

/* ── CONTACT ────────────────────────────────────────────────── */
#contacto {
  padding: 100px 5%;
  background: var(--cream);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lav-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--lav);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lav);
  font-weight: 600;
  margin-bottom: 3px;
}
.contact-val {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 400;
  line-height: 1.6;
}

/* ── CONTACT FORM ───────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-field label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-sm);
  font-weight: 500;
}
.form-field input,
.form-field textarea,
.form-field select {
  border: 1.5px solid rgba(155, 142, 196, 0.28);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 0.88rem;
  font-family: 'Jost', sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--lav);
  box-shadow: 0 0 0 3px rgba(155, 142, 196, 0.1);
}
.form-field textarea {
  resize: vertical;
  min-height: 110px;
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239B8EC4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-success {
  display: none;
  background: var(--lav-pale);
  border: 1px solid var(--lav);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.88rem;
  color: var(--navy);
  font-weight: 500;
}
.form-success.show {
  display: block;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
#footer {
  background: #1A1830;
  padding: 64px 5% 32px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 52px;
}
.footer-brand img {
  height: 52px;
  margin-bottom: 18px;
}
.footer-brand p {
  font-size: 0.84rem;
  line-height: 1.75;
  font-weight: 300;
  max-width: 280px;
}
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: rgba(255,255,255,0.5);
}
.footer-social a:hover {
  border-color: var(--lav-lt);
  color: var(--lav-lt);
}
.footer-social svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.footer-col h5 {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 20px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
  transition: color var(--transition);
}
.footer-col a:hover {
  color: var(--lav-lt);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 0.78rem;
}
.footer-bottom a {
  color: var(--lav-lt);
}
.footer-heart {
  color: var(--lav-lt);
}

/* ── BACK TO TOP ────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--navy);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 500;
  box-shadow: 0 4px 20px rgba(46,43,85,0.25);
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}
#back-to-top:hover {
  transform: translateY(-3px);
  background: var(--navy-lt);
}
#back-to-top svg {
  width: 18px;
  height: 18px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */

/* Tablet (960px) */
@media (max-width: 960px) {
  #hero {
    flex-direction: column;
    min-height: auto;
  }
  .hero-left {
    width: 100%;
    padding: 60px 5%;
  }
  .hero-right {
    width: 100%;
    height: 380px;
  }
  .hero-right::before {
    background:
      linear-gradient(0deg, var(--cream) 0%, transparent 20%),
      linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 40%);
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery-item.tall {
    grid-row: span 1;
  }
  #nosotros {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .about-badge {
    right: 16px;
  }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 52px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

/* Mobile (640px) */
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .section-pad {
    padding: 70px 5%;
  }
  #servicios,
  #instalaciones,
  #por-que,
  #testimonios,
  #contacto {
    padding: 70px 5%;
  }
  #nosotros {
    padding: 70px 5%;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .why-grid {
    grid-template-columns: 1fr 1fr;
  }
  .testi-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    gap: 28px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  #back-to-top {
    bottom: 20px;
    right: 20px;
  }
}

/* Small mobile (380px) */
@media (max-width: 380px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   REDES SOCIALES FLOTANTES - LADO DERECHO
   Clínica García Salas
========================================================= */

.floating-social {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floating-social-btn {
  width: 48px;
  height: 48px;
  padding: 0 13px;
  border-radius: 24px 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  overflow: hidden;
  transition: width 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.floating-social-btn:hover {
  width: 155px;
}

.floating-social-btn svg {
  width: 22px;
  height: 22px;
  min-width: 22px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
}

.floating-social-btn.facebook svg path,
.floating-social-btn.whatsapp svg path {
  fill: none;
  stroke: #ffffff;
}

.floating-social-text {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.floating-social-btn:hover .floating-social-text {
  opacity: 1;
}

.floating-social-btn.facebook {
  background: #1877f2;
}

.floating-social-btn.instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.floating-social-btn.whatsapp {
  background: #25d366;
}

/* Ajuste móvil */
@media (max-width: 768px) {
  .floating-social {
    top: auto;
    bottom: 90px;
    right: 10px;
    transform: none;
    gap: 8px;
  }

  .floating-social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    justify-content: center;
    padding: 0;
  }

  .floating-social-btn:hover {
    width: 44px;
  }

  .floating-social-text {
    display: none;
  }
}