/* ============================================
   MOBILE ENHANCEMENTS & OPTIMIZATIONS
   Additional mobile-specific improvements
   ============================================ */

/* Improved Touch Targets for Mobile */
@media (max-width: 768px) {

    /* Minimum touch target size of 44x44px (Apple HIG) */
    .btn,
    .nav__link,
    .dropdown-item,
    .mobile-sidebar__link,
    .notification-btn,
    button {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }

    /* Larger tap areas for important CTAs */
    .btn--primary,
    .btn--hero-white {
        min-height: 50px;
        font-size: 16px;
        padding: 14px 28px;
    }

    /* Improved spacing for mobile readability */
    .section {
        padding: 40px 0;
    }

    .section__title {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .section__description {
        font-size: 15px;
        line-height: 1.6;
    }

    /* Better card spacing on mobile */
    .program-card,
    .news-card,
    .faculty-card {
        margin-bottom: 16px;
    }

    /* Optimize images for mobile */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Mobile-friendly forms */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 12px;
        width: 100%;
    }

    /* Improved mobile navigation */
    .navbar-brand {
        padding: 8px 0;
    }

    .nav__logo-img {
        width: 40px;
        height: 40px;
    }

    .nav__logo-name {
        font-size: 18px;
    }

    .nav__logo-tagline {
        font-size: 10px;
    }

    /* Hero section mobile optimization */
    .hero__title {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero__description {
        font-size: 16px;
        line-height: 1.5;
    }

    .hero__buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero__buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Stats section mobile */
    .hero__stats {
        gap: 20px;
    }

    .hero__stat {
        flex: 1;
        min-width: 80px;
    }

    .hero__stat-number {
        font-size: 28px;
    }

    .hero__stat-label {
        font-size: 12px;
    }

    /* Mobile-optimized tables */
    table {
        display: block;
        overflow-x: auto;
        /* Removed -webkit-overflow-scrolling: touch; - not widely supported */
    }

    /* Better mobile footer */
    .footer {
        text-align: center;
    }

    .footer__wrapper {
        text-align: center;
    }

    .footer__links {
        margin-top: 30px;
    }

    /* Notification button mobile positioning */
    .notification-btn {
        bottom: 80px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    .notification-badge {
        top: -4px;
        right: -4px;
        min-width: 20px;
        height: 20px;
        font-size: 11px;
    }

    /* Back to top button */
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    /* Mobile sidebar improvements */
    .mobile-sidebar {
        width: 85%;
        max-width: 320px;
    }

    .mobile-sidebar__link {
        padding: 14px 20px;
        font-size: 16px;
    }

    /* Dropdown menu mobile */
    .dropdown-menu {
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .dropdown-item {
        padding: 12px 20px;
        font-size: 15px;
    }

    /* Program cards mobile */
    .program-card {
        padding: 24px;
    }

    .program-card__icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .program-card__title {
        font-size: 20px;
        margin-top: 16px;
    }

    /* News cards mobile */
    .news-card {
        margin-bottom: 24px;
    }

    .news-card__title {
        font-size: 18px;
    }

    .news-card__excerpt {
        font-size: 14px;
        line-height: 1.6;
    }

    /* Faculty cards mobile */
    .faculty-card {
        margin-bottom: 24px;
        max-width: 340px;
        /* Little shorter horizontally */
        margin-left: auto;
        margin-right: auto;
    }

    .faculty-card__image {
        height: 200px;
        /* Reduced height to show shoulders better */
    }

    .faculty-card__name {
        font-size: 18px;
    }

    .faculty-card__designation {
        font-size: 14px;
    }

    /* Page header mobile */
    .page-header {
        padding: 80px 0 60px;
    }

    .page-header__title {
        font-size: 32px;
    }

    .page-header__description {
        font-size: 16px;
    }

    /* Breadcrumb mobile */
    .breadcrumb {
        font-size: 13px;
        padding: 8px 0;
    }

    /* Modal/Popup mobile */
    .notification-popup {
        width: 90%;
        max-width: 400px;
        max-height: 80vh;
    }

    .notification-item {
        padding: 16px;
    }

    .notification-item__title {
        font-size: 16px;
    }

    .notification-item__text {
        font-size: 14px;
    }
}

/* Extra small devices (phones in portrait, less than 576px) */
@media (max-width: 575px) {
    .hero__title {
        font-size: 28px;
    }

    .section__title {
        font-size: 24px;
    }

    .program-card,
    .news-card,
    .faculty-card {
        padding: 20px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    /* Stack stats vertically on very small screens */
    .hero__stats {
        flex-direction: column;
        gap: 16px;
    }

    .hero__stat {
        width: 100%;
    }
}

/* Landscape orientation optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 0;
        padding: 60px 0;
    }

    .mobile-sidebar {
        width: 50%;
        max-width: 400px;
    }

    .notification-popup {
        max-height: 90vh;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (if implemented in future) */
@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode styles */
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .btn,
    .nav__link,
    .dropdown-item {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {

    .header,
    .footer,
    .notification-btn,
    .back-to-top,
    .mobile-sidebar,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}