/* ====== VARIABLES ====== */
:root {
  --primary: #8A2BE2;
  --secondary: #6A0DAD;
  --light: #F8F8FF;
  --dark: #333;
}

/* ====== RESET ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  /*padding-top: calc(10rem + 60px);*/
}

/* ====== CONTAINERS ====== */
.container {
  max-width: 1200px;
  width: 90%;
  margin: auto;
}

.container-wide {
  width: 95%;
  max-width: 1400px;
  margin: auto;
}

/* ====== HEADER ====== */
.main-header {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 0;
}

.logo-img-large {
  width: 100%;
  max-width: 380px;
}

/* ====== NAV ====== */
.nav-section {
  background: var(--primary);
  position: fixed;
  left: 0;
  width: 100%;
  height: 60px;
  top: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;

  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Sombra cuando hace scroll */
.nav-section.scrolled {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Ocultar cuando baja */
.nav-section.hide {
  transform: translateY(-120%);
}

/* Espacio para que no tape contenido */
/*body {
--  padding-top: calc(10rem + 60px);
}*/
.nav-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  padding: 1rem;
  font-weight: 500;
  transition: background 0.3s;
}

.nav-btn:hover,
.nav-btn:focus {
  background: var(--secondary);
  border-radius: 8px;
}

/* ====== HERO ====== */
.hero {
  padding: 5rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* ====== BUTTONS ====== */
.btn {
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
  transition: background 0.3s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--secondary);
}
/*Imagenes redondas pequeñas*/

.doctor-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  padding: 6px; /* espacio para el marco */
  background: linear-gradient(135deg, #3f51b5, #1a237e);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ====== SERVICES ====== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
}

.card h3 {
  margin-top: 1rem;
  font-size: 1.1rem;
}

.card p {
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* ====== CARD IMAGE + HOVER ====== */
.card-img {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  outline: none;
}

.card-img img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.card-img:hover img,
.card-img:focus-within img {
  transform: scale(1.05);
}

.texto-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-img:hover .texto-hover,
.card-img:focus-within .texto-hover {
  opacity: 1;
}

/* ====== INFO SECTION ====== */
.info-section img {
  width: 100%;
  border-radius: 12px;
  margin-top: 1.5rem;
}

/* ====== CONTACT ====== */
.agenda-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ====== FOOTER ====== */
footer {
  background: #f1f1f1;
  padding: 1.8rem 0;
  text-align: center;
  margin-top: 4rem;
  font-size: 0.9rem;
}
