/* ========== BRAND FONTS ========== */
@font-face {
  font-family: 'FoundryGridnik';
  src: url('fonts/FoundryGridnik-Light.otf') format('opentype');
  font-weight: 300;
}
@font-face {
  font-family: 'FoundryGridnik';
  src: url('fonts/FoundryGridnik-Regular.otf') format('opentype');
  font-weight: 400;
}
@font-face {
  font-family: 'FoundryGridnik';
  src: url('fonts/FoundryGridnik-Medium.otf') format('opentype');
  font-weight: 500;
}
@font-face {
  font-family: 'FoundryGridnik';
  src: url('fonts/FoundryGridnik-Bold.otf') format('opentype');
  font-weight: 700;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: 'FoundryGridnik', sans-serif;
  background: #212722;
  color: #D8D9DB;
  overflow-x: hidden;
  max-width: 100vw;
}
section { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid #2a2f2b;
}
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.hidden { display: none !important; }

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 { font-family: 'FoundryGridnik', sans-serif; text-transform: uppercase; }
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: 2px;
  color: #fff;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-family: 'FoundryGridnik', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-red { background: #c0392b; color: #fff; }
.btn-dark { background: transparent; color: #D8D9DB; border: 1px solid #444; }
.btn-dark:hover { border-color: #D8D9DB; }
.btn-white { background: #D8D9DB; color: #212722; }
.btn.small { padding: 8px 20px; font-size: 0.8rem; }

/* ========== NAV ========== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(33,39,34,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216,217,219,0.06);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 72px;
  gap: 40px;
}
.nav-logo { order: -1; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-right { }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }
.nav-logo { display: flex; align-items: center; }
.logo-img { height: 60px; width: auto; max-width: 450px; background: transparent !important; min-height: unset !important; }
.nav-right { display: flex; align-items: center; }
.login-link {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.7;
}
.login-link:hover { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-btn-rutinas {
  position: relative;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: line-through;
  opacity: 0.35;
  cursor: not-allowed;
  user-select: none;
}
.rutinas-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: #c0392b;
  white-space: nowrap;
  font-weight: 500;
}
.rutinas-text { text-decoration: line-through; }

/* Login Modal */
.login-modal-content { text-align: center; }
.login-options {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.login-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border: 1px solid #333;
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
}
.login-option:hover {
  border-color: #D8D9DB;
  background: rgba(216,217,219,0.05);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/hero.jpg') center/cover no-repeat;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(33,39,34,0.8) 0%, rgba(33,39,34,0.2) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 clamp(24px, 6vw, 120px);
  max-width: 800px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1rem;
  letter-spacing: 3px;
  color: #fff;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  opacity: 0.8;
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

/* ========== ABOUT ========== */
.about { padding: 60px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-image img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}
.about-text p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.75;
  margin-bottom: 1rem;
  font-weight: 300;
}
.section-title.italic { font-style: italic; }

/* ========== PRICING ========== */
.pricing { padding: 60px 0; }
.pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2rem;
}
.price-card {
  border: 1px solid #333;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.3s;
}
.price-card:hover { border-color: #D8D9DB; }
.price-card.featured { border-color: #c0392b; }
.price-card h3 {
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: #fff;
  white-space: nowrap;
}
.price-card h4 {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.5;
  white-space: nowrap;
}
.plan-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  opacity: 0.5;
  font-weight: 300;
  flex: 1;
  min-width: 0;
}
.plan-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.price-actions { display: flex; align-items: center; gap: 8px; }
.price-card .btn { text-align: center; white-space: nowrap; }
.price-card.featured .btn { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.2s, opacity 0.2s;
}
.btn-wa:hover { transform: scale(1.1); opacity: 0.9; }
@media (max-width: 768px) {
  .plan-desc { display: none; }
  .price-card h4 { display: none; }
}

/* ========== QUOTE BANNER (inline inside pages) ========== */
.quote-banner-inline {
  position: relative;
  height: 35vh;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quote-bg {
  position: absolute;
  inset: 0;
  background: url('images/quote.jpg') center/cover no-repeat;
  z-index: 0;
}
[data-cms-bg="train-quote-bg"] {
  background: url('images/train-quote.jpg') center/cover no-repeat;
}
.quote-content { position: relative; z-index: 1; text-align: center; padding: 0 24px; }
.quote-text {
  font-family: 'FoundryGridnik', sans-serif;
  font-size: clamp(1.3rem, 3.5vw, 2.5rem);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

/* ========== TRAIN ========== */
.train-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 40px;
}
.train-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 2rem;
}
.train-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #2a2f2b;
}
.train-card:last-child { border-bottom: none; }
.train-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.train-icon img { width: 36px; height: 36px; object-fit: contain; filter: invert(0.85); }
.train-card h3 {
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: #fff;
  min-width: 180px;
  flex-shrink: 0;
}
.train-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.6;
  font-weight: 300;
  flex: 1;
}
.train-detail { display: none; }
.train-card .btn { display: none; }

/* ========== RECOVERY ========== */
.recovery-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 40px;
}
.recovery-grid {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.recovery-item { text-align: center; }
.recovery-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #444;
}
.recovery-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recovery-item span {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}
.recovery-desc {
  font-size: 0.7rem;
  line-height: 1.5;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s, max-height 0.4s ease;
  font-weight: 300;
  color: #D8D9DB;
  margin-top: 0;
  padding: 0 4px;
}
.recovery-item:hover .recovery-desc,
.recovery-item:focus-within .recovery-desc,
.recovery-item.active .recovery-desc {
  opacity: 0.7;
  max-height: 80px;
  margin-top: 6px;
}
.recovery-item {
  cursor: pointer;
  transition: transform 0.2s;
}
.recovery-item:hover {
  transform: translateY(-4px);
}
.recovery-item:hover .recovery-icon-wrap {
  border-color: #D8D9DB;
}

