/* ============================================
   MOBILE-FIRST RESPONSIVE ENHANCEMENTS
   Professional Mobile vs Desktop Design
   ============================================ */

/* Base hero styles (apply to all sizes unless overridden) */
.hero-slider {
    height: 75vh;
    min-height: 550px;
}

.slide-content {
    max-width: 800px;
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.slide-content h6 {
    margin-bottom: 15px;
}

.slide-content p {
    font-size: 1.15rem;
    margin-bottom: 25px;
}

/* ========================================
   MOBILE STYLES (max-width: 767px)
   ======================================== */

@media (max-width: 767px) {

    /* Mobile body and spacing */
    body {
        padding-top: 70px !important;
    }

    /* Mobile header - compact and fixed */
    .branding-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 12px 0 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px);
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08) !important;
    }

    /* Compact logo area */
    .logo-area-horizontal {
        gap: 12px !important;
    }

    .logo-wrapper-horizontal {
        width: 50px !important;
        height: 50px !important;
        padding: 6px !important;
    }

    .logo-wrapper-horizontal img {
        width: 100% !important;
        height: 100% !important;
    }

    .college-name-brand {
        font-size: 1.05rem !important;
        line-height: 1.2 !important;
    }

    .branding-motto {
        font-size: 0.65rem !important;
        letter-spacing: 1.5px !important;
        margin-top: 4px !important;
    }

    /* Hide desktop navigation completely */
    .nav-strip {
        display: none !important;
    }

    .desktop-nav {
        display: none !important;
    }

    /* Hide contact info on mobile header */
    .header-actions {
        display: none !important;
    }

    /* Mobile hero - compact */
    .hero-slider {
        height: 45vh !important;
        min-height: 350px !important;
        max-height: 450px !important;
    }

    .slide-content {
        padding: 15px !important;
        text-align: center !important;
        max-width: 100% !important;
    }

    .slide-content h6 {
        font-size: 0.65rem !important;
        letter-spacing: 1.5px !important;
        margin-bottom: 8px !important;
    }

    .slide-content h2 {
        font-size: 1.6rem !important;
        line-height: 1.2 !important;
        margin-bottom: 12px !important;
    }

    .slide-content p {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Only show first slide on mobile */
    .slide:not(:first-child) {
        display: none !important;
    }

    /* Mobile sections spacing - more compact */
    section {
        padding: 35px 0 !important;
    }

    .container {
        padding: 0 12px !important;
    }

    /* Mobile typography - smaller and tighter */
    h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    h4 {
        font-size: 1.05rem !important;
    }

    p,
    li {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }

    /* Mobile buttons - full width but more compact */
    .btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        border-radius: 10px !important;
        display: block !important;
        text-align: center !important;
    }

    .btn+.btn {
        margin-top: 10px !important;
    }

    /* Mobile grids - force single column */
    .programs-grid,
    .news-grid,
    .gallery-grid,
    [style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* Mobile cards - compact with better spacing */
    .program-card,
    .news-card,
    .value-card,
    .vision-mission-card {
        width: 100% !important;
        margin-bottom: 12px !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    }

    /* Touch feedback for cards */
    .program-card:active,
    .news-card:active,
    .value-card:active {
        transform: scale(0.98) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }

    /* Mobile stats - 2x2 grid */
    .stats-section [style*="grid-template-columns"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 15px 8px !important;
    }

    .stat-number {
        font-size: 1.8rem !important;
    }

    /* Mobile footer - compact */
    footer {
        padding: 40px 0 25px !important;
        margin-top: 30px !important;
    }

    footer [style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
    }

    .footer-logo-wrapper {
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto 15px !important;
    }

    .ribm-loader .w-16 {
        width: 50px !important;
        height: 50px !important;
    }

    /* ========================================
       PUBLIC BOTTOM NAVIGATION (APP STYLE)
       ======================================== */

    .public-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        height: 75px;
        background: rgba(255, 255, 255, 0.90);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        box-shadow: 0 -10px 40px rgba(0, 32, 148, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        z-index: 9999;
        padding-bottom: env(safe-area-inset-bottom);
        align-items: stretch;
        justify-content: space-around;
        padding-top: 5px;
        border-radius: 30px 30px 0 0;
    }

    .public-bottom-nav a,
    .public-bottom-nav button {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #94a3b8;
        text-decoration: none;
        position: relative;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        -webkit-tap-highlight-color: transparent;
        background: transparent;
        border: none;
        outline: none;
        padding-top: 8px;
    }

    .public-bottom-nav i {
        font-size: 1.35rem;
        margin-bottom: 4px;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .public-bottom-nav span {
        font-size: 0.65rem;
        font-weight: 800;
        font-family: 'Mulish', sans-serif;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.8;
        transition: opacity 0.3s ease;
    }

    /* Active Indicator Dot */
    .public-bottom-nav a::after,
    .public-bottom-nav button::after {
        content: '';
        position: absolute;
        bottom: 5px;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #0ea5e9;
        opacity: 0;
        transform: scale(0);
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .public-bottom-nav .active {
        color: #002094;
    }

    .public-bottom-nav .active i {
        transform: translateY(-8px) scale(1.15);
        color: #0ea5e9;
        text-shadow: 0 10px 20px rgba(14, 165, 233, 0.4);
    }

    .public-bottom-nav .active span {
        opacity: 1;
        color: #002094;
        transform: translateY(2px);
    }

    .public-bottom-nav .active::after {
        opacity: 1;
        transform: scale(1);
    }

    /* Keep the center action button (e.g. Apply) */
    .public-bottom-nav .special {
        flex: 0 0 auto;
        margin: 0 10px;
        padding-top: 0;
    }

    .public-bottom-nav .special::after {
        display: none;
    }

    .public-bottom-nav .special .fab-btn {
        position: relative;
        top: -30px;
        background: linear-gradient(135deg, #002094, #0ea5e9);
        color: white;
        width: 65px;
        height: 65px;
        border-radius: 50%;
        box-shadow: 0 10px 30px rgba(0, 32, 148, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        border: 4px solid white;
    }

    .public-bottom-nav .special:active .fab-btn {
        transform: scale(0.9) top(-30px);
    }

    .public-bottom-nav .special i {
        margin-bottom: 0;
        font-size: 1.5rem;
        color: white;
    }

    .public-bottom-nav .special span {
        position: absolute;
        bottom: -20px;
        color: #002094;
        opacity: 1;
    }

    /* Adjust "Back to Top" button to accommodate bottom nav */
    #backToTop {
        bottom: 100px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        z-index: 9998;
    }

    /* Mobile menu overlay adjustments */

    /* Section titles mobile */
    .section-title {
        margin-bottom: 25px !important;
    }

    .section-title h2 {
        font-size: 1.6rem !important;
    }

    .section-title h6 {
        font-size: 0.7rem !important;
    }
}

/* Extra small mobile (< 375px) */
@media (max-width: 374px) {
    body {
        padding-top: 60px !important;
    }

    .branding-header {
        padding: 8px 0 !important;
    }

    .college-name-brand {
        font-size: 0.85rem !important;
    }

    .branding-motto {
        display: none !important;
    }

    .hero-slider {
        height: 40vh !important;
        min-height: 320px !important;
    }

    .slide-content h2 {
        font-size: 1.4rem !important;
    }

    section {
        padding: 30px 0 !important;
    }

    .container {
        padding: 0 10px !important;
    }
}

/* ========================================
   DESKTOP STYLES (min-width: 1024px)
   ======================================== */

@media (min-width: 1024px) {

    /* Hide mobile bottom nav completely */
    .bottom-nav {
        display: none !important;
    }

    /* Show desktop navigation */
    .nav-strip {
        display: block !important;
    }

    /* Desktop body spacing */
    body {
        padding-bottom: 0 !important;
    }

    /* Desktop hero - full height */
    .hero-slider {
        height: 75vh !important;
        min-height: 550px !important;
    }

    .slide-content {
        max-width: 800px !important;
        text-align: left !important;
    }

    .slide-content h2 {
        font-size: 3rem !important;
        letter-spacing: 0.5px !important;
    }

    .slide-content p {
        font-size: 1.15rem !important;
        max-width: 650px !important;
    }

    /* Desktop sections - moderate spacing */
    section {
        padding: 70px 0 !important;
    }

    /* Desktop typography - moderate sizes */
    h1 {
        font-size: 3rem !important;
    }

    h2 {
        font-size: 2.5rem !important;
    }

    h3 {
        font-size: 1.8rem !important;
    }

    /* Desktop buttons - natural width */
    .btn {
        width: auto !important;
        display: inline-flex !important;
        padding: 14px 32px !important;
    }

    /* Desktop hover effects */
    .program-card,
    .news-card {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .program-card:hover,
    .news-card:hover {
        transform: translateY(-10px) scale(1.01) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
    }

    .program-card:hover img,
    .news-card:hover img {
        transform: scale(1.08) !important;
    }

    /* Desktop grids - 3 columns */
    .programs-grid,
    .news-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
    }

    /* Desktop stats - 4 columns */
    .stats-section [style*="grid-template-columns"] {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 30px !important;
    }

    /* Parallax effect for hero */
    .slide img {
        animation: kenBurns 20s ease-in-out infinite !important;
    }

    @keyframes kenBurns {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.08) translateX(15px);
        }

        100% {
            transform: scale(1);
        }
    }
}

/* ========================================
   TABLET STYLES (768px - 1023px)
   ======================================== */

@media (min-width: 768px) and (max-width: 1023px) {

    /* Hybrid navigation - show simplified top nav */
    .bottom-nav {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }

    /* Tablet hero - medium height */
    .hero-slider {
        height: 60vh !important;
        min-height: 450px !important;
    }

    /* Tablet grids - 2 columns */
    .programs-grid,
    .news-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }

    /* Tablet stats - 2x2 */
    .stats-section [style*="grid-template-columns"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    /* Tablet sections */
    section {
        padding: 60px 0 !important;
    }

    /* Tablet typography */
    h2 {
        font-size: 2.2rem !important;
    }

    .slide-content h2 {
        font-size: 2.5rem !important;
    }
}