/* =====================================================================
   OnlineTyari Pro — layout.css
   Header, footer, mobile off-canvas nav, bottom nav. Loaded globally.
   ===================================================================== */

/* ---- Header ---- */
.ot-header {
  position: sticky;
  top: 0;
  z-index: var(--ot-z-header);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--ot-transition-base), border-color var(--ot-transition-base);
}
.ot-header.is-scrolled {
  border-bottom-color: var(--ot-border);
  box-shadow: var(--ot-shadow-sm);
}
.ot-header-inner {
  display: flex;
  align-items: center;
  gap: var(--ot-space-6);
  height: var(--ot-header-height-mobile);
}
@media (min-width: 1024px) {
  .ot-header-inner { height: var(--ot-header-height); }
}

.ot-logo-text {
  display: inline-flex;
  align-items: center;
  gap: var(--ot-space-2);
  font-family: var(--ot-font-heading);
  font-weight: var(--ot-fw-extrabold);
  font-size: var(--ot-fs-xl);
  color: var(--ot-dark);
}
.ot-logo-text:hover { color: var(--ot-dark); }
.ot-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--ot-radius-md);
  background: var(--ot-gradient);
  color: var(--ot-white);
  font-size: var(--ot-fs-sm);
  font-weight: var(--ot-fw-bold);
  flex-shrink: 0;
}
.ot-custom-logo img { max-height: 40px; width: auto; }

.ot-header-brand { flex-shrink: 0; }

.ot-primary-nav { display: none; flex: 1; }
@media (min-width: 1024px) {
  .ot-primary-nav { display: block; }
}
.ot-primary-menu {
  display: flex;
  align-items: center;
  gap: var(--ot-space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.ot-primary-menu > li > a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--ot-radius-md);
  color: var(--ot-text);
  font-weight: var(--ot-fw-medium);
  font-size: var(--ot-fs-sm);
  transition: background var(--ot-transition-fast), color var(--ot-transition-fast);
}
.ot-primary-menu > li > a:hover,
.ot-primary-menu > li.current-menu-item > a {
  background: rgba(var(--ot-primary-rgb), 0.08);
  color: var(--ot-primary);
}

.ot-header-actions {
  display: flex;
  align-items: center;
  gap: var(--ot-space-3);
  margin-left: auto;
}

.ot-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--ot-radius-md);
  border: 1px solid var(--ot-border);
  background: var(--ot-white);
  color: var(--ot-text);
  cursor: pointer;
  transition: border-color var(--ot-transition-fast), color var(--ot-transition-fast);
}
.ot-icon-btn:hover { border-color: var(--ot-primary); color: var(--ot-primary); }

.ot-header-avatar-link { display: inline-flex; }
.ot-header-avatar { border-radius: var(--ot-radius-full); border: 2px solid var(--ot-border); }

.ot-hide-mobile { display: none; }
@media (min-width: 768px) { .ot-hide-mobile { display: inline-flex; } }
.ot-show-mobile { display: flex; }
@media (min-width: 768px) { .ot-show-mobile { display: none; } }

/* ---- Mobile hamburger ---- */
.ot-mobile-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px; height: 40px;
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-md);
  background: var(--ot-white);
  cursor: pointer;
  padding: 0;
}
@media (min-width: 1024px) { .ot-mobile-toggle { display: none; } }
.ot-hamburger-line {
  width: 18px; height: 2px;
  background: var(--ot-text);
  margin-inline: auto;
  border-radius: 2px;
  transition: transform var(--ot-transition-fast), opacity var(--ot-transition-fast);
}
body.ot-nav-open .ot-hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.ot-nav-open .ot-hamburger-line:nth-child(2) { opacity: 0; }
body.ot-nav-open .ot-hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- Header search overlay ---- */
.ot-header-search {
  border-top: 1px solid var(--ot-border);
  background: var(--ot-white);
  padding-block: var(--ot-space-4);
}
.ot-header-search[hidden] { display: none; }
.ot-search-form {
  display: flex;
  align-items: center;
  gap: var(--ot-space-2);
  position: relative;
}
.ot-search-form-icon {
  position: absolute;
  left: var(--ot-space-4);
  color: var(--ot-muted);
  pointer-events: none;
}
.ot-search-form-input { padding-left: 2.75rem; }
.ot-search-suggestions {
  margin-top: var(--ot-space-3);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-md);
  background: var(--ot-white);
}
.ot-search-suggestions[hidden] { display: none; }

