/* Interactive states and readable tablet/mobile layouts. Desktop reference rules remain intact. */

.site {
  --header-height: 14.5cqw;
}

body:is([data-page="blog"], [data-page="gallery"], [data-page="register"], [data-page="contact"], [data-page="article"]) .site {
  --header-height: 11.7cqw;
}

#app {
  min-height: calc(100vh - var(--header-height));
}

.page {
  min-height: 0;
}

body[data-page="contact"] #app {
  min-height: 0;
}

address {
  font-style: normal;
  margin: 0;
}

.breadcrumb {
  display: flex;
  justify-content: flex-start;
  gap: .7cqw;
  align-items: center;
}

.form-panel h1 + .form-field label {
  margin-top: 1.4cqw;
}

.form-disclaimer {
  font-size: 1.7cqw;
  color: #687891;
  line-height: 1.9;
  margin: 2.5cqw 0 0;
}

.field-error {
  display: block;
  color: #ae3528;
  font-size: 1.7cqw;
  line-height: 1.7;
  margin-top: .7cqw;
}

[aria-invalid="true"] {
  border-color: #b94637 !important;
}

.form-status[data-state="error"] {
  color: #ae3528;
}

.email-request {
  display: block;
  margin-top: 1cqw;
}

.menu-toggle {
  display: none;
}

.social {
  display: block;
  flex-shrink: 0;
}

.social:hover {
  opacity: .82;
}

.gallery-grid button:hover .art {
  transform: none;
}

.gallery-grid button:hover {
  outline: 2px solid #ffba80;
  outline-offset: 2px;
}

.btn:active {
  background: #d96000;
}

.btn:disabled, button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.modal-open {
  overflow: hidden;
}

.article-content > time {
  display: block;
  font-size: 1.8cqw;
  margin: -3cqw 0 3cqw;
  color: #718099;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  right: 8px;
  padding: 10px 16px;
  background: #102139;
  color: white;
  z-index: 200;
  border-radius: 5px;
}

@media (max-width: 900px) {
  .site {
    --header-height: 78px !important;
  }
  .site #header {
    height: 78px;
    padding: 14px 20px;
    gap: 12px;
    position: relative;
    z-index: 10;
  }
  .site #header .brand {
    margin-right: auto;
    gap: 8px;
  }
  .site #header .brand .art {
    width: 48px;
    height: 48px;
  }
  .site #header .brand b {
    font-size: 15px;
  }
  .site #header .brand small {
    font-size: 9px;
  }
  .site #header .header-cta {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 6px;
    order: 3;
  }
  .site #header .menu-toggle {
    display: grid;
    place-items: center;
    order: 2;
    width: 42px;
    height: 42px;
    border: 1px solid #dce4ef;
    background: white;
    color: #102139;
    border-radius: 6px;
    padding: 9px;
  }
  .menu-toggle svg {
    width: 100%;
    height: 100%;
  }
  .site #primary-navigation {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: 20px;
    right: 20px;
    margin: 0;
    padding: 8px;
    background: white;
    border: 1px solid #dce4ef;
    border-radius: 0 0 8px 8px;
  }
  .site #primary-navigation a {
    font-size: 15px;
    padding: 9px 14px;
    min-height: 44px;
  }
  .site #primary-navigation a:hover {
    background: #f5f7fa;
  }
  .menu-open .site #primary-navigation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .home-courses, .course-grid, .blog-grid, .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .popular {
    height: auto;
  }
  .home-card {
    height: auto;
    min-height: 220px;
  }
  .home-card .art {
    width: 60px;
    height: 60px;
  }
  .home-card h3 {
    font-size: 20px;
  }
  .home-card p {
    font-size: 12px;
  }
  .home-card .round-link {
    margin-top: 16px;
  }
  .course-card {
    height: 290px;
    padding: 28px 16px;
  }
  .course-card .art {
    width: 70px;
    height: 70px;
    margin-bottom: 18px;
  }
  .course-card h2 {
    font-size: 20px;
  }
  .course-card p {
    font-size: 12px;
  }
  .course-card .btn {
    font-size: 13px;
    padding: 9px 18px;
  }
  .values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .value {
    height: auto;
    min-height: 165px;
  }
  .course-intro {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .gallery-grid {
    gap: 18px;
  }
}

