/* ===== MOBILE & DESKTOP RESPONSIVE STYLES FOR YASHWANT HIGHSCHOOL KARAD ===== */

:root {
  --ink: #2a2a2a;
  --brand: #2e3192;   /* Navy */
  --accent: #b71c1c;  /* Maroon */
  --motto: #004d40;   /* Green-blue */
  --panel: rgba(255, 255, 255, 0.95);
  --primary-gradient: linear-gradient(135deg, var(--brand), #4a148c);
  --accent-gradient: linear-gradient(135deg, var(--accent), #ff1744);
}

/* Touch & Mobile Optimizations */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

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

/* CRITICAL LOGO FIX FOR PC & DESKTOP SCREENS */
.logo-rayat {
  width: 75px !important;
  height: 75px !important;
  min-width: 75px !important;
  max-width: 75px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--brand) !important;
  box-shadow: 0 4px 10px rgba(46, 49, 146, 0.2) !important;
  background: #fff !important;
  transition: transform 0.3s ease !important;
}

.logo-rayat:hover {
  transform: rotate(12deg) scale(1.05) !important;
}

.karmveer-photo {
  width: 85px !important;
  height: 85px !important;
  min-width: 85px !important;
  max-width: 85px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--brand) !important;
  box-shadow: 0 4px 10px rgba(46, 49, 146, 0.2) !important;
  background: #fff !important;
  transition: transform 0.3s ease !important;
}

.karmveer-photo:hover {
  transform: scale(1.08) !important;
}

/* Topbar Header Container */
.topbar-brand {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px;
  background: rgba(235, 245, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 4px 20px rgba(46, 49, 146, 0.12);
  width: 100%;
}

.brand-center {
  text-align: center;
  flex: 1;
  padding: 0 20px;
}

.brand-main {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 2.2rem);
  color: var(--accent);
  font-family: 'Baloo 2', cursive;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.08);
  line-height: 1.2;
}

.brand-rayat {
  margin-bottom: 4px;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  color: var(--brand);
  font-family: 'Baloo 2', cursive;
}

.brand-motto {
  margin-top: 4px;
  font-weight: 600;
  font-size: clamp(0.9rem, 1.3vw, 1.15rem);
  color: var(--motto);
  font-family: 'Baloo 2', cursive;
}

/* Navigation Bar */
nav {
  text-align: center;
  margin: 14px 0 26px;
  padding: 0 15px;
}

nav a {
  text-decoration: none;
  color: var(--brand);
  margin: 0 8px;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
  transition: all 0.3s ease;
}

nav a:hover, nav a.active-link {
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(46, 49, 146, 0.25);
}

/* Mobile Toggle Button */
.mobile-nav-toggle {
  display: none;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(46, 49, 146, 0.3);
  transition: all 0.3s ease;
  align-items: center;
  gap: 6px;
}

/* Layout Wrapper */
.home-wrapper, .about-wrapper, .facilities-wrapper, .gallery-wrapper, .achievements-wrapper, .feedback-wrapper, .contact-wrapper {
  max-width: 1200px;
  margin: 0 auto 50px;
  padding: 0 20px;
  width: 100%;
}

/* Glassmorphism Card Panel */
.card-panel {
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.06);
  padding: 35px;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .topbar-brand {
    padding: 12px 20px;
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }

  .topbar-brand {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px 15px;
  }

  .logo-rayat {
    width: 55px !important;
    height: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
  }

  .karmveer-photo {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
  }

  .brand-center {
    width: 100%;
    order: 3;
    padding: 8px 0 4px;
  }

  .mobile-nav-toggle {
    order: 2;
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    margin: 10px 0 20px;
    gap: 8px;
  }

  nav.nav-open {
    display: flex;
    animation: fadeInDown 0.3s ease forwards;
  }

  nav a {
    margin: 0;
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 1.05rem;
    border-radius: 12px;
    background: rgba(46, 49, 146, 0.05);
  }

  .main-banner-img {
    height: 240px !important;
  }

  .card-panel {
    padding: 20px 15px;
  }
}

@media (max-width: 480px) {
  .logo-rayat {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
  }

  .karmveer-photo {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
  }

  .main-banner-img {
    height: 200px !important;
  }

  .card-panel {
    padding: 16px 12px;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
