/* Base styling */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  /* allow vertical scrolling */
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(to bottom, #4A1A0C, #7A2810, #B03C10);
  color: white;
}

.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

/* Panels */
.left-panel,
.right-panel {
  flex: 1;
  min-height: 100vh;
  background: linear-gradient(to bottom, #4A1A0C, #7A2810, #B03C10);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  box-sizing: border-box;
}

/* Left panel overrides */
.left-panel {
  flex-direction: column;
  align-items: start;
  padding: 60px;
}

.left-panel h2 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #FFE9E0;
}

.left-panel p {
  font-size: 1.2rem;
  margin-top: 20px;
  color: #FFD9C4;
}

/* Logo */
.logo {
  width: 140px;
}

/* Logo position */
.top-logo {
  position: absolute;
  top: 20px;
  left: 30px;
}

/* Center container */
.login-container {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Card-style form box */
.login-box {
  background-color: #7A2810;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 800px;
  margin: auto;
  text-align: center;
}

/* Input fields */
.form-control {
  border-radius: 20px;
}

/* Submit button */
.login-btn {
  background: linear-gradient(to bottom, #FF6A00, #B03C10);
  color: white;
  border: none;
  border-radius: 999px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.login-btn:hover {
  background: linear-gradient(to bottom, #FF7A1A, #C24312);
  transform: scale(1.02);
}

/* Error message under password fields */
.error-message {
  font-size: 13px;
  color: #FFD9D9;
  margin-top: 5px;
  text-align: left;
}

/* Requirement note */
.requirement-note {
  color: #FFD9C4;
  font-size: 0.85rem;
  margin-top: 5px;
  margin-left: 8px;
  display: block;
}

/* Links */
.options a {
  color: #FFE9E0;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.options a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background-color: #FF6A00;
  transition: width 0.3s ease;
}

.options a:hover {
  color: #FF6A00;
}

.options a:hover::after {
  width: 100%;
}

/* Labels */
.form-label {
  color: #FFE9E0;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

/* OTP inputs */
.otp-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.otp-input {
  width: 40px;
  height: 50px;
  text-align: center;
  font-size: 1.5rem;
  border: 1px solid #deb3a3;
  border-radius: 8px;
  background: #fff;
  color: #4A1A0C;
}

.otp-input:focus {
  outline: none;
  border-color: #FF6A00;
  box-shadow: 0 0 0 0.2rem rgba(255, 106, 0, 0.35);
}

/* Logos */
.brand {
  display: flex;
  align-items: center;
  gap: 0px;
  /* space between the two logos */
  min-width: 0;
}

.logo-header {
  height: 28px;
  /* smaller to fit both logos */
  width: auto;
}

.school-logo {
  height: 55px;
  width: auto;
  object-fit: contain;
}

/* =========================================================
   11) MODALS
   ========================================================= */
.modal-header {
  background: linear-gradient(to bottom, #4A1A0C, #7A2810, #B03C10);
  color: #fff;
  border-bottom: none;
}

.modal-header .modal-title {
  font-weight: 600;
  color: #fff;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

/* Centered modal layout (Bootstrap 5) */
.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  --bs-modal-margin: 0;
  padding: 0 !important;
}

.modal.show .modal-dialog {
  margin: 0 !important;
  max-width: 640px;
  width: calc(100% - 2rem);
}

.modal.show .modal-content {
  max-height: min(90vh, 800px);
  overflow: auto;
  border-radius: 12px;
}

/* Modal footer button */
.btn-close-footer {
  background-color: #6a737d !important;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-close-footer:hover,
.btn-close-footer:focus {
  background-color: #6a737d;
  color: #fff;
  transform: scale(1.04);
}

.modal-body {
  color: black;
}

/* Upload button */
.btn-upload {
  background: linear-gradient(to bottom, #B03C10, #7A2810);
  padding: 0.6rem 1.5rem;
  color: #fff;
  border: none;
  border-radius: 10px;
}

.btn-upload:hover {
  opacity: 0.85;
}
/* ===== Mobile refinements (≤480px) ===== */
@media (max-width: 480px) {
  /* Global */
  html, body {
    font-size: 16px;           /* readable baseline on phones */
    line-height: 1.45;
  }
  section { padding: 40px 0; } /* was 64px */

  /* Navbar / brand */
  .navbar { padding-top: .25rem; padding-bottom: .25rem; }
  .navbar .nav-link { padding: .5rem .6rem !important; font-size: .95rem; }
  .logo { height: 32px; }
  .school-logo { height: 34px; }

  /* Hero */
  .hero {
    padding: 72px 0 48px;      /* was 96/72 */
    text-align: center;
    background:
      radial-gradient(700px 360px at 10% -10%, rgba(255,255,255,.08), transparent 60%),
      radial-gradient(600px 340px at 110% 10%, rgba(255,255,255,.06), transparent 60%);
  }
  .hero h1 { font-size: 1.9rem; line-height: 1.2; }
  .hero p.lead { font-size: 1rem; margin-top: .5rem; }
  .hero-card { margin-top: 1rem; padding: 1rem; }

  /* Buttons / chips / pills */
  .btn-amber { padding: .6rem 1rem; font-size: .95rem; }
  .btn-outline-light { padding: .55rem 1rem; font-size: .95rem; }
  .chip, .pill { padding: .35rem .7rem; font-size: .9rem; }
  .pill .bi { font-size: .9rem; }

  /* Tiles & feature/portal cards */
  .tile { padding: 1rem; }
  .tile .kicker { font-size: .8rem; padding: .3rem .6rem; }
  .feature-card,
  .portal-card { padding: 1rem; text-align: center; }
  .feature-card .bi { font-size: 1.5rem; }

  /* About “modern” blobs: smaller so they don’t crowd */
  .about-modern .blob.b1 { width: 300px; height: 300px; left: -80px; top: -60px; }
  .about-modern .blob.b2 { width: 260px; height: 260px; right: -80px; bottom: -60px; }

  /* Stat badges */
  .stat-badge { padding: .8rem; }
  .stat-badge .stat { font-size: 1.1rem; }
  .stat-badge .label { font-size: .8rem; }

  /* Grids and spacing helpers */
  .row.row-center { justify-content: center; }
  .g-4 > * { margin-bottom: 1rem; } /* ensure breathing room on stacked cols */

  /* Footer */
  footer { text-align: center; }
  footer .muted, footer small { display: block; margin-top: .25rem; }
}
/* ===== Navbar toggler (dark theme) ===== */
.navbar .navbar-toggler {
  padding: .35rem .6rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.28);               /* override .text-bg-dark if present */
  color: var(--text-on-dark);
  line-height: 1;
}

.navbar .navbar-toggler:hover {
  border-color: rgba(255,255,255,.55);
  background: rgba(0,0,0,.36);
}

.navbar .navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(255,122,26,.35);  /* amber focus ring */
}

/* custom hamburger icon (Bootstrap uses this background-image) */
.navbar .navbar-toggler-icon {
  width: 1.5rem;
  height: 1.5rem;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FFE9E0' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* hover / expanded: switch lines to amber */
.navbar .navbar-toggler:hover .navbar-toggler-icon,
.navbar .navbar-toggler[aria-expanded='true'] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FF7A1A' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* optional: tighter spacing on very small screens */
@media (max-width: 480px) {
  .navbar .navbar-toggler { padding: .3rem .5rem; }
  .navbar .navbar-toggler-icon { width: 1.35rem; height: 1.35rem; }
}
/* Smooth, polished mobile open/close for the navbar */
@media (max-width: 991.98px) { /* same breakpoint as .navbar-expand-lg */

  /* Panel background (kept from earlier) */
  .navbar .navbar-collapse {
    transition:
      background-color .25s ease,
      box-shadow .25s ease,
      padding .25s ease,
      border-color .25s ease;
    will-change: opacity, transform;
  }

  .navbar .navbar-collapse.show {
    background: rgba(58, 20, 9, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    padding: .75rem 1rem;
    margin-top: .5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    z-index: 1000;
  }

  /* ✨ Smooth motion on the container itself */
  .navbar .collapsing {
    /* Bootstrap animates height; we add a subtle fade/slide */
    transition:
      height .35s ease,         /* keep Bootstrap's height transition */
      opacity .25s ease,
      transform .25s ease;
    opacity: 0;
    transform: translateY(-6px);
  }
  .navbar .collapse.show {
    opacity: 1;
    transform: translateY(0);
  }

  /* Optional: slightly ease-in links when panel opens */
  .navbar .navbar-collapse.show .nav-link,
  .navbar .navbar-collapse.show .btn {
    animation: navFadeUp .24s ease both;
  }
  .navbar .navbar-collapse.show .nav-item:nth-child(1) { animation-delay: .02s; }
  .navbar .navbar-collapse.show .nav-item:nth-child(2) { animation-delay: .05s; }
  .navbar .navbar-collapse.show .nav-item:nth-child(3) { animation-delay: .08s; }
  .navbar .navbar-collapse.show .nav-item:nth-child(4) { animation-delay: .11s; }

  @keyframes navFadeUp {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Keep link readability on the dark panel */
  .navbar .navbar-nav .nav-link {
    color: var(--text-on-dark) !important;
    padding: .5rem 0;
  }

  /* Toggler visuals while expanded */
  .navbar .navbar-toggler[aria-expanded="true"] {
    background: rgba(0,0,0,.36);
    border-color: rgba(255,255,255,.55);
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .navbar .collapsing,
  .navbar .collapse,
  .navbar .navbar-collapse,
  .navbar .navbar-collapse .nav-link,
  .navbar .navbar-collapse .btn {
    transition: none !important;
    animation: none !important;
  }
}
