:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --primary: #1f5fff;
  --primary-dark: #0f44d8;
  --text: #1f2937;
  --muted: #4b5563;
  --accent: #7c3aed;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  border-radius: 16px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.lang-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: white;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.brand {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.main-nav {
  display: flex;
  gap: 20px;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-secondary {
  background: #eef2ff;
  color: var(--primary-dark);
}

.hero {
  display: grid;
  align-items: center;
  gap: 32px;
  padding: 64px 32px;
  grid-template-columns: 1.2fr 1fr;
}

/* Mobile navigation */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    color: var(--primary-dark);
    margin-left: 12px;
  }

  .main-nav {
    display: none !important;
    position: absolute;
    top: 70px;
    right: 16px;
    background: var(--surface);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(2,6,23,0.12);
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 360px;
  }

  .main-nav.open {
    display: flex !important;
  }

  .main-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
  }

  .main-nav a:hover {
    background: #f3f4f6;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.05;
}

.hero p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.block-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.block-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.block-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.block-card h3 {
  margin: 20px 20px 10px;
}

.block-card p {
  margin: 0 20px 20px;
  color: var(--muted);
  line-height: 1.8;
}

.feature-summary {
  margin-top: 32px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.summary-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.summary-card h4 {
  margin: 18px 20px 8px;
}

.summary-card p {
  margin: 0 20px 20px;
  color: var(--muted);
  line-height: 1.75;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* Método E.B. */
.method-section {
  background: linear-gradient(180deg, #fff 0%, #fbfbff 100%);
  padding: 2rem 1rem;
  border-radius: 8px;
  margin: 2rem 0;
}
.method-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.method-registered {
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
}
.method-steps {
  margin-top: 1rem;
  padding-left: 1.2rem;
}
.method-steps li {
  margin: 0.5rem 0;
  font-weight: 600;
}
.method-brand {
  margin-top: 1rem;
  font-style: italic;
  color: #334155;
}

/* Casos de éxito */
.case-section {
  padding: 2rem 1rem;
  background: #ffffff;
  border-radius: 8px;
  margin: 2rem 0;
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 1rem;
}
.case-card {
  border: 1px solid #e6e9ef;
  padding: 1rem;
  border-radius: 8px;
  background: #fbfdff;
}
.case-title {
  margin: 0;
  font-size: 1.05rem;
}
.case-role {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.case-body p { margin: 0.4rem 0; }

/* Course detail styles */
.content-block .lead { font-size:1.05rem; color:#334155; }
.course-meta { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin:12px 0; }
.course-meta span { background:#f8fafc; padding:6px 8px; border-radius:6px; font-size:0.95rem; }
.rating { color:#f59e0b; margin-left:6px; }
.badge { background:#06b6d4; color:#fff; padding:6px 8px; border-radius:6px; margin-left:8px; }
.course-intro { margin:12px 0; }
.syllabus { margin-left:1rem; }
.faqs details { margin:8px 0; }
.faq-a { padding:8px 10px; background:#f8fafc; border-radius:6px; margin-top:6px; }
.course-actions { margin-top:12px; display:flex; gap:8px; }

/* Course card summary styles */
.card .muted { color:#64748b; font-size:0.9rem; margin:6px 0; }
.course-summary { display:flex; gap:10px; align-items:center; margin-top:8px; }
.small-rating { color:#f59e0b; font-weight:700; }
.students { color:#475569; font-size:0.95rem; }
.course-card-actions { margin-top:10px; display:flex; gap:8px; }

/* Courses filter controls */
.courses-controls { display:flex; gap:12px; align-items:center; margin:12px 0; flex-wrap:wrap; }
.courses-controls label { font-size:0.95rem; color:#334155; }
.courses-controls select { margin-left:6px; padding:6px 8px; border:1px solid #cbd5e1; border-radius:6px; }
#filter-reset { padding:6px 10px; }

/* Search input */
#filter-search { padding:8px 10px; border:1px solid #cbd5e1; border-radius:8px; width:320px; }

/* Highlight for search matches */
mark { background: #fff2a8; padding: 0 2px; border-radius: 2px; }

/* Admin UI */
.section-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.section-actions { display:flex; gap:8px; }
.case-card .admin-controls { margin-top:8px; display:flex; gap:8px; }
.case-card .admin-controls .btn { padding:6px 8px; font-size:0.85rem; }

/* Reuse .modal styles already in project; ensure form inside modal is styled */
#case-modal .modal-card { max-width:760px; padding:20px; }
#case-form label { display:block; margin:8px 0; font-size:0.95rem; }
#case-form input[type="text"], #case-form textarea { width:100%; padding:8px; border:1px solid #d1d5db; border-radius:6px; }
.modal-actions { display:flex; gap:8px; margin-top:12px; }
.btn-danger { background:#ef4444; color:#fff; border:none; border-radius:6px; padding:8px 12px; }

.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.benefit-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.benefit-card h3 {
  margin: 18px 20px 8px;
}

.benefit-card p {
  margin: 0 20px 20px;
  color: var(--muted);
  line-height: 1.75;
}

.event-card {
  position: relative;
}

.event-type {
  display: inline-flex;
  background: var(--accent);
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.event-date {
  font-weight: 600;
  margin: 12px 0;
  color: var(--primary-dark);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

/* Links for article and course titles */
.blog-card h3 a,
.card h3 a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.blog-card h3 a:hover,
.card h3 a:hover {
  text-decoration: underline;
}

/* Ajustes responsivos para la sección Blog */
@media (max-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .blog-card {
    padding: 16px;
    border-radius: 16px;
  }

  .blog-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .blog-card p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* Ajustes responsivos específicos para la sección Beneficios */
@media (max-width: 1100px) {
  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .benefit-card img {
    height: 160px;
    object-fit: cover;
  }

  .benefit-card {
    padding: 14px;
    border-radius: 16px;
  }
}

.blog-card h3 {
  margin: 0 0 12px;
}

.blog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 900px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
}

.content-blocks {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

/* Equipo de especialistas */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(15,23,42,0.06);
+
}

.profile-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.profile-body {
  padding: 18px;
}

.profile-body h4 {
  margin: 0 0 6px;
}

.profile-body .role {
  margin: 0 0 10px;
  color: var(--primary);
  font-weight: 600;
}

.profile-body .meta {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.socials {
  margin-top: 12px;
+ 
}

.social-link {
  display: inline-block;
+  margin-right: 10px;
+  padding: 8px 12px;
+  border-radius: 999px;
+  background: #f3f4f6;
+  color: var(--muted);
+  text-decoration: none;
+  font-weight: 600;
+}

@media (max-width: 900px) {
  .team-grid, .summary-grid, .block-grid, .feature-grid {
    grid-template-columns: 1fr;
  }
}

.content-block {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  line-height: 1.8;
  color: var(--text);
}

.intro-block {
  font-size: 1.1rem;
  font-weight: 600;
}

.feature-list {
  margin-top: 24px;
  padding-left: 24px;
  color: var(--text);
  line-height: 1.8;
}

.feature-list li {
  margin-bottom: 12px;
}

.closing-text {
  margin-top: 18px;
  font-weight: 600;
}

.feature-card img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.feature-card h3 {
  margin: 20px 20px 10px;
}

.feature-card p {
  margin: 0 20px 20px;
  color: var(--muted);
  line-height: 1.7;
}

.section {
  padding: 56px 32px;
}

.section-alt {
  background: #ffffff;
}

.section h2 {
  margin-top: 0;
  font-size: 2rem;
}

/* Media gallery */
.media-controls {
  display: flex;
  gap: 12px;
  margin: 16px 0 8px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.testimonial-card p {
  margin: 0 0 18px;
  color: var(--text);
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

.testimonial-author strong {
  color: var(--primary);
}

@media (max-width: 900px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

.media-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.media-item img, .media-item .video-thumb {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.media-item .caption {
  padding: 10px;
  font-weight: 600;
  color: var(--muted);
}

.media-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 60;
}

.media-modal-card {
  background: white;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  padding: 12px;
}

.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
}

.media-nav:hover { background: rgba(0,0,0,0.8); }

.media-nav-prev { left: 8px; }
.media-nav-next { right: 8px; }

.media-modal-content img, .media-modal-content iframe, .media-modal-content video {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.media-close {
  background: transparent;
  border: none;
  font-size: 26px;
  float: right;
  cursor: pointer;
}

@media (max-width: 900px) {
  .media-grid { grid-template-columns: repeat(2, 1fr); }
}

.section p {
  color: var(--muted);
  max-width: 720px;
}

.cards-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 32px;
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.shop-actions .btn {
  flex: 1 1 140px;
  min-width: 140px;
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.card h3 {
  margin: 0 0 12px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.card strong {
  display: block;
  margin: 18px 0 6px;
  font-size: 1.2rem;
}

.card ul {
  padding-left: 20px;
  color: var(--muted);
  margin: 16px 0 20px;
}

#dashboard-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  min-height: 240px;
}

.content-block img,
.card img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  margin: 18px 0;
}

.dashboard-item {
  margin-bottom: 18px;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.cart-qty-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.cart-qty {
  width: 72px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
}


.dashboard-item strong {
  display: block;
  margin-bottom: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-card {
  width: min(520px, 100%);
  background: white;
  border-radius: 24px;
  padding: 32px;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
  border: none;
  background: none;
  font-size: 1.6rem;
  cursor: pointer;
}

.hidden {
  display: none;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0 16px;
}

.tab {
  flex: 1;
  padding: 12px 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  cursor: pointer;
}

.tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

form {
  display: grid;
  gap: 14px;
}

label {
  font-weight: 600;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.message {
  min-height: 1.2rem;
  color: #b91c1c;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
}
