/*
 =====================================================================
  BVWS Thanisandra — Responsive Fixes
  Covers: Mobile (≤576px), Small tablet (577–767px),
          Tablet (768–991px), Large tablet (992–1199px), Desktop+
 =====================================================================
*/

/* ─── 1. Global / Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

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

/* ─── 2. Header Top Bar ─────────────────────────────────────────── */
.header-top-section-3 {
  padding: 8px 0;
}

.header-top-wrapper.style-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.header-top-wrapper.style-2 .contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.header-top-wrapper.style-2 .contact-list li {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-top-wrapper.style-2 .social-icon {
  gap: 10px;
}

/* Hide top bar on very small screens — nav takes priority */
@media (max-width: 575px) {
  .header-top-section-3 {
    display: none;
  }
}

/* ─── 3. Main Header ─────────────────────────────────────────────── */
.header-3 .header-main.style-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

/* Ensure logo never shrinks too small */
.header-3 .logo img {
  max-width: 80px !important;
  width: 80px !important;
}

/* Author icon phone — hide on small tablets & below */
@media (max-width: 991px) {
  .header-3 .author-icon {
    display: none !important;
  }
}

/* CTA button in header — hide on mobile */
@media (max-width: 767px) {
  .header-3 .header-button {
    display: none !important;
  }
}

/* ─── 4. Mobile Menu Hamburger ───────────────────────────────────── */
.header__hamburger {
  cursor: pointer;
  padding: 4px 8px;
}

/* ─── 5. Offcanvas / Sidebar ─────────────────────────────────────── */
.offcanvas__info {
  max-width: 320px;
  width: 100%;
}

.offcanvas__contact ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.offcanvas__contact ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.offcanvas__contact .social-icon {
  margin-top: 16px;
  gap: 12px;
}

/* ─── 6. Hero / Slider Section ───────────────────────────────────── */
.hero-section.hero-3 {
  position: relative;
  overflow: hidden;
}

/* Hero slide content */
.hero-section .slider-content {
  padding: 60px 20px;
}

.hero-section h1 {
  line-height: 1.2;
}

/* Desktop hero */
@media (min-width: 1200px) {
  .hero-section h1 {
    font-size: 58px;
  }
}

/* Large tablet */
@media (max-width: 1199px) {
  .hero-section h1 {
    font-size: 46px;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .hero-section h1 {
    font-size: 38px;
  }
  .hero-section .slider-content {
    padding: 50px 16px;
  }
}

/* Mobile landscape */
@media (max-width: 767px) {
  .hero-section h1 {
    font-size: 30px;
  }
  .hero-section p {
    font-size: 15px;
  }
  .hero-section .slider-content {
    padding: 40px 16px;
    text-align: center;
  }
}

/* Mobile portrait */
@media (max-width: 575px) {
  .hero-section h1 {
    font-size: 24px;
    line-height: 1.25;
  }
  .hero-section p {
    font-size: 14px;
  }
  .hero-section .slider-content {
    padding: 30px 12px;
  }
  .hero-section .theme-btn {
    padding: 14px 22px;
    font-size: 13px;
  }
}

/* ─── 7. Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb-wrapper {
  padding: 60px 0;
  min-height: 180px;
  display: flex;
  align-items: center;
}

.page-heading h1 {
  color: #fff;
  font-size: 40px;
}

@media (max-width: 767px) {
  .breadcrumb-wrapper {
    padding: 50px 0;
    min-height: 150px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
}

@media (max-width: 575px) {
  .breadcrumb-wrapper {
    padding: 40px 0;
    min-height: 130px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .breadcrumb-items {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
  }
}

/* ─── 8. Section Padding ─────────────────────────────────────────── */
.section-padding {
  padding-top: 60px;
  padding-bottom: 60px;
}

@media (max-width: 991px) {
  .section-padding {
    padding-top: 50px;
    padding-bottom: 50px;
  }
}

@media (max-width: 767px) {
  .section-padding {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

@media (max-width: 575px) {
  .section-padding {
    padding-top: 30px;
    padding-bottom: 30px;
  }
}

/* ─── 9. Section Title ───────────────────────────────────────────── */
.section-title h2 {
  font-size: 34px;
  line-height: 1.2;
}

@media (max-width: 991px) {
  .section-title h2 {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  .section-title h2 {
    font-size: 24px;
  }
}

@media (max-width: 575px) {
  .section-title h2 {
    font-size: 20px;
  }
  .section-title p {
    font-size: 14px;
  }
}

/* ─── 10. About Section (about.php, index.php) ───────────────────── */
.about-section-2 .about-wrapper-2 {
  width: 100%;
}

/* Stack image on top on small screens */
@media (max-width: 767px) {
  .about-section-2 .about-wrapper-2 .row {
    flex-direction: column;
  }
  .about-section-2 img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }
}

/* ─── 11. Team Details (management-speak, principal-speak) ──────── */
.team-details-wrapper .team-author-items {
  flex-wrap: wrap;
  gap: 20px;
}

.team-details-wrapper .team-author-items .thumb {
  max-width: 100%;
}

.team-details-wrapper .team-author-items .thumb img {
  width: 100%;
  border-radius: 10px;
}

.team-details-wrapper .team-author-items .content {
  max-width: 100%;
  width: 100%;
}

@media (max-width: 767px) {
  .team-details-wrapper .team-author-items {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
  }
  .team-details-wrapper .team-author-items .thumb {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* ─── 12. Contact Page ───────────────────────────────────────────── */
/* Info cards row */
@media (max-width: 767px) {
  .contact-info-card {
    margin-bottom: 16px;
    height: auto !important;
  }
}

/* Contact form layout */
.contact-section .form-clt {
  margin-bottom: 16px;
}

.contact-section .form-clt input,
.contact-section .form-clt textarea,
.contact-section .form-clt select {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 575px) {
  .contact-content h2 {
    font-size: 22px !important;
  }
  .contact-section iframe {
    height: 260px;
  }
}

/* ─── 13. Admission Page ─────────────────────────────────────────── */
.admission-section .form-clt {
  margin-bottom: 14px;
}

.admission-section .form-clt input,
.admission-section .form-clt select,
.admission-section .form-clt textarea {
  width: 100%;
}

@media (max-width: 575px) {
  /* FAQ section */
  .faq-section .accordion-button {
    font-size: 14px;
    padding: 12px 14px;
  }
}

/* ─── 14. Gallery Page ───────────────────────────────────────────── */
.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

@media (max-width: 575px) {
  .gallery img {
    height: 180px;
  }
}

/* ─── 15. Events Page ────────────────────────────────────────────── */
.event-box-items {
  margin-bottom: 24px;
}

.event-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ─── 16. Features / Why Choose Us (index.php) ───────────────────── */
@media (max-width: 767px) {
  .feature-items {
    text-align: center;
    margin-bottom: 24px;
  }
}

/* ─── 17. Program Box Items (index.php) ──────────────────────────── */
@media (max-width: 575px) {
  .program-box-items {
    margin-bottom: 20px;
  }
}

/* ─── 18. Counter / Stats ────────────────────────────────────────── */
@media (max-width: 767px) {
  .counter-section .counter-items {
    text-align: center;
    margin-bottom: 20px;
  }
}

/* ─── 19. Testimonials ───────────────────────────────────────────── */
.testimonial-items {
  padding: 40px 30px;
}

@media (max-width: 767px) {
  .testimonial-items {
    padding: 30px 20px;
    max-width: 100%;
  }
}

@media (max-width: 575px) {
  .testimonial-items {
    padding: 24px 16px;
  }
  .testimonial-items .testimonial-content p {
    font-size: 14px;
  }
}

/* ─── 20. Footer ─────────────────────────────────────────────────── */
.footer-section {
  overflow: hidden;
}

.footer-widgets-wrapper {
  padding: 60px 0 30px;
}

@media (max-width: 991px) {
  .footer-widgets-wrapper {
    padding: 40px 0 20px;
  }
}

.single-footer-widget {
  margin-bottom: 30px;
}

/* Quick links list spacing */
.single-footer-widget .list-area li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.single-footer-widget .list-area li a {
  color: inherit;
  transition: color 0.3s;
}

.single-footer-widget .list-area li a:hover {
  color: var(--theme);
}

/* Footer map iframe */
.single-footer-widget iframe {
  width: 100% !important;
  height: 200px !important;
  border-radius: 10px;
}

/* Footer bottom copyright */
.footer-bottom .footer-wrapper {
  flex-wrap: wrap;
  text-align: center;
  padding: 14px 0;
  gap: 8px;
}

.footer-bottom .footer-wrapper p {
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 575px) {
  .footer-bottom .footer-wrapper p {
    font-size: 12px;
  }
  .footer-widgets-wrapper {
    padding: 30px 0 10px;
  }
}

/* Social icons row in footer */
.footer-content.style-two .social-icon {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ─── 21. WhatsApp Widget ────────────────────────────────────────── */
/* Push it above scroll-to-top button area */
.whatsapp-chat {
  bottom: 70px;
  left: 12px;
  z-index: 999;
}

@media (max-width: 575px) {
  .whatsapp-chat {
    bottom: 60px;
    left: 8px;
  }
  /* Shrink text label on very small screens */
  .whatsapp-chat a {
    font-size: 13px;
    padding: 10px 12px;
  }
}

/* WhatsApp popup panel */
.whatsapp-chat-details {
  left: 8px;
  bottom: 130px;
  max-width: calc(100vw - 20px);
}

@media (max-width: 575px) {
  .whatsapp-chat-details {
    bottom: 115px;
  }
}

/* ─── 22. Scroll-Up Button ───────────────────────────────────────── */
#scrollUp {
  bottom: 20px;
  right: 16px;
}

/* ─── 23. Mandatory Public Disclosure ───────────────────────────── */
.disclosure-section {
  width: 100%;
  overflow-x: auto;
}

.doc-item {
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 575px) {
  .doc-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .doc-action {
    width: 100%;
  }
  .doc-action .btn,
  .doc-action .theme-btn {
    width: 100%;
    display: block;
    text-align: center;
  }
}

/* ─── 24. Row gap fixes (Bootstrap doesn't always cover these) ───── */
@media (max-width: 575px) {
  .row {
    --bs-gutter-x: 16px;
  }
  .px-5 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ─── 25. Admission page: hero CTA row ──────────────────────────── */
@media (max-width: 575px) {
  .hero-section .d-flex.gap-3 {
    flex-direction: column;
    align-items: center;
    gap: 12px !important;
  }
}

/* ─── 26. Co-Curricular Activity images ─────────────────────────── */
.about-section-2 img.rounded-3 {
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media (max-width: 767px) {
  /* Force section image order — image below text on mobile */
  .about-section-2 .order-lg-2 {
    order: 0 !important;
  }
}

/* ─── 27. Map iframes (contact page) ────────────────────────────── */
.contact-section iframe {
  width: 100% !important;
  height: 350px;
  border-radius: 12px;
}

@media (max-width: 767px) {
  .contact-section iframe {
    height: 260px;
  }
}

@media (max-width: 575px) {
  .contact-section iframe {
    height: 220px;
  }
}

/* ─── 28. Table layout — mandatory disclosure ────────────────────── */
@media (max-width: 575px) {
  .contact-wrapper-2 .row.px-5 {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* ─── 29. Swiper testimonial on mobile ──────────────────────────── */
@media (max-width: 575px) {
  .testimonial-slider .swiper-slide {
    display: flex;
    justify-content: center;
  }
}

/* ─── 30. Section title margin fix (too much space on mobile) ────── */
@media (max-width: 767px) {
  .section-title {
    margin-bottom: 20px !important;
  }
  .pb-5 {
    padding-bottom: 24px !important;
  }
  .pt-5 {
    padding-top: 24px !important;
  }
}

@media (max-width: 575px) {
  .section-title {
    margin-bottom: 14px !important;
  }
  .mb-5 {
    margin-bottom: 20px !important;
  }
  .mt-5 {
    margin-top: 20px !important;
  }
}

/* ─── 31. Contact info card font sizes on small screens ─────────── */
@media (max-width: 575px) {
  .contact-info-card p a {
    font-size: 14px !important;
  }
  .contact-info-card h4 {
    font-size: 16px !important;
  }
}

/* ─── 32. Team thumb (management speak) max-width fix ───────────── */
@media (max-width: 991px) {
  .team-details-wrapper .team-author-items .thumb {
    max-width: 280px;
    width: 100%;
    margin: 0 auto;
  }
}

/* ─── 33. Footer social icons alignment ──────────────────────────── */
.social-icon {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── 34. Header-top contact list — hide middle item on tablet ───── */
@media (max-width: 767px) {
  .header-top-wrapper.style-2 .contact-list li:last-child {
    display: none;
  }
}

/* ─── 35. Ensure forms don't overflow on tiny screens ───────────── */
input, textarea, select {
  max-width: 100%;
}

/* ─── 36. Prevent absolute/decorative shapes from causing overflow  */
.breadcrumb-wrapper .line-shape,
.breadcrumb-wrapper .plane-shape,
.breadcrumb-wrapper .frame-shape {
  pointer-events: none;
  overflow: hidden;
}

@media (max-width: 767px) {
  .breadcrumb-wrapper .line-shape,
  .breadcrumb-wrapper .plane-shape,
  .breadcrumb-wrapper .frame-shape {
    display: none;
  }
}

/* ─── 37. Single footer widget — widget-head spacing ───────────── */
.single-footer-widget .widget-head {
  margin-bottom: 18px;
}

.single-footer-widget .widget-head h3 {
  font-size: 18px;
  color: #fff;
}

/* ─── 38. Footer contact list colors ─────────────────────────────── */
.single-footer-widget .list-area li,
.single-footer-widget .list-area li a {
  color: rgba(255,255,255,0.85);
  word-break: break-word;
}

.single-footer-widget .list-area li i {
  color: var(--theme);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ─── 39. gallery col gap on mobile ─────────────────────────────── */
@media (max-width: 575px) {
  .gallery.wow {
    margin-bottom: 14px;
  }
}

/* ─── 40. mean menu (mobile nav) overlap fix ─────────────────────── */
.mean-container .mean-nav {
  overflow-y: auto;
  max-height: 70vh;
}

/* ─── 41. Fix container padding on very small screens ───────────── */
@media (max-width: 360px) {
  .container,
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
}
