@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@300;400;500&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fdf8f3;
  --fg: #2a1f14;
  --primary: #5c3d1e;
  --primary-light: #8b5e3c;
  --secondary: #f0ebe5;
  --accent: #c4956a;
  --border: #e0d5c8;
  --muted: #8a7a6a;
  --white: #ffffff;
  --red: #dc2626;
  --green: #16a34a;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --radius: 0.75rem;
  --shadow: 0 2px 12px rgba(92,61,30,0.08);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--fg); line-height: 1.6; }
h1,h2,h3,h4 { font-family: var(--font-serif); line-height: 1.3; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
input,textarea,select { font-family: var(--font-sans); }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section--gray { background: var(--secondary); }

/* Header */
.header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--border); }
.header__inner { display: flex; flex-direction: column; align-items: center; padding: 1rem 1.5rem; }
.header__logo { font-family: var(--font-serif); font-size: 1.75rem; color: var(--primary); }
.header__nav { display: flex; gap: 2rem; margin-top: 0.5rem; flex-wrap: wrap; justify-content: center; }
.header__nav a { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); transition: color 0.2s; }
.header__nav a:hover { color: var(--primary); }
.header__nav a.active { color: var(--primary); font-weight: 500; }

/* Buttons */
.btn { display: inline-block; padding: 0.75rem 1.75rem; border-radius: 999px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; }
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-light); color: var(--white); }
.btn--outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: var(--white); }
.btn--outline-light { background: transparent; border-color: var(--white); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--primary); }
.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.82rem; }
.btn--danger { background: var(--red); color: var(--white); }
.btn--full { width: 100%; text-align: center; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.card__body { padding: 1.5rem; }
.card__img { width: 100%; height: 220px; object-fit: cover; }

/* Grid */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
@media(max-width:768px) { .grid-3,.grid-2 { grid-template-columns: 1fr; } }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--fg); }
.form-control { width: 100%; padding: 0.7rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--fg); font-size: 0.9rem; transition: border-color 0.2s; }
.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* Hero */
.hero { position: relative; min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(135deg, #fdf8f3 0%, #f0ebe5 100%); padding: 4rem 1.5rem; overflow: hidden; }
.hero__title { font-size: clamp(2.5rem, 6vw, 4.5rem); color: var(--primary); margin-bottom: 1rem; }
.hero__sub { font-size: 1.1rem; color: var(--muted); max-width: 500px; margin: 0 auto 2rem; }
.hero__btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Hero con imagen de fondo usando <img> real para máxima calidad de renderizado */
.hero--has-image { background: #000; }
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  /* sugerencias al navegador para priorizar calidad */
  image-rendering: auto;
  transform: translateZ(0); /* fuerza aceleración por GPU en Chrome/Safari, evita que el escalado se vea borroso */
  backface-visibility: hidden;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.30), rgba(0,0,0,0.45));
  z-index: 1;
  pointer-events: none;
}
.hero__content { position: relative; z-index: 2; max-width: 900px; }
.hero__title--on-image { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,0.4); }
.hero__sub--on-image { color: rgba(255,255,255,0.92); text-shadow: 0 1px 8px rgba(0,0,0,0.4); }

/* Sobre mí */
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: center; }
.about-grid__image { position: relative; }
.about-grid__image img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-grid__title { font-family: var(--font-serif); font-size: 2rem; color: var(--primary); margin-bottom: 1.25rem; }
.about-grid__body { color: var(--fg); line-height: 1.8; font-size: 1rem; white-space: pre-line; }
@media(max-width:768px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .about-grid__image img { max-height: 380px; }
}

/* Sessions grid */
.sessions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.session-card { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.session-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(92,61,30,0.15); }
.session-card__img { width: 100%; height: 220px; object-fit: cover; }
.session-card__body { padding: 1.25rem; }
.session-card__title { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 0.5rem; }
.session-card__desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.session-card__btns { display: flex; gap: 0.5rem; }

/* Reviews */
.review-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.review-card__stars { color: #f59e0b; font-size: 1rem; margin-bottom: 0.75rem; }
.review-card__text { font-size: 0.9rem; color: var(--muted); line-height: 1.7; margin-bottom: 1rem; font-style: italic; }
.review-card__author { display: flex; align-items: center; gap: 0.75rem; }
.review-card__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--primary); font-size: 1rem; overflow: hidden; }
.review-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-card__name { font-weight: 500; font-size: 0.9rem; }
.review-card__session { font-size: 0.78rem; color: var(--muted); }

/* Video players */
.video-16-9 {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  background: #000;
}
.video-16-9 iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* YouTube Shorts: usamos thumbnail + play. Al reproducir el iframe se escala
   para tapar el chrome del player vertical de YouTube y el video ocupa todo. */
.shorts-player {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  margin: 0 auto 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.shorts-player__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.shorts-player:hover .shorts-player__thumb { transform: scale(1.04); }
.shorts-player__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding-left: 4px;
}
.shorts-player:hover .shorts-player__play { background: var(--primary); transform: translate(-50%, -50%) scale(1.05); }
.shorts-player iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%;
  height: 100%;
  border: 0;
  /* El embed de Shorts de YouTube pinta barras negras arriba/abajo con el chrome del player.
     Escalamos el iframe para que el área de video llene el contenedor y el chrome quede
     recortado por overflow:hidden del contenedor padre. */
  transform: translate(-50%, -50%) scale(1.5);
  transform-origin: center;
}
.shorts-player--playing { cursor: default; }
.shorts-player--playing:hover .shorts-player__thumb { transform: none; }

