/* Responsive Design Updates */

/* Base Responsive Adjustments */
@media (max-width: 1600px) {
  .news-section,
  .research-section,
  .departments-section {
    padding: 60px 40px;
  }
}

@media (max-width: 1400px) {
  .news-grid {
    grid-template-columns: 2.5fr 1.5fr;
  }
  
  .highlight-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .department-card {
    min-width: 320px;
    max-width: 320px;
  }
}

/* Tablet Devices (992px - 1200px) */
@media (max-width: 1200px) {
  .news-section,
  .research-section,
  .departments-section {
    padding: 50px 30px;
  }
  
  .news-grid {
    grid-template-columns: 2fr 1fr;
    gap: 25px;
  }
  
  .news-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .research-content {
    grid-template-columns: 2fr 1fr;
  }
  
  .department-card {
    min-width: 300px;
    max-width: 300px;
  }
  
  .navbar-duvasu .nav-link {
    padding: 0.4rem 0.3rem;
    font-size: 0.9rem;
  }
  
  .carousel-content {
    padding: 8px 20px;
  }
}

/* Medium Tablets (768px - 992px) */
@media (max-width: 992px) {
  /* General Adjustments */
  .news-section,
  .research-section,
  .departments-section {
    padding: 40px 25px;
  }
  
  /* Header & Navigation */
  .logo-img {
      
    height: 60px;
    margin-right: 10px;
  }
  
  .logo-img-2 {
    height: 50px;
  }
  
  .topbar {
    font-size: 12px;
  }
  
  .topbar a {
    margin-right: 10px;
  }
  
  .navbar-duvasu .navbar-nav {
    gap: 1px;
  }
  
  /* Hero Carousel */
  .hero-carousel {
    height: 50vh;
    min-height: 400px;
  }
  
  .carousel-title {
    font-size: 1.8rem;
  }
  
  .carousel-subtitle {
    font-size: 1rem;
  }
  
  /* News Section */
  .news-header h2 {
    font-size: 28px;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .news-card img {
    height: 180px;
  }
  
  .news-card h3 {
    font-size: 16px;
    padding: 12px;
  }
  
  /* Research Section */
  .research-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .research-header h2 {
    font-size: 28px;
    margin-bottom: 30px;
  }
  
  .highlight-card img {
    height: 200px;
  }
  
  /* Departments Section */
  .departments-header h2 {
    font-size: 28px;
    margin-bottom: 30px;
  }
  
  .departments-slider {
    gap: 30px;
  }
  
  .department-card {
    min-width: 280px;
    max-width: 280px;
  }
  
  .department-card img {
    height: 200px;
  }
  
  /* Footer Adjustments */
  .footer-links {
    margin-bottom: 30px;
  }
  
  .footer-links:last-child {
    margin-bottom: 0;
  }
  
  /* Profile Section */
  .profile-img {
    max-width: 200px;
    margin: 0 auto 20px;
  }
  
  .profile-title {
    font-size: 24px;
    text-align: center;
  }
  
  .profile-name {
    font-size: 18px;
    text-align: center;
  }
  
  /* Gallery */
  .main-img {
    height: 300px;
  }
  
  .thumb-img {
    height: 70px;
    width: 100px;
  }
}

/* Small Tablets & Large Phones (576px - 768px) */
@media (max-width: 768px) {
  /* General Adjustments */
  .news-section,
  .research-section,
  .departments-section {
    padding: 35px 20px;
  }
  
  /* Topbar */
  .topbar {
    padding: 8px 0;
  }
  
  .topbar .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .topbar a {
    margin-right: 10px;
    margin-left: 10px;
  }
  
  .font-controls,
  .language {
    margin-top: 5px;
  }
  
  /* Logo Area */
  .logo-area {
    flex-direction: column;
    text-align: center;
    padding: 10px 0;
  }
  
  .logo-img {
    width:100%;
    height: 50px;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .logo-img-2 {
    height: 40px;
  }
  
  /* Navigation */
  .navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
  }
  
  .navbar-duvasu .navbar-nav {
    padding: 15px 0;
  }
  
  .navbar-duvasu .nav-link {
    padding: 0.5rem 1rem;
  }
  
  /* Announcement Bar */
  .announcement-bar {
    flex-direction: column;
    text-align: center;
    font-size: 14px;
  }
  
  .announcement-label {
    width: 100%;
    padding: 8px 15px;
  }
  
  .announcement-label::after {
    display: none;
  }
  
  .marquee-wrapper {
    padding: 10px 15px 0;
    width: 100%;
  }
  
  /* Hero Carousel */
  .hero-carousel {
    width:100%;
    height: 40vh;
    min-height: 300px;
  }
  
  .carousel-title {
    font-size: 1.5rem;
  }
  
  .carousel-subtitle {
    font-size: 0.9rem;
  }
  
  .carousel-content {
    padding: 6px 15px;
  }
  
  /* News Section */
  .news-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .news-header h2 {
    font-size: 24px;
  }
  
  .news-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .news-card img {
    height: 160px;
  }
  
  .recent-card {
    min-height: 300px;
  }
  
  .recent-overlay h3 {
    font-size: 18px;
  }
  
  /* Research Section */
  .research-header h2 {
    font-size: 24px;
  }
  
  .highlight-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .highlight-card img {
    height: 180px;
  }
  
  .highlight-card h4 {
    font-size: 16px;
    padding: 12px;
  }
  
  /* Departments Section */
  .departments-header h2 {
    font-size: 24px;
  }
  
  .departments-slider {
    gap: 20px;
  }
  
  .department-card {
    min-width: 260px;
    max-width: 260px;
  }
  
  .nav-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  
  /* Quick Links */
  .quick-links-title {
    font-size: 20px;
  }
  
  .quick-link-card {
    padding: 12px 15px;
  }
  
  .quick-link-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  /* Footer */
  .footer-links h5 {
    font-size: 1rem;
  }
  
  .footer-links ul li {
    margin-bottom: 8px;
  }
  
  /* Gallery */
  .main-img {
    height: 250px;
  }
  
  .thumb-img {
    height: 60px;
    width: 85px;
    margin-bottom: 10px;
  }
  
  /* Profile */
  .profile-card {
    padding: 20px;
  }
  
  .profile-title {
    font-size: 22px;
  }
  
  .profile-name {
    font-size: 16px;
  }
  
  /* Notice Section */
  .notice-header {
    font-size: 18px;
    padding: 12px 16px;
  }
  
  .notice-list {
    padding: 12px 16px;
  }
}

/* Mobile Phones (up to 576px) */
@media (max-width: 576px) {
  /* General Adjustments */
  .news-section,
  .research-section,
  .departments-section {
    padding: 30px 15px;
  }
  
  /* Topbar */
  .topbar {
    font-size: 11px;
  }
  
  .topbar a {
    margin-right: 8px;
    margin-left: 8px;
  }
  
  /* Hero Carousel */
  .hero-carousel {
    height: 35vh;
    min-height: 250px;
  }
  
  .carousel-title {
    font-size: 1.3rem;
    line-height: 1.3;
  }
  
  .carousel-subtitle {
    font-size: 0.8rem;
    display: none; /* Hide subtitle on very small screens */
  }
  
  .carousel-content {
    padding: 5px 12px;
  }
  
  /* News Section */
  .news-header h2 {
    font-size: 22px;
  }
  
  .view-all {
    font-size: 14px;
  }
  
  .news-card h3 {
    font-size: 15px;
    padding: 10px;
  }
  
  .news-card p {
    padding: 0 10px 8px;
    font-size: 13px;
  }
  
  .news-meta {
    padding: 0 10px 10px;
    font-size: 12px;
  }
  
  /* Research Section */
  .research-header h2 {
    font-size: 22px;
    margin-bottom: 25px;
  }
  
  .section-title h3 {
    font-size: 16px;
  }
  
  .highlight-card img {
    height: 160px;
  }
  
  .highlight-card p {
    padding: 0 12px 12px;
    font-size: 13px;
  }
  
  .centre-card h4 {
    font-size: 16px;
    padding: 12px;
  }
  
  /* Departments Section */
  .departments-header h2 {
    font-size: 22px;
    margin-bottom: 25px;
  }
  
  .department-card {
    min-width: 240px;
    max-width: 240px;
  }
  
  .department-card img {
    height: 180px;
  }
  
  .department-card h3 {
    font-size: 14px;
  }
  
  .department-card p {
    font-size: 14px;
  }
  
  /* Announcement Marquee */
  .marquee-content {
    animation: marquee 15s linear infinite; /* Slower on mobile */
  }
  
  .marquee-content span {
    margin-right: 20px;
  }
  
  .marquee-content span::after {
    margin-left: 20px;
  }
  
  /* Quick Links */
  .quick-links-title {
    font-size: 18px;
  }
  
  .quick-link-card {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  /* Profile */
  .profile-card {
    padding: 15px;
  }
  
  .profile-img {
    max-width: 160px;
  }
  
  .profile-title {
    font-size: 20px;
  }
  
  /* Gallery */
  .main-img {
    height: 200px;
  }
  
  .thumb-img {
    height: 50px;
    width: 70px;
    margin-bottom: 8px;
  }
  
  /* Footer */
  .footer-links {
    margin-bottom: 25px;
  }
  
  .footer-links h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .duvasu-footer {
    padding: 30px 0 20px;
  }
  
  /* Utility Classes for Mobile */
  .text-center-mobile {
    text-align: center !important;
  }
  
  .mb-mobile-3 {
    margin-bottom: 1rem !important;
  }
  
  .px-mobile-2 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* Extra Small Devices (up to 400px) */
@media (max-width: 400px) {
  /* Hero Carousel */
  .hero-carousel {
    height: 30vh;
    min-height: 200px;
  }
  
  .carousel-title {
    font-size: 1.1rem;
  }
  
  /* Department Cards */
  .department-card {
    min-width: 220px;
    max-width: 220px;
  }
  
  .department-card img {
    height: 150px;
  }
  
  /* News Cards */
  .news-card img {
    height: 140px;
  }
  
  .news-card h3 {
    font-size: 14px;
  }
  
  /* Quick Links */
  .quick-link-card {
    flex-direction: column;
    text-align: center;
    padding: 15px 10px;
  }
  
  .quick-link-icon {
    margin-bottom: 8px;
  }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-carousel {
    height: 60vh;
  }
  
  .navbar-duvasu {
    position: static;
  }
  
  .announcement-bar {
    display: none; /* Hide announcement in landscape */
  }
}

/* Print Styles */
@media print {
  .topbar,
  .navbar-duvasu,
  .announcement-bar,
  .duvasu-footer,
  .carousel-controls,
  .nav-btn {
    display: none !important;
  }
  
  body {
    color: #000 !important;
    background: #fff !important;
  }
  
  .hero-carousel {
    height: auto !important;
    aspect-ratio: auto !important;
  }
  
  .carousel-img {
    max-height: 300px;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-blue: #0000ff;
    --dark-blue: #000080;
    --accent-gold: #ff0;
    --light-gold: #ff6;
  }
  
  .navbar-duvasu .nav-link:hover,
  .navbar-duvasu .nav-link.active {
    outline: 2px solid var(--accent-gold);
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .marquee-content {
    animation: none !important;
    white-space: normal !important;
  }
  
  .highlight-content {
    animation: none !important;
    position: relative !important;
    top: 0 !important;
  }
  
  .news-card:hover,
  .highlight-card:hover,
  .department-card:hover {
    transform: none !important;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .navbar-duvasu .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    box-shadow: none;
    margin-top: 0;
  }
  
  .nav-btn {
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
  }
  
  .quick-link-card:hover {
    transform: none;
  }
  
  .notice-list li:hover {
    background: none;
    padding-left: 0;
  }
}