html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

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

button,
input,
textarea,
select,
a {
  min-height: 44px;
}

@media (max-width: 700px) {
  :root {
    --nav-height: 64px;
  }

  #navbar {
    height: 64px;
    padding: 0 16px;
  }

  .logo {
    gap: 8px;
    min-width: 0;
  }

  .logo img {
    max-height: 34px;
  }

  .logo-text {
    min-width: 0;
  }

  .logo-title {
    font-size: 13px;
    white-space: nowrap;
  }

  .logo-sub {
    font-size: 8px;
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #mobileMenu {
    top: 64px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 10px 16px 16px;
  }

  .hero {
    min-height: auto;
    padding-top: 64px;
  }

  .hero-content {
    padding: 40px 18px 46px;
    gap: 24px;
  }

  .hero-text h1 {
    font-size: 34px;
    line-height: 1.12;
  }

  .hero-text p {
    font-size: 14px;
    margin-bottom: 22px;
  }

  .hero-buttons {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px !important;
  }

  .hero-buttons button,
  .btn-red,
  .btn-outline,
  .watch-btn,
  .join-btn,
  .social-btn {
    width: 100%;
    justify-content: center;
  }

  .hero-card {
    border-radius: 14px;
    padding: 22px 16px;
    animation: none;
  }

  .hero-emoji {
    font-size: 48px;
  }

  .hero-stats {
    gap: 0;
  }

  .section,
  .about-strip {
    padding: 56px 18px;
  }

  .container {
    padding: 0;
  }

  .section-title {
    font-size: 26px;
  }

  .section-sub {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .features-grid,
  .content-grid,
  .deadlines-grid,
  .values-grid,
  .team-grid,
  .workshops-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .feature-card,
  .content-card,
  .value-card,
  .team-card,
  .deadline-card,
  .workshop-content {
    padding: 20px 16px;
  }

  .page-hero {
    padding: 106px 18px 48px;
  }

  .page-hero::before {
    width: 220px;
    height: 220px;
    top: -70px;
    right: -90px;
  }

  .page-hero h1 {
    font-size: 34px;
  }

  .page-hero p {
    font-size: 14px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .stat-item {
    padding: 8px 4px;
  }

  .mission-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }

  .mission-quote {
    border-radius: 14px;
    padding: 28px 20px;
  }

  .mission-quote blockquote {
    font-size: 16px;
  }

  .timeline-item,
  .history-item,
  .info-card {
    gap: 10px;
  }

  .social-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .form-container,
  .login-box {
    max-width: 100%;
  }

  .form-card,
  .success-card,
  .admin-form-card,
  .admin-card-body {
    padding: 22px 16px;
  }

  .form-card h2 {
    font-size: 21px;
  }

  .login-wrap {
    min-height: auto;
  }

  .login-right {
    padding: 28px 16px 48px;
    align-items: flex-start;
  }

  .form-row-2 {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  .checkbox-group {
    padding: 12px;
  }

  .admin-layout {
    display: block;
    padding-top: 64px;
  }

  .admin-sidebar {
    position: static !important;
    transform: none !important;
    width: 100%;
    max-height: none;
    border-bottom: 1px solid rgba(192, 20, 28, 0.3);
  }

  .sidebar-logo {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 12px;
  }

  .nav-section-label {
    display: none;
  }

  .sidebar-btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    border-radius: 8px;
    padding: 9px 12px;
  }

  .sidebar-btn.active {
    border-right: none !important;
    border-bottom: 2px solid #ff6b6b !important;
  }

  .sidebar-logout {
    display: none;
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-topbar {
    top: 64px;
    height: auto;
    min-height: 48px;
    padding: 10px 16px;
    gap: 10px;
  }

  .admin-topbar h2 {
    font-size: 15px;
  }

  .admin-email-badge {
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-content {
    padding: 16px;
  }

  .stats-cards {
    grid-template-columns: 1fr 1fr;
  }

  .admin-card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 620px;
  }

  .action-buttons {
    flex-wrap: wrap;
  }

  .admin-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .deadline-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-card-body [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .admin-card-body [style*="grid-template-columns"] button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .logo-sub {
    max-width: 130px;
  }

  .hero-text h1,
  .page-hero h1 {
    font-size: 30px;
  }

  .stats-grid,
  .stats-cards {
    grid-template-columns: 1fr;
  }

  .stat + .stat {
    border-left: none;
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  .stat {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  table {
    min-width: 560px;
  }
}
  @media (max-width: 700px) {
  body:has(.login-tabs) .hero {
    min-height: auto !important;
    padding-top: 64px !important;
    align-items: flex-start !important;
  }

  body:has(.login-tabs) .hero-content {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    padding: 28px 16px 44px !important;
    gap: 22px !important;
  }

  body:has(.login-tabs) .hero-text {
    text-align: center !important;
  }

  body:has(.login-tabs) .hero-text h1 {
    font-size: 30px !important;
  }

  body:has(.login-tabs) .hero-text p {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body:has(.login-tabs) .features-grid {
    display: none !important;
  }

  body:has(.login-tabs) .hero-card {
    max-width: 100% !important;
    width: 100% !important;
    padding: 24px 16px !important;
    margin: 0 !important;
    border-radius: 14px !important;
  }

  body:has(.login-tabs) .login-tabs {
    margin-bottom: 18px !important;
  }

  body:has(.login-tabs) .tab {
    min-height: 44px !important;
    font-size: 14px !important;
  }

  body:has(.login-tabs) .form-group {
    margin-bottom: 12px !important;
  }

  body:has(.login-tabs) input {
    width: 100% !important;
    font-size: 16px !important;
  }

  body:has(.login-tabs) .input-wrap button {
    width: auto !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
}