
/* ===== MOBILE RESPONSIVE STYLES ===== */


@media (max-width: 768px) {
  .features {
    flex-direction: column;
    gap: 1rem;
  }
  .stat-box {
    width: 90%;
  }
  .carousel-container {
    width: 100%;
  }
}
@media (max-width: 992px) {
  /* Base Layout Fixes */
  body {
    overflow-x: hidden;
    width: 100%;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* Header & Navigation */
  header {
    padding: 0.5rem 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background-color: #000151;
    transition: background-color 0.3s ease;
    border-bottom: 3px solid white;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
  }

  body.nav-open header {
    background-color: transparent;
    box-shadow: none;
    border-bottom: none;
  }

  /* CONTACT PAGE */

  .container {
  flex-direction: column;
  padding: 1rem;
}

.contact .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.query form {
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  font-size: 1em;
}

button {
  padding: 10px 20px;
  font-size: 1em;
  margin-top: 0.2em;
  width: 100%;
}

/* Adjust map height */
#map iframe {
  height: 300px;
  width: 100%;
}

/* Heading underline shouldn't exceed screen width */
.highlight_heading::after {
  width: 100%;
}

  .brand {
    display: flex;
    align-items: center;
    gap: 0.6em; /* Increased gap for larger elements */
    z-index: 1002;
    min-height: 60px; /* Ensure container is tall enough */
  }

  /* Override all conflicting image styles */
  .brand a, 
  .brand a img {
    display: block !important;
    width: 110px !important; /* Force larger size */
    height: auto !important;
    max-width: none !important;
    min-width: 110px !important; /* Prevent shrinking */
  }

  /* Increase text sizes with important */
  .logo {
    min-width: max-content; /* Prevent text wrapping */
  }

  .logo::before {
    margin: 1px 0 0 0;
    content: "Gorkha Model" !important;
    display: block !important;
    color: white !important;
    font-family: var(--font1) !important;
    /* font-size: 1.6rem !important Nuclear used at last */
    font-weight: bold !important;
    line-height: 1.2 !important;
  }

  .logo::after {
    content: "Sec. School, Lamahi" !important;
    display: block !important;
    color: white !important;
    font-family: var(--font1) !important;
    /*font-size: 1rem !important;  Nuclear used at last */
    font-weight: 500 !important;
    line-height: 1.2 !important;
  }


  /* Hamburger Menu */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1002;
    position: relative;
  }

  .hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Navigation Menu */
  nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: #000151;
    padding: 80px 1rem 1rem;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  nav.show {
    left: 0;
  }

  nav a {
    color: white;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    font-size: 1.1rem;
  }

  /* Hero Section */
  .hero {
    margin-top: 90px;
    line-height: 20px;
    margin-bottom: 0px;
  }

  .hero-container{
    margin: 0px 0 10px 0;

  }

  .hero h1 {
    flex-direction: column;
    font-size: 1.5rem;
    text-align: center;
  }

  #first_quote {
    white-space: normal;
    font-size: 1.3rem;
  }

  .flip-text {
    font-size: 1.3rem;
  }

  /* Keyword Container */
  .keyword-container {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 1rem;
  }

  .keyword {
    font-size: 1.5rem;
    text-align: center;
    word-break: break-word;
  }

  /* Layout Sections */
  .layout, 
  .layout_message,
  .layout_team {
    flex-direction: column;
    padding: 1rem;
    margin: 0.5rem;
    gap: 1.5rem;
  }

  .layout_message {
    grid-template-columns: 1fr;
  }

  .layout_team {
    grid-template-columns: 1fr;
  }

  .circle-wrapper {
    margin: 0 auto;
  }

  /* Cards & Grids */
  .grid_section {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .card {
    font-size: 1rem;
  }

  /* Buttons */
  .apply {
    flex-direction: column;
    gap: 0.2rem;
  }

  /* Contact Page */
  .contact .container {
    flex-direction: column;
    margin: 0 1rem;
  }

  .query {
    max-width: 100%;
  }
}

/* Smaller Devices (≤480px) */
@media (max-width: 480px) {
  .brand a img {
    width: 60px !important; /* Slightly smaller for smallest screens */
  }

  .logo::before {
    font-size: 1.3rem !important;
  }

  .logo::after {
    font-size: 1rem !important;
  }
}

html body header .brand .logo::before {
  font-size: 1.3rem !important;
}

html body header .brand .logo::after {
  font-size: 0.9rem !important;
}