/* Styles for matematicasib.com */
:root {
  --primary: #0f2744;
  --primary-light: #1e3a8a;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --accent: #0d9488;
  --accent-light: #ccfbf1;
  --accent-gold: #d97706;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s ease-in-out;
  --max-w: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--brand-hover);
}

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

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.brand-logo span {
  color: var(--brand);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: #eff6ff;
  color: var(--brand);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid #bfdbfe;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand);
  background-color: #f1f5f9;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand);
  color: #fff !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

.nav-cta:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: #fff;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #1ebd5a;
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--text-muted);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(135deg, #0f2744 0%, #1e3a8a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #93c5fd;
}

.hero-title {
  font-size: 2.6rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-badges {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.95rem;
  color: #e2e8f0;
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Section Common */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background-color: #ffffff;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand);
  background: #eff6ff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Grids & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: #cbd5e1;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Course Highlight Cards */
.course-card {
  border-top: 4px solid var(--brand);
}

.course-card.ai-card {
  border-top-color: var(--accent);
}

.level-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  margin-right: 0.4rem;
  margin-bottom: 0.5rem;
}

.level-hl {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.level-sl {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.feature-list {
  list-style: none;
  margin: 1rem 0 1.5rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: "✓";
  color: #10b981;
  font-weight: 800;
  line-height: 1.4;
}

/* Modality Highlight Banner */
.modality-banner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

.modality-box {
  padding: 1rem;
}

.modality-box:first-child {
  border-right: 1px solid var(--border);
}

.modality-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modality-badge {
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

/* Price Box */
.pricing-card {
  text-align: center;
  padding: 2.5rem 2rem;
  position: relative;
}

.pricing-card.featured {
  border: 2px solid var(--brand);
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-number {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 1rem 0 0.5rem;
}

.price-period {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Teacher Bio */
.bio-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.bio-card-summary {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.bio-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0 auto 1.25rem;
}

.bio-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.bio-role {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.bio-pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.bio-pill-item {
  font-size: 0.88rem;
  background: #f8fafc;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* FAQ Accordion */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: #cbd5e1;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--brand);
  transition: transform 0.2s ease;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* Forms */
.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.notice-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.92rem;
  color: #1e40af;
  margin-bottom: 1.25rem;
}

.notice-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* Article / Resource layout */
.article-card {
  display: flex;
  flex-direction: column;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.75rem;
}

.article-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 2.5rem;
}

.article-content h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin: 1.75rem 0 0.75rem;
}

.article-content h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 1.5rem 0 0.5rem;
}

.article-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-muted);
}

.article-content li {
  margin-bottom: 0.4rem;
}

/* Syllabus Table */
.syllabus-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
}

.syllabus-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.syllabus-table th, .syllabus-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.syllabus-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.syllabus-table td {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.syllabus-table tr:last-child td {
  border-bottom: none;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25d366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: var(--transition);
}

.floating-whatsapp:hover {
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 4.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  color: #cbd5e1;
}

.footer-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: #fff;
  padding-left: 3px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  color: #cbd5e1;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .modality-banner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .modality-box:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 0.75rem;
  }
  .nav-menu.active {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2rem;
  }
  .section-title {
    font-size: 1.7rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .article-content {
    padding: 1.5rem;
  }
}

/* LinkedIn Profile Card & Badge */
.linkedin-card-link {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: #ffffff;
  margin: 0 auto 1.25rem;
  max-width: 320px;
}

.linkedin-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -3px rgba(10, 102, 194, 0.2);
  border-color: #0a66c2;
}

.linkedin-badge-container {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.linkedin-badge-img {
  width: 100%;
  height: auto;
  display: block;
}

.linkedin-badge-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f3f6f8;
  color: #0a66c2;
  font-weight: 700;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  transition: var(--transition);
}

.linkedin-card-link:hover .linkedin-badge-overlay {
  background: #0a66c2;
  color: #ffffff;
}

.linkedin-card-link:hover .linkedin-badge-overlay svg {
  fill: #ffffff;
}

.btn-linkedin {
  background: #0a66c2;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(10, 102, 194, 0.25);
  border: none;
}

.btn-linkedin:hover {
  background: #004182;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(10, 102, 194, 0.35);
}

.btn-linkedin svg {
  fill: currentColor;
}

