/* Responsive Fixes for 100% Zoom and Large Screens */

/* Root font size scaling */
html {
  font-size: 14px;
}

@media (min-width: 576px) {
  html { font-size: 15px; }
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

@media (min-width: 1200px) {
  html { font-size: 16px; }
}

@media (min-width: 1400px) {
  html { font-size: 16px; }
}

/* Container max-width fixes */
.container {
  max-width: 1400px !important;
}

.container-fluid {
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* Navigation fixes */
.navbar .container {
  max-width: 1200px;
}

/* Header contact info responsive */
@media (min-width: 1200px) {
  .header-contact-info .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (min-width: 1400px) {
  .header-contact-info {
    padding: 0 2rem;
  }
  
  .header-contact-info .col-md-4 {
    padding: 0 1rem;
  }
}

/* Card layouts */
.card-deck .card {
  margin-bottom: 1rem;
}

@media (min-width: 1200px) {
  .card-deck {
    display: flex;
    flex-flow: row wrap;
    margin-right: -15px;
    margin-left: -15px;
  }
  
  .card-deck .card {
    flex: 1 0 0%;
    margin-right: 15px;
    margin-left: 15px;
    margin-bottom: 0;
  }
}

/* Carousel fixes */
.carousel-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Teacher/Topper carousel responsive */
.teacher-card,
.topper-card {
  padding: 0.5rem;
}

@media (min-width: 1400px) {
  .teacher-card,
  .topper-card {
    padding: 0.75rem;
  }
}

/* Grid system fixes */
.row {
  margin-right: -15px;
  margin-left: -15px;
}

/* Text overflow fixes */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Image responsive fixes */
img {
  max-width: 100%;
  height: auto;
}

/* Table responsive */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Admin panel fixes */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Modal fixes */
.modal-dialog {
  max-width: 90vw;
  margin: 1.75rem auto;
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px;
  }
}

@media (min-width: 992px) {
  .modal-dialog {
    max-width: 800px;
  }
}

/* Form fixes */
.form-control {
  width: 100%;
  box-sizing: border-box;
}

/* Button fixes */
.btn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Font size controls */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-size: clamp(1.5rem, 4vw, 3rem) !important;
}

h1 { font-size: clamp(1.5rem, 3vw, 2.5rem) !important; }
h2 { font-size: clamp(1.3rem, 2.5vw, 2rem) !important; }
h3 { font-size: clamp(1.2rem, 2vw, 1.75rem) !important; }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.5rem) !important; }
h5 { font-size: clamp(1rem, 1.2vw, 1.25rem) !important; }
h6 { font-size: clamp(0.9rem, 1vw, 1rem) !important; }

.lead {
  font-size: clamp(1rem, 1.5vw, 1.25rem) !important;
}

.small, small {
  font-size: clamp(0.75rem, 1vw, 0.875rem) !important;
}

/* Button font sizes */
.btn {
  font-size: clamp(0.8rem, 1vw, 1rem) !important;
}

.btn-lg {
  font-size: clamp(1rem, 1.2vw, 1.25rem) !important;
}

.btn-sm {
  font-size: clamp(0.7rem, 0.8vw, 0.875rem) !important;
}

/* Navigation font sizes */
.navbar-nav .nav-link {
  font-size: clamp(0.9rem, 1vw, 1rem) !important;
}

/* Card text */
.card-title {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem) !important;
}

.card-text {
  font-size: clamp(0.9rem, 1vw, 1rem) !important;
}

/* Utility classes */
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }