/* ===========================
   STUDIOMATHS-IA — STYLE.CSS
   =========================== */

:root {
  --teal:   #00897B;
  --teal-light: #00e5cc;
  --blue:   #1565C0;
  --blue-light: #56b4f5;
  --violet: #6A1B9A;
  --violet-light: #b39ddb;
  --orange: #E65100;
  --orange-light: #F5A623;
  --pink:   #AD1457;
  --pink-light: #f48fb1;
  --dark:   #0a1628;
  --bg:     #F4F7FB;
  --white:  #ffffff;
  --text:   #1a2340;
  --text-light: #6b7a99;
  --border: #e0e7f0;
  --shadow: 0 2px 12px rgba(26,35,64,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =====================
   HEADER & NAVIGATION
   ===================== */

.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-decoration: none;
}

.logo-studio { color: var(--teal); }
.logo-maths  { color: var(--text); }
.logo-ia     { color: var(--orange-light); }

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-btn {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--white);
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}

.nav-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-teal   { background: var(--teal); }
.btn-blue   { background: var(--blue); }
.btn-violet { background: var(--violet); }
.btn-orange { background: var(--orange); }
.btn-pink   { background: var(--pink); }

.nav-burger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
}

/* =====================
   SEARCH BAR
   ===================== */

.search-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 2rem;
  display: flex;
  justify-content: center;
}

.search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 55%;
  max-width: 600px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  transition: border-color 0.2s;
}

.search-inner:focus-within {
  border-color: var(--teal);
}

.search-icon { color: var(--text-light); flex-shrink: 0; }

.search-inner input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  font-family: 'Open Sans', sans-serif;
}

.search-inner input::placeholder { color: var(--text-light); }

/* =====================
   HERO SECTION
   ===================== */

.hero {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  gap: 3rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* VIDEO BOX */
.video-box {
  flex-shrink: 0;
  width: 260px;
  text-align: center;
}

.video-thumb {
  width: 260px;
  height: 155px;
  background: linear-gradient(135deg, #0d1e3a 0%, #1a2e5a 100%);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  margin-bottom: 12px;
}

.video-thumb:hover {
  transform: scale(1.02);
  border-color: var(--orange-light);
}

.play-btn {
  width: 52px;
  height: 52px;
  background: var(--orange-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.play-btn:hover { transform: scale(1.1); }

.video-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
}

.video-sub {
  font-size: 11px;
  color: var(--text-light);
}

/* NEURAL NETWORK */
.network-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.network-svg {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* SYNAPSES */
.synapse {
  stroke-width: 2.5;
  stroke-dasharray: 6 4;
  stroke-linecap: round;
  animation: pulse-line 2s ease-in-out infinite;
}

.syn-teal   { stroke: var(--teal-light); animation-delay: 0s; }
.syn-blue   { stroke: var(--blue-light); animation-delay: 0.4s; }
.syn-violet { stroke: var(--violet-light); animation-delay: 0.8s; }
.syn-orange { stroke: var(--orange-light); animation-delay: 1.2s; }
.syn-pink   { stroke: var(--pink-light); animation-delay: 1.6s; }

@keyframes pulse-line {
  0%, 100% { opacity: 0.5; stroke-width: 2; }
  50% { opacity: 1; stroke-width: 3; }
}

/* NODE CIRCLES */
.node-circle {
  transition: transform 0.2s;
  transform-box: fill-box;
  transform-origin: center;
}

.node-link {
  cursor: pointer;
}

.node-link:hover + .node-circle,
.node-link:hover ~ .node-circle {
  transform: scale(1.08);
}

/* =====================
   FOOTER
   ===================== */

.footer {
  background: var(--dark);
  padding: 16px 2rem;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-family: 'Open Sans', sans-serif;
}

.footer-brand {
  color: var(--teal-light);
  font-weight: 700;
}

.footer a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
}

.footer a:hover { color: var(--orange-light); }

/* =====================
   INNER PAGES — SHARED
   ===================== */

.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

.page-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 32px;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 15px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* LEVEL CARDS GRID */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.level-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: block;
}

.level-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26,35,64,0.12);
}

.level-card .level-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 36px;
  margin-bottom: 8px;
  display: block;
}

.level-card .level-desc {
  font-size: 12px;
  color: var(--text-light);
}

.card-teal   { border-color: var(--teal);   } .card-teal .level-num   { color: var(--teal); }
.card-blue   { border-color: var(--blue);   } .card-blue .level-num   { color: var(--blue); }
.card-violet { border-color: var(--violet); } .card-violet .level-num { color: var(--violet); }
.card-orange { border-color: var(--orange); } .card-orange .level-num { color: var(--orange); }
.card-pink   { border-color: var(--pink);   } .card-pink .level-num   { color: var(--pink); }

/* CHAPTER LIST */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1rem;
}

.chapter-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s, transform 0.15s;
  font-weight: 600;
  font-size: 14px;
}

.chapter-item:hover {
  border-color: var(--teal);
  transform: translateX(4px);
}

.chapter-item .arrow { color: var(--text-light); font-size: 18px; }

/* WORK FILES */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.work-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.work-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

.work-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

.work-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.btn-action {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
}

.btn-view     { background: var(--teal); }
.btn-download { background: var(--blue); }

/* VIDEO GRID */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.video-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(26,35,64,0.12);
}

.video-thumb-card {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, #0d1e3a, #1a2e5a);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-thumb-card .play-btn { background: var(--orange-light); }

.video-card-info {
  padding: 1rem;
}

.video-card-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.video-card-meta {
  font-size: 11px;
  color: var(--text-light);
}

.yt-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  color: #CC0000;
  font-weight: 700;
  text-decoration: none;
}

/* EN CONSTRUCTION */
.construction {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.construction-icon {
  font-size: 64px;
  margin-bottom: 1.5rem;
  display: block;
}

.construction h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 24px;
  margin-bottom: 1rem;
  color: var(--text);
}

.construction p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
}

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--teal); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-light); }

/* SECTION TITLE */
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.section-sub {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* BADGE */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  color: var(--white);
  margin-left: 8px;
}

.badge-construction { background: var(--orange); }

/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
  .video-box { width: 100%; max-width: 360px; }
  .video-thumb { width: 100%; }
  .network-wrap { width: 100%; }
  .search-inner { width: 90%; }
}

@media (max-width: 680px) {
  .nav { padding: 0 1rem; height: 60px; }
  .nav-logo { font-size: 20px; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 99;
    gap: 8px;
  }
  .search-inner { width: 100%; }
  .page-header h1 { font-size: 24px; }
}
