/* ==========================================================================
   RoyalDance-Chile — Escuela de Ballet
   Shared stylesheet
   ========================================================================== */

:root {
  --color-primary: #0D0E10;      /* Elegant Black */
  --color-accent: #4D8B88;       /* RoyalDance Teal (from original site) */
  --color-accent-light: #AED6D5; /* Original site's light teal */
  --color-teal-pale: #CFE7E6;    /* Original site's pale teal panels */
  --color-secondary: #F2D6D0;    /* Ballet Pink */
  --color-bg: #FBF8F5;           /* Soft ice background */
  --color-card: #FFFFFF;
  --color-text: #2B2B2E;
  --color-text-muted: #5B5B60;
  --color-border: #E7E1DA;
  --shadow-soft: 0 10px 30px rgba(13, 14, 16, 0.08);
  --shadow-lift: 0 18px 40px rgba(13, 14, 16, 0.14);
  --radius: 14px;
  --font-serif: "Playfair Display", "Georgia", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-height: 105px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-primary);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--color-text-muted); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
section.tight { padding: 56px 0; }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 14px;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.bg-alt { background: var(--color-teal-pale); }
.bg-dark { background: var(--color-primary); color: #EDEAE6; }
.bg-dark h2, .bg-dark h3 { color: #fff; }
.bg-dark p { color: #C9C4BE; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 15px 34px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-accent {
  background: var(--color-accent);
  color: var(--color-primary);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-outline {
  background: transparent;
  border-color: currentColor;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #CFE7E6;
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { 
  display: flex; 
  align-items: center; 
  gap: 12px;
  position: relative;
}

.brand::before {
  content: "";
  position: absolute;
  width: 165px;
  height: 165px;
  background: #CFE7E6;
  border-radius: 50%;
  top: 20px;
  left: -7px;
  z-index: -1;
  opacity: 1;
  transition: width 0.3s ease, height 0.3s ease, top 0.3s ease, left 0.3s ease, opacity 0.3s ease;
}

.brand img { 
  height: 150px; 
  width: auto; 
  margin-top: 30px;
  transition: height 0.3s ease, margin-top 0.3s ease;
}

header.site-header.scrolled-past-hero .brand::before {
  width: 95px;
  height: 95px;
  top: 5px;
  left: 2px;
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s ease, height 0.3s ease, top 0.3s ease, left 0.3s ease, opacity 0.3s ease;
}
.brand-text { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; color: #0D0E10; line-height: 1.1; }
.brand-text span { display: block; font-family: var(--font-sans); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }

nav.main-nav { display: flex; align-items: center; gap: 32px; }
nav.main-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0D0E10;
  position: relative;
  padding: 6px 2px;
}
nav.main-nav a.active,
nav.main-nav a:hover { color: #0D0E10; }
nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--color-accent);
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: flex;
  border: 1.5px solid #0D0E10;
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
}
.lang-toggle button {
  background: transparent;
  border: none;
  padding: 7px 13px;
  cursor: pointer;
  color: #0D0E10;
  font-family: var(--font-sans);
  font-weight: 700;
}
.lang-toggle button.active { background: #0D0E10; color: #CFE7E6; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #0D0E10;
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(13,14,16,0.65) 0%, 
    rgba(13,14,16,0.35) 25%,
    rgba(13,14,16,0.25) 50%, 
    rgba(13,14,16,0.35) 75%,
    rgba(13,14,16,0.65) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}
.hero-content .section-label { color: var(--color-accent-light); }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--color-accent-light); }
.hero p.lead { color: #E7E2DB; font-size: 1.15rem; max-width: 560px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.page-hero {
  position: relative;
  padding: 150px 0 70px;
  color: #fff;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 14, 16, 0.72);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #D9D4CD; max-width: 620px; margin: 0 auto; }

/* ---------- Cards / Grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--color-accent);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card .icon { font-size: 1.8rem; margin-bottom: 14px; display: block; }

.photo-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--color-card);
}
.photo-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-card figcaption { padding: 14px 18px; font-size: 0.9rem; color: var(--color-text-muted); }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-card img {
  width: 168px; height: 168px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 4px solid var(--color-bg);
  box-shadow: var(--shadow-soft);
}
.team-card .role {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.team-card h3 { margin-bottom: 6px; }
.team-card p { font-size: 0.92rem; }

/* ---------- Schedule table ---------- */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.schedule-table th, .schedule-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.schedule-table th {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.95rem;
}
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table td.tag {
  color: var(--color-primary);
  font-weight: 700;
}

.pill {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- Quote / mission ---------- */
.quote-block {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.quote-block blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  color: var(--color-primary);
  font-style: italic;
  margin: 0 0 20px;
  line-height: 1.5;
}
.quote-block cite {
  font-style: normal;
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .ic {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.contact-list a { font-weight: 600; color: var(--color-primary); }
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  line-height: 0;
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--color-primary);
  color: #C9C4BE;
  padding: 60px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-grid a, .footer-grid p { color: #B7B2AB; font-size: 0.92rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a:hover { color: var(--color-accent-light); }
.footer-brand img { max-width: 200px; height: auto; filter: invert(1) brightness(1.8); }
.social-row { display: flex; gap: 12px; margin-top: 14px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid #4A4A4E;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.social-row a:hover { border-color: var(--color-accent-light); }
.footer-bottom {
  border-top: 1px solid #2A2A2D;
  padding-top: 22px;
  font-size: 0.82rem;
  color: #8B8681;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- i18n show/hide ---------- */
.es, .en { }
body.lang-en .es { display: none !important; }
body:not(.lang-en) .en { display: none !important; }

/* ---------- Utility ---------- */
.mt-lg { margin-top: 48px; }
.text-center { text-align: center; }
.stack { display: grid; gap: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  nav.main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  nav.main-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-toggle { display: block; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
}


.whatsapp-btn {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: white;
  text-decoration: none;
  padding: 2rem;
  transition: all 0.3s ease;
}

.whatsapp-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateX(4px);
}

.whatsapp-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.whatsapp-btn strong {
  color: white;
  display: block;
  margin-bottom: 0.25rem;
}

.whatsapp-btn span {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .whatsapp-btn {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* WhatsApp Button - Official Branding */
.whatsapp-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #25D366;
  color: white;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid #25D366;
  margin-top: 1.5rem;
  display: inline-flex;
}

.whatsapp-button:hover {
  background-color: #20BA5B;
  border-color: #20BA5B;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-logo {
  font-size: 1.25rem;
  font-weight: bold;
}

.whatsapp-text span.es,
.whatsapp-text span.en {
  display: inline;
}

@media (max-width: 640px) {
  .brand-text { display: none; }
  .whatsapp-button {
    display: flex !important;
    width: 100%;
    padding: 1.5rem 1.5rem;
    font-size: 1.1rem;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    background-color: #25D366;
    color: white;
  }
  .whatsapp-logo {
    font-size: 1.8rem;
  }
  .whatsapp-text {
    font-weight: 600;
  }
}

/* RAD logo - preserve original colors */
.footer-brand img.rad-logo { filter: none !important; max-width: 110px; height: auto; }

/* Logo shrink animation on scroll past hero */
.brand img {
  transition: height 0.3s ease, margin-top 0.3s ease;
}

header.site-header.scrolled-past-hero .brand img {
  height: 80px;
  margin-top: 0;
}
