/* Open Yoga University — static version of the Moodle "More" theme look.
   Change the brand colors here; everything else derives from them. */
@import url('https://fonts.googleapis.com/css?family=Comfortaa:300,400,700&subset=cyrillic,latin-ext&display=swap');

:root {
  --text: #333366;
  --link: #ff7f41;
  --link-hover: #d9602a;
  --bg: #f4f4f4;
  --surface: #ffffff;
  --border: #dddddd;
  --muted: #777799;
  --navbar-bg: #ffffff;
  /* Cream tones from the original Moodle theme */
  --cream: #fffbea;
  --cream-strong: #fff6d0;
  --cream-border: #fff4c6;
  --cream-edge: #ffefad;
  --cream-gradient: linear-gradient(to bottom, #ffffff, var(--cream));
  --footer-bg: #333366;
  --footer-text: #ffffff;
  --radius: 4px;
  --heading-font: 'Comfortaa', 'Helvetica Neue', Arial, sans-serif;
  --body-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  /* Sticky footer: the footer sits at the bottom of the window on short pages */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > .container { width: 100%; }
img, video { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading-font); color: var(--text); line-height: 1.3; margin: 1.2em 0 .5em; }
h1 { font-size: 28px; } h2 { font-size: 24px; } h3 { font-size: 20px; }
h4 { font-size: 18px; } h5 { font-size: 16px; } h6 { font-size: 14px; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Navbar ---------- */
.navbar { background: var(--navbar-bg) var(--cream-gradient); border-bottom: 1px solid var(--cream-edge); box-shadow: 0 1px 3px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 50; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--heading-font); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { height: 44px; width: auto; display: block; }
.brand span { font-size: 17px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; cursor: pointer; color: var(--text); font-size: 18px; line-height: 1; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; font-family: var(--heading-font); }
.menu > li { position: relative; }
.menu a, .menu button.submenu-toggle { display: block; padding: 10px 14px; color: var(--text); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; border-radius: var(--radius); }
.menu a:hover, .menu button.submenu-toggle:hover, .menu .current > a { background: var(--cream-strong); color: var(--link); text-decoration: none; }
.has-sub > a::after, .submenu-toggle::after { content: " ▾"; font-size: 11px; }
.submenu { list-style: none; margin: 0; padding: 6px 0; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--cream); border: 1px solid var(--cream-edge); border-radius: var(--radius); box-shadow: 0 6px 16px rgba(0,0,0,.1); display: none; }
.submenu a { padding: 8px 16px; border-radius: 0; }
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu, .has-sub.open > .submenu { display: block; }

/* ---------- Page header ---------- */
.page-header { padding: 20px 0 8px; }
/* Site name repeats the header brand text, so it only shows on small screens where that text is hidden */
.page-header .site-title { display: none; margin: 0; font-size: 26px; }
.breadcrumb { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/ "; color: var(--muted); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; padding: 16px 0 40px; }
.main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; min-width: 0; }
.main > :first-child { margin-top: 0; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.block { background: var(--cream); border: 1px solid var(--cream-border); border-radius: var(--radius); padding: 14px 16px; box-shadow: inset 0 1px 1px rgba(0,0,0,.05); }
.block h2 { font-size: 16px; margin: 0 0 10px; }
.block ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.block li { padding: 4px 0; border-bottom: 1px dotted var(--cream-edge); }
.block li:last-child { border-bottom: 0; }
.block .current a { font-weight: 700; color: var(--text); }

/* ---------- Content helpers ---------- */
.hero-img { width: 100%; display: block; border-radius: var(--radius); margin-bottom: 16px; }
.content-img { display: block; margin: 16px auto; border-radius: var(--radius); }
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.map-embed { max-width: 600px; aspect-ratio: 4 / 3; margin: 16px 0 24px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.map-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
thead th { background: var(--cream-strong); }
.btn { display: inline-block; background: var(--link); color: #fff; padding: 12px 22px; border-radius: var(--radius); font-family: var(--heading-font); font-weight: 700; border: 0; cursor: pointer; font-size: 15px; }
.btn:hover, .btn:focus { background: var(--link-hover); color: #fff; text-decoration: none; }
.btn small { display: block; font-weight: 400; font-size: 12px; opacity: .9; }
.cta { text-align: center; margin: 24px 0; }
.quicklinks { font-size: 14px; color: var(--muted); }

/* Program cards (home + programs) */
.programs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin: 16px 0 24px; }
.program-card { text-align: center; border: 1px solid var(--cream-border); border-radius: var(--radius); padding: 12px; background: var(--surface) var(--cream-gradient); transition: box-shadow .15s; }
.program-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.program-card img { width: 180px; max-width: 100%; height: auto; display: block; margin: 0 auto 8px; border-radius: var(--radius); }
.program-card .kind { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.program-card a { font-family: var(--heading-font); font-weight: 700; }

/* Program at a glance */
.glance { list-style: none; padding: 0; margin: 12px 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.glance li { background: var(--cream-gradient); border: 1px solid var(--cream-border); border-radius: var(--radius); padding: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.glance strong { display: block; font-family: var(--heading-font); font-size: 22px; color: var(--text); margin-bottom: 2px; }
.glance img { height: 32px; width: auto; }

.costs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 16px; }
.costs div { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.costs h5 { margin: 0 0 4px; font-size: 14px; }
.costs p { margin: 0; }

/* Home sections */
.home-sections { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 24px; }
.home-sections > li { border-top: 1px solid var(--border); padding-top: 20px; }
.home-sections > li.highlight { background: var(--cream); border: 1px solid var(--cream-border); border-radius: var(--radius); padding: 4px 20px 20px; }
.home-sections > li.highlight + li { border-top: 0; padding-top: 0; }
.home-sections > li.highlight > :last-child { margin-bottom: 0; }
.float-img { float: left; margin: 0 16px 8px 0; max-width: 40%; border-radius: var(--radius); }
.float-img.float-right { float: right; margin: 0 0 8px 16px; }
.clearfix::after { content: ""; display: table; clear: both; }
.video-section { text-align: center; }
.video-section video, .video-launch { display: block; width: 100%; max-width: 400px; aspect-ratio: 16 / 9; margin: 0 auto 16px; background: #000; border-radius: var(--radius); }
.video-launch { position: relative; overflow: hidden; }
.video-launch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.play-btn { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(51,51,102,.75); box-shadow: 0 2px 10px rgba(0,0,0,.3); transition: background .15s, transform .15s; }
.play-btn::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -12px 0 0 -7px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.video-launch:hover .play-btn, .video-launch:focus-visible .play-btn { background: var(--link); transform: scale(1.08); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Graduates */
.graduate { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.graduate:last-child { border-bottom: 0; }
.graduate img { width: 100%; border-radius: var(--radius); }
.graduate h4 { margin-top: 0; }
.profile-head { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; margin-bottom: 16px; }
.profile-head img { width: 100%; border-radius: var(--radius); }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 4px 0; }
.facts span { color: var(--muted); display: inline-block; min-width: 110px; }

/* Forms */
.form { display: grid; gap: 14px; max-width: 560px; margin: 16px 0; }
.form label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); width: 100%; }
.form textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { margin-top: auto; background: var(--footer-bg); color: var(--footer-text); padding: 20px 0; font-size: 14px; }
.footer a { color: var(--footer-text); text-decoration: underline; }
.footer .container { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; }
.footer-metrika { flex-basis: 100%; text-align: center; line-height: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .nav-toggle { display: block; margin-left: auto; }
  /* Menu drops down over the page so the header and content don't move */
  .navbar nav { position: absolute; top: 100%; left: 0; right: 0; }
  .menu { display: none; flex-direction: column; width: 100%; padding: 8px 16px 12px; background: var(--cream); border-bottom: 1px solid var(--cream-edge); box-shadow: 0 6px 16px rgba(0,0,0,.1); max-height: calc(100vh - 64px); overflow-y: auto; }
  .menu a, .menu button.submenu-toggle { width: 100%; text-align: left; }
  .menu.open { display: flex; }
  .submenu { position: static; box-shadow: none; border: 0; padding-left: 12px; }
  .has-sub:hover > .submenu { display: none; }
  .has-sub.open > .submenu { display: block; }
}
@media (max-width: 600px) {
  .main { padding: 18px 16px; }
  .two-col, .graduate, .profile-head { grid-template-columns: 1fr; }
  .graduate img, .profile-head img { max-width: 240px; }
  .float-img, .float-img.float-right { float: none; max-width: 100%; margin: 0 0 12px; }
  .brand span { display: none; }
  .page-header .site-title { display: block; }
}