/* ========== CONTACT ========== */
.contact, footer.contact {
  padding: 60px 0;
}
.contact-divider { display: none; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  margin-top: 2rem;
}
.contact-map iframe { border-radius: 4px; }
.contact-info h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  color: #fff;
}
.contact-info p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-weight: 300;
  opacity: 0.75;
}
.contact-phone {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1rem;
  opacity: 0.85;
}
.contact-phone:hover { opacity: 1; }
.contact-address { opacity: 0.65; }
.social-links { display: flex; gap: 16px; margin-top: 1.5rem; }
.social-icon { opacity: 0.6; transition: opacity 0.2s; }
.social-icon:hover { opacity: 1; }
.seo-context {
  font-size: 0.7rem;
  color: rgba(216,217,219,0.3);
  margin-top: 3rem;
  line-height: 1.6;
  font-weight: 300;
  border-top: 1px solid #2a2f2b;
  padding-top: 1.5rem;
}
.seo-context { display: none; }
.copyright {
  font-size: 0.7rem;
  opacity: 0.3;
  text-align: center;
  margin-top: 3rem;
  letter-spacing: 1px;
  font-weight: 300;
}

/* ========== EDIT MODE ========== */
.edit-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(192,57,43,0.3);
  transition: transform 0.2s;
}
.edit-toggle:hover { transform: scale(1.1); }

.admin-toolbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10001;
  background: #151a16;
  padding: 10px 24px;
  border-bottom: 2px solid #c0392b;
}
.toolbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.toolbar-label {
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: #c0392b;
  font-weight: 500;
  margin-right: auto;
}
.toolbar-btn {
  padding: 8px 20px;
  font-family: 'FoundryGridnik', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}
.toolbar-btn:hover { opacity: 0.85; }
.save-btn { background: #27ae60; color: #fff; }
.reset-btn { background: #e67e22; color: #fff; }
.exit-btn { background: #555; color: #fff; }

body.editing [data-cms] {
  outline: 1px dashed rgba(192,57,43,0.4);
  outline-offset: 3px;
  cursor: text;
  border-radius: 2px;
}
body.editing [data-cms]:hover {
  outline-color: #c0392b;
  background: rgba(192,57,43,0.06);
}
body.editing [data-cms]:focus {
  outline: 1px solid #c0392b;
  background: rgba(192,57,43,0.1);
}
body.editing [data-cms-img] {
  outline: 1px dashed rgba(46,204,113,0.4);
  outline-offset: 3px;
  cursor: pointer;
}
body.editing [data-cms-img]:hover { outline-color: #27ae60; }
body.editing [data-cms-bg] {
  outline: 1px dashed rgba(52,152,219,0.4);
  outline-offset: -3px;
  cursor: pointer;
}
body.editing [data-cms-bg]:hover { outline-color: #3498db; }
body.editing #navbar { top: 46px; }

/* Image Modal */
.img-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-modal-content {
  background: #212722;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 28px;
  width: 90%;
  max-width: 450px;
}
.img-modal-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.img-modal-content p { opacity: 0.6; margin-bottom: 1rem; font-size: 0.85rem; }
.img-modal-content input[type="file"] {
  width: 100%;
  padding: 10px;
  background: #151a16;
  border: 1px solid #333;
  border-radius: 4px;
  color: #D8D9DB;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.img-modal-preview { text-align: center; margin-bottom: 1rem; }
.img-modal-preview img { max-height: 180px; border-radius: 4px; display: none; margin: 0 auto; }
.img-modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image img { height: 280px; }
  .price-card { flex-wrap: wrap; }
  .price-card h3 { min-width: auto; }
  .train-card { flex-wrap: wrap; }
  .train-card h3 { min-width: auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .recovery-grid { gap: 20px; }
}

img[src*="images/"][src$=".svg"] { background: transparent; }
