/* ==========================================================================
   CCAK COMPREHENSIVE RESPONSIVE & MOBILE DESIGN
   Chishtiya College of Art, Commerce and Science, Khuldabad
   ========================================================================== */

/* Universal Container Padding Guarantee (Always 20px Left & Right) */
.container {
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box;
}

/* Tablet Landscape & Medium Desktops (<= 1100px) */
@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }
}

/* Tablet Portrait & Mobile Navigation Transition (<= 991px) */
@media (max-width: 991px) {
  /* Navigation Bar & Mobile Toggle */
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 1.5rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: var(--transition);
  }

  .mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
  }

  .nav-container {
    flex-wrap: wrap;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--primary-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 0.35rem;
    max-height: 75vh;
    overflow-y: auto;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-link {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    justify-content: space-between;
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border-top: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  .nav-item.dropdown-open > .dropdown-menu {
    display: block;
  }

  .dropdown-link {
    padding: 0.7rem 1.25rem 0.7rem 2rem;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
  }

  .dropdown-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding-left: 2.25rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
}

/* Mobile Devices & Tablets Portrait (<= 768px) */
@media (max-width: 768px) {
  /* Spacing & Sections */
  .section {
    padding: 2.25rem 0;
  }

  .section-title {
    margin-bottom: 1.75rem;
  }

  .section-title h2 {
    font-size: 1.55rem;
  }

  .section-title p {
    font-size: 0.95rem;
  }

  /* Top Bar Alignment */
  .top-bar {
    padding: 0.6rem 0;
  }

  .top-bar-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .top-bar-contact {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 0.4rem 1rem;
    font-size: 0.825rem;
  }

  .top-bar-badges {
    justify-content: center;
    gap: 0.5rem;
  }

  .top-bar-links-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  /* Header Branding */
  .header-brand-row {
    padding: 1rem 0;
    flex-direction: column;
    text-align: center;
  }

  .brand-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .college-logo {
    height: 155px;
    width: auto;
    max-width: 165px;
    margin: 0 auto;
  }

  .brand-text h1 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
  }

  .brand-text .sub-title {
    font-size: 0.85rem;
  }

  .brand-text .affiliation {
    font-size: 0.78rem;
    display: block;
    line-height: 1.4;
  }

  /* Grids & Cards */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    padding: 1.35rem;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .ticker-bar {
    padding: 0.5rem 0;
  }

  .ticker-bar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .ticker-label {
    align-self: flex-start;
  }

  .ticker-content {
    width: 100%;
  }

  /* Tables & Matrix Surveys */
  .table-responsive, .matrix-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    background: #ffffff;
  }

  .styled-table, .data-table, .matrix-table {
    min-width: 580px;
    font-size: 0.85rem;
  }

  .styled-table th, .styled-table td,
  .data-table th, .data-table td,
  .matrix-table th, .matrix-table td {
    padding: 0.65rem 0.75rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: left;
  }
}

/* Small Smartphone Devices (<= 480px) */
@media (max-width: 480px) {
  .college-logo {
    height: 150px;
    max-width: 160px;
  }

  .brand-text h1 {
    font-size: 1.15rem;
  }

  .hero-title {
    font-size: 1.45rem;
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.92rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .survey-card {
    padding: 1.15rem;
  }

  .survey-header h3 {
    font-size: 1.25rem;
  }

  .stat-bar-container {
    padding: 0.85rem;
  }

  .stat-bar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .stat-bar-score {
    align-self: flex-start;
  }

  .stat-bar-legend {
    flex-direction: column;
    gap: 0.35rem;
  }

  .filter-nav {
    flex-direction: column;
    gap: 0.4rem;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
    padding: 0.65rem;
  }
}