/* Imagen "Más información" debajo del video en la página de sesión */
.session-info-image {
  margin: 0 auto 2rem;
  max-width: 700px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.session-info-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Calendar */
.calendar-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media(max-width:640px) { .calendar-wrap { grid-template-columns: 1fr; } }
.calendar { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.calendar__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.calendar__title { font-family: var(--font-serif); font-size: 1.1rem; }
.calendar__grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.calendar__day-name { text-align: center; font-size: 0.7rem; color: var(--muted); padding: 4px 0; font-weight: 500; }
.calendar__day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.82rem; cursor: pointer; transition: all 0.15s; }
.calendar__day--empty { cursor: default; }
.calendar__day--past { color: var(--border); cursor: not-allowed; }
.calendar__day--available { background: #dcfce7; color: #15803d; font-weight: 600; }
.calendar__day--available:hover { background: #16a34a; color: white; }
.calendar__day--selected { background: var(--primary); color: white; }
.calendar__day--unavailable { color: var(--muted); cursor: not-allowed; }

.times-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.times-panel__title { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; color: var(--primary); }
.times-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.time-btn { padding: 0.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); cursor: pointer; font-size: 0.85rem; transition: all 0.15s; text-align: center; }
.time-btn:hover { border-color: var(--accent); background: var(--secondary); }
.time-btn--selected { background: var(--primary); color: white; border-color: var(--primary); }

/* Status badges */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; }
.badge--confirmed { background: #dbeafe; color: #1d4ed8; }
.badge--session_day { background: #dcfce7; color: #15803d; }
.badge--photos_sent { background: #fef9c3; color: #854d0e; }
.badge--waiting_selection { background: #ffedd5; color: #9a3412; }
.badge--in_review { background: #f3e8ff; color: #7e22ce; }
.badge--editing { background: #fce7f3; color: #9d174d; }
.badge--ready_download { background: #d1fae5; color: #065f46; }
.badge--cancelled { background: #fee2e2; color: #991b1b; }

/* Alert */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert--success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.alert--error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert--info { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }

/* Footer */
.footer { background: var(--secondary); border-top: 1px solid var(--border); padding: 2.5rem 0; text-align: center; }
.footer__name { font-family: var(--font-serif); font-size: 1.25rem; color: var(--primary); margin-bottom: 0.5rem; }
.footer__address { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }
.footer__legal { font-size: 0.78rem; color: var(--muted); margin-top: 1rem; }
.footer__links { margin-top: 0.5rem; }
.footer__links a { font-size: 0.8rem; color: var(--muted); margin: 0 0.5rem; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); padding: 2rem; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal__title { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 1rem; color: var(--primary); }

/* Steps */
.steps { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
.step { flex: 1; padding: 0.6rem; text-align: center; border-radius: var(--radius); background: var(--secondary); font-size: 0.8rem; color: var(--muted); }
.step.active { background: var(--primary); color: white; }
.step.done { background: var(--green); color: white; }

/* Tabs (admin) */
.tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; border-bottom: 2px solid var(--border); margin-bottom: 2rem; }
.tab-btn { padding: 0.6rem 1.1rem; border: none; background: none; cursor: pointer; font-size: 0.85rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; border-radius: var(--radius) var(--radius) 0 0; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--secondary); font-weight: 500; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Admin calendar */
.admin-cal { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media(max-width:768px) { .admin-cal { grid-template-columns: 1fr; } }
.admin-cal__grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.admin-cal__day { aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; cursor: pointer; transition: all 0.15s; position: relative; }
.admin-cal__day--available { background: #dcfce7; color: #15803d; font-weight: 600; }
.admin-cal__day--partial { background: #fef9c3; color: #854d0e; }
.admin-cal__day--disabled-all { background: #fee2e2; color: #991b1b; }
.admin-cal__day--empty-slot { background: var(--secondary); color: var(--muted); border: 1px dashed var(--border); }
.admin-cal__day--past { opacity: 0.3; cursor: not-allowed; }
.admin-cal__day--selected { ring: 2px solid var(--primary); outline: 2px solid var(--primary); }

/* Notification bell */
.bell-btn { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--white); border: 1px solid var(--border); border-radius: 50%; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: var(--shadow); cursor: pointer; z-index: 90; }
.bell-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; }

/* Semaphore colors for admin bookings */
.booking-red { border-left: 4px solid #dc2626; }
.booking-orange { border-left: 4px solid #f97316; }
.booking-green { border-left: 4px solid #16a34a; }
.booking-gray { border-left: 4px solid #9ca3af; opacity: 0.75; }

/* Address info box */
.address-box { background: var(--secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-top: 1rem; }
.address-box__icon { font-size: 1.1rem; margin-bottom: 0.25rem; }
.address-box__text { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* Responsive */
@media(max-width:600px) {
  .hero__title { font-size: 2rem; }
  .btn { padding: 0.65rem 1.25rem; }
  .header__logo { font-size: 1.4rem; }
}
