/*
Theme Name: Online School Gutenberg
Theme URI: https://example.com/online-school-gutenberg
Author: Your Team
Author URI: https://example.com
Description: Gutenberg-first WordPress theme architecture for a modern online school with LMS support, Customizer options, responsive layouts, and light/dark color modes.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: online-school-gutenberg
Tags: education, e-learning, block-styles, custom-colors, custom-logo, custom-menu, editor-style, full-site-editing, wide-blocks
*/

:root {
  --osg-color-bg: #fff9f0;
  --osg-color-surface: #ffffff;
  --osg-color-text: #263044;
  --osg-color-muted: #697386;
  --osg-color-border: #f0d8c7;
  --osg-color-primary: #5d8cff;
  --osg-color-primary-contrast: #ffffff;
  --osg-color-accent: #ff7aa8;
  --osg-color-sunny: #ffd66b;
  --osg-color-mint: #75e6c1;
  --osg-color-lilac: #b89cff;
  --osg-shadow-soft: 0 20px 50px rgba(93, 140, 255, 0.16);
  --osg-shadow-card: 0 16px 34px rgba(38, 48, 68, 0.1);
  --osg-radius: 18px;
  --osg-content-width: 760px;
  --osg-wide-width: 1180px;
}

[data-theme="dark"] {
  --osg-color-bg: #101418;
  --osg-color-surface: #171d23;
  --osg-color-text: #f4f7fb;
  --osg-color-muted: #a7b1c2;
  --osg-color-border: #2e3845;
  --osg-color-primary: #6ea8fe;
  --osg-color-primary-contrast: #0b1117;
  --osg-color-accent: #ff9ec0;
  --osg-color-sunny: #ffdd7a;
  --osg-color-mint: #6be8cb;
  --osg-color-lilac: #c7b4ff;
  --osg-shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.28);
  --osg-shadow-card: 0 16px 34px rgba(0, 0, 0, 0.24);
}

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

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 214, 107, 0.28), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(117, 230, 193, 0.22), transparent 28rem),
    var(--osg-color-bg);
  color: var(--osg-color-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: var(--osg-color-primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

img,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header,
.site-footer {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--osg-color-border);
  backdrop-filter: blur(16px);
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .site-footer {
  background: rgba(23, 29, 35, 0.9);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--osg-color-border);
}

.site-header__inner,
.site-footer__inner,
.site-main,
.site-archive,
.site-comments {
  width: min(calc(100% - 32px), var(--osg-wide-width));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.2;
}

.site-title a {
  color: var(--osg-color-text);
  text-decoration: none;
}

.site-description {
  margin: 2px 0 0;
  color: var(--osg-color-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu a {
  color: var(--osg-color-text);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 42px;
  height: 42px;
  gap: 5px;
  border: 1px solid var(--osg-color-border);
  border-radius: var(--osg-radius);
  background: var(--osg-color-surface);
  color: var(--osg-color-text);
  cursor: pointer;
}

.menu-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 16px;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(93, 140, 255, 0.22);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--osg-color-border);
  border-radius: var(--osg-radius);
  background: var(--osg-color-surface);
  color: var(--osg-color-text);
  cursor: pointer;
  font-weight: 800;
}

.site-main {
  padding-block: clamp(32px, 6vw, 72px);
}

.entry-header,
.entry-content,
.entry-footer,
.post-navigation,
.comments-area {
  width: min(100%, var(--osg-content-width));
  margin-inline: auto;
}

.page-template-builder-full-width .site-main,
.page-template-builder-canvas .site-main,
.elementor-page .site-main {
  width: 100%;
  max-width: none;
  padding-block: 0;
}

.page-template-builder-full-width .entry-header,
.page-template-builder-full-width .entry-content,
.page-template-builder-canvas .entry-header,
.page-template-builder-canvas .entry-content,
.elementor-page .entry-content {
  width: 100%;
  max-width: none;
}

.page-template-builder-full-width .entry-title,
.page-template-builder-canvas .entry-title,
.elementor-page .entry-title {
  width: min(calc(100% - 32px), var(--osg-wide-width));
  margin-inline: auto;
  padding-top: clamp(24px, 5vw, 56px);
}

.builder-content > .entry-content > *:first-child,
.elementor-page .entry-content > *:first-child {
  margin-top: 0;
}

.builder-content > .entry-content > *:last-child,
.elementor-page .entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-title,
.archive-title,
.page-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.entry-meta,
.entry-footer,
.archive-description {
  color: var(--osg-color-muted);
  font-size: 0.95rem;
}

.wp-block-button__link,
button,
input[type="submit"] {
  border-radius: var(--osg-radius);
}

.wp-block-button__link,
input[type="submit"] {
  background: linear-gradient(135deg, var(--osg-color-primary), var(--osg-color-accent));
  color: var(--osg-color-primary-contrast);
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(93, 140, 255, 0.2);
}

.wp-block-group.has-background,
.course-card,
.lesson-card,
.osg-soft-card,
.osg-home-hero {
  border-radius: var(--osg-radius);
}

.alignwide {
  max-width: var(--osg-wide-width);
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.course-card,
.lesson-card {
  background: var(--osg-color-surface);
  border: 1px solid var(--osg-color-border);
  padding: 22px;
  box-shadow: var(--osg-shadow-card);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.course-card:hover,
.lesson-card:hover,
.osg-soft-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--osg-shadow-soft);
}

.course-card img,
.lesson-card img,
.osg-soft-card img {
  border-radius: 14px;
}

.course-card__title,
.lesson-card__title {
  margin-top: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.site-footer {
  border-top: 1px solid var(--osg-color-border);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 30px;
  color: var(--osg-color-muted);
  font-size: 0.92rem;
}

.osg-home-hero {
  overflow: hidden;
  border: 1px solid rgba(255, 122, 168, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 214, 107, 0.55), rgba(117, 230, 193, 0.34)),
    var(--osg-color-surface);
  box-shadow: var(--osg-shadow-soft);
}

.osg-section {
  padding-block: clamp(42px, 7vw, 86px);
}

.osg-soft-card,
.wp-block-post,
.products .product,
.tutor-course-card,
.tutor-card,
.woocommerce ul.products li.product {
  border: 1px solid var(--osg-color-border);
  border-radius: var(--osg-radius);
  background: var(--osg-color-surface);
  box-shadow: var(--osg-shadow-card);
}

.osg-soft-card {
  padding: 24px;
}

.osg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--osg-color-accent);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.osg-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.osg-pill {
  border-radius: 999px;
  background: rgba(255, 214, 107, 0.35);
  color: var(--osg-color-text);
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.osg-badge-mint {
  background: rgba(117, 230, 193, 0.32);
}

.osg-badge-lilac {
  background: rgba(184, 156, 255, 0.3);
}

.osg-badge-pink {
  background: rgba(255, 122, 168, 0.22);
}

.osg-benefit-grid,
.osg-teacher-grid,
.osg-testimonial-grid,
.osg-faq-grid {
  display: grid;
  gap: 20px;
}

.osg-benefit-grid,
.osg-teacher-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.osg-testimonial-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.osg-faq-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.osg-stat {
  color: var(--osg-color-primary);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 850;
  line-height: 1;
}

.tutor-course-card,
.tutor-card,
.woocommerce ul.products li.product {
  overflow: hidden;
  padding: 18px;
}

.woocommerce ul.products li.product .button,
.tutor-btn,
.tutor-button {
  border-radius: 999px;
}

.elementor-page .site-main {
  background: transparent;
}

.elementor-page .entry-content {
  margin-inline: 0;
}

@media (max-width: 782px) {
  .site-header__inner,
  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  .site-branding {
    grid-column: 1;
  }

  .menu-toggle {
    display: inline-flex;
    grid-column: 2;
  }

  .site-actions {
    grid-column: 3;
  }

  .site-navigation {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
  }

  .site-navigation.is-open {
    display: block;
  }

  .primary-menu {
    align-items: flex-start;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px 16px;
    width: 100%;
    padding-block: 12px;
  }

  .header-cta {
    padding-inline: 14px;
  }
}