/* ---- Mobile off-canvas nav ---- */
.ot-mobile-nav {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(320px, 85vw);
  background: var(--ot-white);
  z-index: var(--ot-z-mobile-nav);
  padding: var(--ot-space-8) var(--ot-space-6);
  transform: translateX(100%);
  transition: transform var(--ot-transition-slow);
  overflow-y: auto;
  box-shadow: var(--ot-shadow-lg);
}
.ot-mobile-nav.is-open { transform: translateX(0); }
.ot-mobile-menu { list-style: none; margin: 0 0 var(--ot-space-8); padding: 0; }
.ot-mobile-menu li + li { margin-top: var(--ot-space-1); }
.ot-mobile-menu a {
  display: block;
  padding: var(--ot-space-3) var(--ot-space-2);
  color: var(--ot-text);
  font-weight: var(--ot-fw-medium);
  border-radius: var(--ot-radius-md);
}
.ot-mobile-menu a:hover { background: var(--ot-bg); color: var(--ot-primary); }
.ot-mobile-nav-footer { display: flex; flex-direction: column; gap: var(--ot-space-3); }

.ot-mobile-nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(16, 21, 43, 0.4);
  z-index: calc(var(--ot-z-mobile-nav) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ot-transition-base);
}
body.ot-nav-open .ot-mobile-nav-backdrop { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) { .ot-mobile-nav, .ot-mobile-nav-backdrop { display: none; } }

/* ---- Footer ---- */
.ot-footer {
  background: var(--ot-dark);
  color: rgba(255, 255, 255, 0.7);
  padding-block: var(--ot-space-16) var(--ot-space-8);
  margin-top: var(--ot-space-20);
}
.ot-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ot-space-10);
}
@media (min-width: 640px) {
  .ot-footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .ot-footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
}
.ot-footer .ot-logo-text { color: var(--ot-white); }
.ot-footer-tagline { margin-top: var(--ot-space-3); color: rgba(255,255,255,0.55); font-size: var(--ot-fs-sm); }
.ot-footer-contact-line { margin: var(--ot-space-2) 0 0; font-size: var(--ot-fs-sm); }
.ot-footer-contact-line a { color: rgba(255,255,255,0.75); }
.ot-footer-contact-line a:hover { color: var(--ot-white); }

.ot-footer-social { display: flex; gap: var(--ot-space-2); margin-top: var(--ot-space-4); }
.ot-social-icon {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--ot-radius-full);
  background: rgba(255,255,255,0.08);
  color: var(--ot-white);
  font-size: var(--ot-fs-xs);
  font-weight: var(--ot-fw-bold);
}
.ot-social-icon:hover { background: var(--ot-primary); color: var(--ot-white); }

.ot-footer-heading { color: var(--ot-white); font-size: var(--ot-fs-sm); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--ot-space-4); }
.ot-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--ot-space-3); }
.ot-footer-menu a { color: rgba(255,255,255,0.65); font-size: var(--ot-fs-sm); }
.ot-footer-menu a:hover { color: var(--ot-white); }
.ot-footer-desc { font-size: var(--ot-fs-sm); color: rgba(255,255,255,0.55); }

.ot-footer-bottom {
  margin-top: var(--ot-space-12);
  padding-top: var(--ot-space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: var(--ot-space-3);
  font-size: var(--ot-fs-xs);
  color: rgba(255,255,255,0.5);
}
@media (min-width: 768px) {
  .ot-footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}
.ot-footer-legal-menu { list-style: none; display: flex; gap: var(--ot-space-5); margin: 0; padding: 0; }
.ot-footer-legal-menu a { color: rgba(255,255,255,0.5); }
.ot-footer-legal-menu a:hover { color: var(--ot-white); }

/* ---- Bottom nav (logged-in mobile students) ---- */
.ot-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--ot-bottom-nav-height);
  background: var(--ot-white);
  border-top: 1px solid var(--ot-border);
  display: flex;
  z-index: var(--ot-z-header);
  box-shadow: 0 -4px 16px rgba(16,21,43,0.06);
}
.ot-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ot-muted);
  font-size: var(--ot-fs-xs);
  font-weight: var(--ot-fw-medium);
}
.ot-bottom-nav-item.is-active { color: var(--ot-primary); }
.ot-bottom-nav-icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: currentColor;
  mask-size: cover;
  opacity: 0.85;
}
/* Simple dot-icon fallback per nav item (keeps this file self-contained
   without an icon font/sprite dependency) */
.ot-bottom-nav-icon { background: none; border: 2px solid currentColor; border-radius: 8px; opacity: 1; }
