/* ===================================
   Responsive CSS for College Section
   Mobile-First Approach
   =================================== */

/* Base mobile styles - Mobile First Approach */
@media (max-width: 1400px) {
  .nav-container {
    max-width: 100%;
    padding: 1rem;
  }
}

/* Laptop and smaller screens */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 20px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .facilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet Portrait and Landscape */
@media (max-width: 1024px) {
  /* Navigation adjustments */
  .nav-container {
    padding: 0.8rem 1rem;
  }

  .nav-brand-text {
    font-size: 1.1rem;
  }

  /* Hero section */
  .hero-section {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  /* About section */
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-badge-float {
    right: 30px;
  }

  /* Programs section */
  .program-card {
    margin-bottom: 2rem;
  }

  /* Faculty section */
  .faculty-slider {
    padding: 0 20px;
  }

  /* Contact section */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Social media grid */
  .social-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* Tablet Portrait */
@media (max-width: 768px) {
  /* Mobile menu styles */
  .mobile-menu-btn {
    display: block !important;
    z-index: 1001;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px 12px;
    position: relative;
    min-width: 44px;
    min-height: 44px;
    transition: all 0.3s ease;
  }

  .mobile-menu-btn:hover,
  .mobile-menu-btn:focus {
    background: var(--primary-color);
    color: var(--white);
  }

  .mobile-menu-btn i {
    display: block;
    pointer-events: none;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s;
    overflow-y: auto;
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
    margin: 10px 0;
  }

  .nav-link {
    display: block;
    padding: 10px !important;
    font-size: 1.1rem;
  }

  .nav-cta {
    width: 100%;
    display: block;
    text-align: center;
  }

  /* Hero section mobile optimization */
  .hero-section {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: 40px;
  }

  .hero-title {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    align-items: stretch;
  }

  .btn-hero {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-image {
    margin-top: 3rem;
    position: relative;
  }

  .hero-image img {
    width: 100%;
    height: auto;
  }

  .hero-stats {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: 2rem;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1rem;
    padding: 15px;
    box-shadow: var(--shadow-md);
  }

  .stat-item {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 80px;
    text-align: center;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  /* About section */
  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .about-badge-float {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 2rem;
  }

  /* Program cards */
  .program-card-header {
    padding: 20px;
  }

  .program-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .program-title {
    font-size: 1.2rem;
  }

  /* Faculty cards */
  .faculty-card {
    padding: 20px;
  }

  .faculty-image {
    width: 120px;
    height: 120px;
  }

  /* Facilities grid */
  .facilities-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .facility-card {
    height: 250px;
  }

  /* Social media section */
  .social-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .instagram-embed {
    min-height: 400px;
  }

  /* Admission steps */
  .admission-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Footer responsive */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-links ul {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Mobile Landscape */
@media (max-width: 640px) {
  .nav-brand-text {
    font-size: 1rem;
    display: none; /* Hide text on very small screens */
  }

  .nav-brand img {
    height: 40px;
  }

  /* Reduce padding on sections */
  .about-section,
  .programs-section,
  .faculty-section,
  .facilities-section,
  .social-section,
  .admissions-section,
  .contact-section {
    padding: 60px 0;
  }

  /* Form responsive */
  .contact-form {
    padding: 20px;
  }

  .form-control {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  /* Typography adjustments */
  body {
    font-size: 14px;
  }

  /* Navigation */
  .navbar-section {
    padding: 0;
  }

  .nav-container {
    padding: 0.8rem;
  }

  .nav-brand-text {
    display: block; /* Show abbreviated text */
    font-size: 0.9rem;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hero section */
  .hero-section {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 6px 15px;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .btn-hero {
    padding: 12px 25px;
    font-size: 0.9rem;
  }

  /* Section headers */
  .section-header {
    margin-bottom: 2rem;
  }

  .section-badge {
    font-size: 0.8rem;
    padding: 6px 15px;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  /* About section */
  .about-text h3 {
    font-size: 1.5rem;
  }

  .about-text p {
    font-size: 0.9rem;
  }

  .about-feature-icon {
    width: 35px;
    height: 35px;
  }

  .about-feature-text h4 {
    font-size: 0.9rem;
  }

  .about-feature-text p {
    font-size: 0.8rem;
  }

  /* Program cards */
  .program-card-body {
    padding: 20px;
  }

  .program-description {
    font-size: 0.9rem;
  }

  .program-features {
    font-size: 0.9rem;
  }

  /* Faculty section */
  .faculty-name {
    font-size: 1.1rem;
  }

  .faculty-designation {
    font-size: 0.85rem;
  }

  .faculty-qualification {
    font-size: 0.8rem;
  }

  /* Facilities */
  .facility-title {
    font-size: 1.2rem;
  }

  .facility-description {
    font-size: 0.85rem;
  }

  /* Social media */
  .social-caption h4 {
    font-size: 1rem;
  }

  .social-caption p {
    font-size: 0.85rem;
  }

  .btn-follow {
    padding: 12px 30px;
    font-size: 0.95rem;
  }

  /* Admissions */
  .admissions-title {
    font-size: 1.8rem;
  }

  .admissions-text {
    font-size: 1rem;
  }

  .admission-step {
    padding: 20px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .step-title {
    font-size: 1rem;
  }

  .step-description {
    font-size: 0.85rem;
  }

  /* Contact section */
  .contact-item {
    gap: 1rem;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .contact-text h4 {
    font-size: 1rem;
  }

  .contact-text p {
    font-size: 0.85rem;
  }

  /* Footer */
  .footer-section {
    padding: 50px 0 20px;
  }

  .footer-about h3 {
    font-size: 1.2rem;
  }

  .footer-about p {
    font-size: 0.85rem;
  }

  .footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .footer-links a {
    font-size: 0.85rem;
  }

  .footer-bottom {
    font-size: 0.8rem;
    padding-top: 1rem;
  }

  /* Utilities */
  .container {
    padding: 0 15px;
  }

  /* Fix horizontal scroll */
  body {
    overflow-x: hidden;
  }

  .row {
    margin-left: 0;
    margin-right: 0;
  }

  .col-lg-6,
  .col-lg-4,
  .col-lg-3,
  .col-md-6,
  .col-sm-12 {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Fix Bootstrap columns in hero section */
  .hero-section .col-lg-6 {
    width: 100%;
    padding: 0 15px;
  }
}

/* Small Mobile Devices */
@media (max-width: 380px) {
  .nav-brand-text {
    font-size: 0.8rem;
    max-width: 120px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-badge {
    display: block;
    margin-bottom: 0.5rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 10px;
  }

  .stat-item {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 70px;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* Reduce button sizes */
  .btn-hero,
  .program-btn,
  .admission-cta,
  .btn-submit {
    font-size: 0.85rem;
    padding: 10px 20px;
  }

  .btn-hero-secondary {
    margin-top: 0;
  }
}

/* Extra small devices */
@media (max-width: 320px) {
  .hero-title {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .nav-brand img {
    height: 35px;
  }

  /* Stack everything vertically */
  .hero-stats,
  .about-features,
  .footer-social {
    flex-direction: column;
  }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 60px 0 40px;
  }

  .nav-menu {
    height: calc(100vh - 60px);
    overflow-y: auto;
  }
}

/* Print styles */
@media print {
  .mobile-menu-btn,
  .nav-menu,
  .preloader,
  .social-section,
  .footer-social {
    display: none !important;
  }

  .hero-section {
    background: white !important;
    color: black !important;
  }
}