@media (max-width: 600px) {
  .site {
    --header-height: 76px !important;
  }
  .site #header {
    height: 76px;
    padding: 12px 16px;
    gap: 9px;
  }
  .site #header .brand .art {
    width: 44px;
    height: 44px;
  }
  .site #header .brand b {
    font-size: 13px;
  }
  .site #header .brand small {
    font-size: 8px;
  }
  .site #header .brand {
    gap: 6px;
  }
  .site #header .header-cta {
    font-size: 12px;
    padding: 10px 12px;
  }
  .site #header .menu-toggle {
    width: 40px;
    height: 40px;
    padding: 8px;
  }
  .site #primary-navigation {
    left: 16px;
    right: 16px;
  }
  .page {
    padding: 28px 20px;
    min-height: 0;
  }
  .page-heading {
    font-size: 26px;
    line-height: 1.5;
    margin: 0 0 26px;
  }
  .btn {
    font-size: 14px;
    padding: 12px 20px;
    gap: 12px;
    border-radius: 8px;
  }
  .hero {
    height: 320px;
  }
  .hero-copy {
    padding: 48px 24px 0;
  }
  .hero h1 {
    font-size: 30px;
    line-height: 1.6;
    white-space: normal;
  }
  .hero p {
    font-size: 14px;
    line-height: 1.9;
    margin: 12px 0 24px;
  }
  .hero .btn {
    width: auto;
    height: auto;
    min-height: 44px;
    padding: 11px 20px;
    font-size: 14px;
    gap: 12px;
    border-radius: 8px;
  }
  .dots {
    bottom: 18px;
    gap: 8px;
  }
  .dot {
    width: 8px;
    height: 8px;
  }
  .popular {
    height: auto;
    padding: 28px 20px;
  }
  .popular h2 {
    font-size: 22px;
    line-height: 1.6;
    margin: 0 0 22px;
  }
  .home-courses {
    gap: 12px;
  }
  .home-card {
    min-height: 190px;
    height: auto;
    padding: 22px 10px 18px;
    border-radius: 8px;
  }
  .home-card .art {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
  }
  .home-card h3 {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 6px;
  }
  .home-card p {
    font-size: 10px;
    line-height: 1.7;
    min-height: 35px;
  }
  .round-link {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
  .stats {
    height: auto;
    padding: 28px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
  .stat .art {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
  }
  .stat strong {
    font-size: 26px;
    line-height: 1.5;
  }
  .stat p {
    font-size: 12px;
    line-height: 1.7;
    margin-top: 6px;
  }
  .catalog-page .page-heading {
    font-size: 26px;
    line-height: 1.5;
  }
  .catalog-page .subtitle {
    font-size: 14px;
    line-height: 1.9;
    margin: 6px 0 26px;
  }
  .course-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .course-card {
    height: auto;
    min-height: 260px;
    border-radius: 9px;
    padding: 26px 18px;
  }
  .course-card .art {
    width: 66px;
    height: 66px;
    margin-bottom: 16px;
  }
  .course-card h2 {
    font-size: 21px;
    line-height: 1.6;
    margin: 0 0 10px;
  }
  .course-card p {
    font-size: 12px;
    line-height: 1.8;
    min-height: 36px;
    margin: 0 0 20px;
  }
  .course-card .btn {
    font-size: 14px;
    padding: 11px 22px;
    min-height: 44px;
    gap: 12px;
    border-radius: 20px;
  }
  .register-banner {
    height: auto;
    margin-top: 28px;
    padding: 26px 18px;
    border-radius: 9px;
  }
  .register-banner .art {
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
  }
  .register-banner h2 {
    font-size: 20px;
    line-height: 1.8;
    margin: 0 0 10px;
  }
  .register-banner p {
    font-size: 13px;
    line-height: 1.9;
    margin-bottom: 18px;
  }
  .register-banner .btn {
    font-size: 14px;
    min-height: 44px;
    padding: 11px 22px;
    border-radius: 8px;
  }
  .course-page .page-heading {
    margin-bottom: 12px;
  }
  .breadcrumb {
    font-size: 12px;
    line-height: 1.8;
    gap: 7px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    margin-bottom: 24px !important;
  }
  .course-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 30px;
  }
  .course-intro h2 {
    font-size: 24px;
    line-height: 1.6;
    margin: 0 0 8px;
  }
  .course-intro p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
  }
  .benefits {
    font-size: 15px;
    line-height: 2.2;
  }
  .benefits li:before {
    padding-left: 8px;
  }
  .course-intro > .photograph {
    width: 100%;
    border-radius: 9px;
  }
  .syllabus-title {
    font-size: 22px;
    gap: 16px;
    margin: 0 0 18px;
  }
  .syllabus details {
    margin: 10px 0;
    padding: 12px 14px;
    border-radius: 7px;
  }
  .syllabus summary {
    font-size: 15px;
    line-height: 1.8;
  }
  .syllabus p {
    font-size: 14px;
    line-height: 1.9;
  }
  .course-register {
    height: auto;
    min-height: 46px;
    margin-top: 30px;
    padding: 11px 20px;
    font-size: 16px;
    border-radius: 24px;
  }
  .about-page > .page-heading {
    margin-bottom: 26px;
  }
  .about-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .about-intro h2 {
    font-size: 22px;
    line-height: 1.7;
    margin-bottom: 16px;
  }
  .about-intro p {
    font-size: 15px;
    line-height: 2.2;
  }
  .about-intro > .art {
    width: 100%;
    aspect-ratio: 1.2;
    border-radius: 9px;
  }
  .values {
    margin: 32px 0;
    gap: 12px;
  }
  .value {
    height: auto;
    min-height: 160px;
    padding: 22px 10px;
    border-radius: 8px;
  }
  .value .art {
    width: 44px;
    height: 44px;
  }
  .value h3 {
    font-size: 14px;
    line-height: 1.8;
    margin-top: 14px;
  }
  .vision {
    margin: 0;
    gap: 16px;
  }
  .vision > .art {
    width: 56px;
    height: 56px;
  }
  .vision h2 {
    font-size: 22px;
    line-height: 1.7;
    margin-bottom: 12px;
  }
  .vision p {
    font-size: 14px;
    line-height: 2.1;
  }
  .blog-page .page-heading {
    margin-bottom: 26px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .article {
    border-radius: 9px;
  }
  .article > .photograph {
    aspect-ratio: 1.65;
  }
  .article h2 {
    font-size: 20px;
    line-height: 1.8;
    min-height: 0;
    margin: 20px 18px 24px;
  }
  .article time {
    font-size: 12px;
    padding: 0 18px 12px;
  }
  .article-link {
    font-size: 14px;
    line-height: 1.8;
    padding: 12px 18px;
  }
  .pagination {
    gap: 5px;
    margin: 30px 0 0;
  }
  .pagination button {
    width: 36px;
    height: 40px;
    border-radius: 6px;
    font-size: 15px;
  }
  .gallery-page .page-heading {
    margin-bottom: 24px;
  }
  .gallery-page .filters {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .gallery-page .filter {
    height: 40px;
    padding: 6px 14px;
    border-radius: 22px;
    font-size: 13px;
    line-height: 1.8;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .gallery-grid button {
    border-radius: 8px;
  }
  .form-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .form-panel {
    padding: 22px;
    border-radius: 9px;
  }
  .form-panel h1 {
    font-size: 26px;
    line-height: 1.5;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }
  .form-panel label, .form-panel h1 + .form-field label {
    font-size: 14px;
    line-height: 1.8;
    margin: 14px 0 6px;
  }
  .form-panel input, .form-panel select, .form-panel textarea {
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 6px;
  }
  .form-panel input, .form-panel select {
    height: 46px;
    min-height: 46px;
  }
  .form-panel input[type="tel"] {
    direction: ltr;
    text-align: right;
  }
  .form-panel textarea {
    height: 120px;
  }
  .form-panel .btn {
    min-height: 44px;
    margin-top: 18px;
    font-size: 16px;
    border-radius: 6px;
  }
  .field-error {
    font-size: 12px;
    margin-top: 5px;
  }
  .form-status {
    font-size: 13px;
    line-height: 1.9;
    margin-top: 14px;
  }
  .email-request {
    margin-top: 8px;
  }
  .form-disclaimer {
    font-size: 12px;
    line-height: 1.9;
    margin: 18px 0 0;
  }
  .contact-panel {
    margin: 0;
    padding: 28px 22px;
    border-radius: 9px;
  }
  .contact-panel > .art {
    width: 70px;
    height: 60px;
    margin-bottom: 16px;
  }
  .contact-panel h2 {
    font-size: 22px;
    line-height: 1.7;
    margin-bottom: 10px;
  }
  .contact-panel p {
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 18px;
  }
  .contact-line, .contact-layout .contact-line {
    font-size: 14px;
    line-height: 1.9;
    gap: 12px;
    margin: 18px 0;
  }
  .contact-line .symbol {
    width: 22px;
    height: 25px;
  }
  .socials, .contact-layout .socials {
    gap: 12px;
    margin-top: 22px;
  }
  .social, .contact-layout .social {
    width: 36px;
    height: 36px;
  }
  .contact-page .page-heading {
    margin-bottom: 24px;
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact-page .map {
    height: 240px;
    border-radius: 8px;
  }
  footer {
    padding: 28px 20px 18px;
  }
  .footer-main {
    flex-direction: column;
    align-items: stretch;
  }
  .site .footer-brand .brand {
    gap: 10px;
  }
  .site .footer-brand .brand .art {
    width: 54px;
    height: 54px;
  }
  .site .footer-brand .brand b {
    font-size: 18px;
  }
  .site .footer-brand .brand small {
    font-size: 11px;
  }
  .footer-brand p {
    font-size: 14px;
    line-height: 1.8;
    margin: 12px 0 0;
  }
  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 18px;
    margin: 24px 0 0;
  }
  .copyright {
    font-size: 11px;
    line-height: 1.9;
    margin: 24px 0 0;
  }
  .article-content > time {
    font-size: 12px;
    margin: -12px 0 20px;
  }
  .article-content > .art {
    border-radius: 8px;
    margin-bottom: 20px;
  }
  .article-content p {
    font-size: 15px;
    line-height: 2.1;
  }
  .modal-inner {
    padding: 44px 18px 20px;
  }
}

[tabindex="-1"]:focus {
  outline: none;
}
input[type="tel"] { direction: ltr; text-align: right; }