/* ==========================================================================
   Casio fx-CG50 Laboratory & Interactive HTML5 Canvas Simulator
   ========================================================================== */
.section-casio-lab {
  background: #f1f5f9;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.casio-showcase-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.casio-img-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.casio-badge-top {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.casio-badge-pill {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid #bae6fd;
}

.casio-badge-pill.pill-gold {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.casio-img-wrapper {
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}

.casio-calc-img {
  max-height: 420px;
  width: auto;
  filter: drop-shadow(0 14px 22px rgba(15, 39, 68, 0.18));
  transition: transform 0.3s ease;
}

.casio-calc-img:hover {
  transform: scale(1.02);
}

.casio-specs-box {
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.25rem;
  text-align: left;
  width: 100%;
}

.casio-specs-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.casio-specs-list {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.casio-specs-list li {
  position: relative;
  padding-left: 1.2rem;
  line-height: 1.45;
}

.casio-specs-list li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-size: 0.68rem;
  top: 3px;
}

/* Simulator Card & Canvas */
.casio-simulator-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.simulator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.simulator-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-icon {
  font-size: 1.7rem;
  background: #eff6ff;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.simulator-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}

.simulator-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.sim-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.sim-tab {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.sim-tab.active {
  background: #ffffff;
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.canvas-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #1e293b;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

#ib-math-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 320;
}

.canvas-readout {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 700;
}

.sim-controls-panel {
  margin-top: 1.25rem;
}

.sim-controls-view {
  display: none;
}

.sim-controls-view.active {
  display: block;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.sim-range {
  width: 100%;
  cursor: pointer;
  accent-color: var(--brand);
}

.casio-keypath-box {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid #334155;
}

.keypath-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.keypath-tag {
  color: #38bdf8;
}

.casio-keys {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ckey {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #475569;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 2px 0 #0f172a;
}

.ckey.highlight {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.csep {
  color: #64748b;
  font-size: 0.75rem;
}

.casio-inputs-code {
  background: #020617;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: #4ade80;
  border: 1px solid #1e293b;
}

.sim-action-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 992px) {
  .casio-showcase-grid {
    grid-template-columns: 1fr;
  }
  .controls-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Calculadora Predictiva de Calificaciones IB (Grade Boundary Estimator)
   ========================================================================== */
.section-grade-calc {
  background: #f8fafc;
}

.grade-calc-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.calc-subject-selector {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.selector-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.85rem;
  display: block;
}

.subject-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subject-btn {
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-main);
}

.subject-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.subject-btn.active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.grade-calc-main-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.calc-inputs-column,
.calc-results-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.column-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.calc-input-row {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

.calc-input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
}

.paper-title {
  font-weight: 700;
  color: var(--primary);
}

.paper-weight {
  font-size: 0.78rem;
  background: #eff6ff;
  color: var(--brand);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  border: 1px solid #bfdbfe;
}

.calc-slider-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grade-slider {
  width: 100%;
  cursor: pointer;
  accent-color: var(--brand);
}

.calc-value-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.grade-num-input {
  width: 65px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  color: var(--primary);
}

.grade-num-input:focus {
  outline: none;
  border-color: var(--brand);
}

.pct-score {
  font-weight: 700;
  color: var(--brand);
}

/* Results Column */
.result-badge-card {
  background: linear-gradient(145deg, #0f2744 0%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 25px rgba(15, 39, 68, 0.2);
}

.grade-level-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #93c5fd;
  margin-bottom: 0.75rem;
}

.grade-main-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 0.25rem 0;
}

.grade-digit {
  font-size: 4.8rem;
  font-weight: 900;
  line-height: 1;
  color: #4ade80;
  text-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.grade-max {
  font-size: 1.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.grade-weighted-pct {
  font-size: 1.05rem;
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.boundaries-bar-container {
  margin: 1.25rem 0 1.5rem;
}

.boundaries-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-bottom: 6px;
  font-weight: 600;
}

.boundaries-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  position: relative;
  overflow: visible;
}

.boundaries-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #4ade80);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.boundaries-marker {
  position: absolute;
  top: 12px;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #ffffff;
  transition: left 0.3s ease;
}

.grade-feedback-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #f1f5f9;
  text-align: left;
}

@media (max-width: 992px) {
  .grade-calc-main-grid {
    grid-template-columns: 1fr;
  }
}
