/* Welcome Page Perfect Screen Fit - Web and Mobile Responsiveness */

/* Enhanced Hero Section for Perfect Screen Fit */
@media (max-width: 640px) {
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .hero-bg {
        padding-top: 70px !important;
        padding-bottom: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: calc(var(--vh, 1vh) * 100) !important;
        min-height: 100vh !important;
        min-height: calc(var(--vh, 1vh) * 100) !important;
        max-height: 100vh !important;
        max-height: calc(var(--vh, 1vh) * 100) !important;
        background-attachment: scroll !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        position: relative !important;
    }
    
    .hero-bg::before {
        background-attachment: scroll !important;
        background-position: center center !important;
        background-size: cover !important;
        opacity: 0.25 !important;
        transform: none !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .hero-content {
        padding: 1.5rem 1rem !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        height: calc(100vh - 140px) !important;
        height: calc(var(--vh, 1vh) * 100 - 140px) !important;
        min-height: calc(100vh - 140px) !important;
        min-height: calc(var(--vh, 1vh) * 100 - 140px) !important;
        max-height: calc(100vh - 140px) !important;
        max-height: calc(var(--vh, 1vh) * 100 - 140px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    /* Perfect text sizing for mobile screens */
    .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 1.5rem !important;
        word-break: break-word;
        hyphens: auto;
        text-align: center;
        width: 100%;
    }
    
    .hero-content h1 span {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .hero-content p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 2rem !important;
        padding: 0 0.5rem;
        word-break: break-word;
        hyphens: auto;
        text-align: center;
        width: 100%;
    }
    
    .hero-content .flex {
        margin-top: 1rem;
        justify-content: center;
        width: 100%;
    }
    
    .hero-content .btn-primary {
        font-size: 0.875rem;
        padding: 0.75rem 1.5rem;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}

/* Extra small screens - Perfect fit */
@media (max-width: 480px) {
    .hero-bg {
        padding-top: 60px !important;
        padding-bottom: 0 !important;
        min-height: 100vh !important;
        min-height: calc(var(--vh, 1vh) * 100) !important;
    }
    
    .hero-bg::before {
        opacity: 0.2 !important;
        background-position: center 30% !important;
    }
    
    .hero-content {
        padding: 1rem 0.75rem !important;
        min-height: calc(100vh - 120px) !important;
        min-height: calc(var(--vh, 1vh) * 100 - 120px) !important;
    }
    
    .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-content p {
        font-size: 0.8125rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1.5rem !important;
        padding: 0 0.25rem;
    }
    
    .hero-content .btn-primary {
        font-size: 0.8125rem;
        padding: 0.625rem 1.25rem;
    }
}

/* Very small screens - Ultra compact fit */
@media (max-width: 360px) {
    .hero-bg {
        padding-top: 50px !important;
        min-height: 100vh !important;
        min-height: calc(var(--vh, 1vh) * 100) !important;
    }
    
    .hero-bg::before {
        opacity: 0.15 !important;
        background-position: center 25% !important;
    }
    
    .hero-content {
        padding: 0.75rem 0.5rem !important;
        min-height: calc(100vh - 100px) !important;
        min-height: calc(var(--vh, 1vh) * 100 - 100px) !important;
    }
    
    .hero-content h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-content p {
        font-size: 0.75rem !important;
        line-height: 1.25 !important;
    }
}

/* Landscape mobile - Perfect horizontal fit */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .hero-bg {
        padding-top: 40px !important;
        padding-bottom: 0 !important;
        min-height: 100vh !important;
        min-height: calc(var(--vh, 1vh) * 100) !important;
    }
    
    .hero-bg::before {
        opacity: 0.2 !important;
        background-position: center center !important;
    }
    
    .hero-content {
        padding: 0.5rem 1rem !important;
        min-height: calc(100vh - 80px) !important;
        min-height: calc(var(--vh, 1vh) * 100 - 80px) !important;
        justify-content: center !important;
    }
    
    .hero-content h1 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-content p {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-content .btn-primary {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* Tablet screens - Perfect medium fit */
@media (min-width: 641px) and (max-width: 1023px) {
    .hero-bg {
        padding-top: 80px !important;
        padding-bottom: 0 !important;
        min-height: 100vh !important;
        min-height: calc(var(--vh, 1vh) * 100) !important;
    }
    
    .hero-bg::before {
        opacity: 0.3 !important;
        background-attachment: scroll !important;
        background-position: center center !important;
    }
    
    .hero-content {
        padding: 2rem 1.5rem !important;
        min-height: calc(100vh - 160px) !important;
        min-height: calc(var(--vh, 1vh) * 100 - 160px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Desktop screens - Perfect large fit */
@media (min-width: 1024px) {
    .hero-bg {
        padding-top: 90px !important;
        padding-bottom: 0 !important;
        min-height: 100vh !important;
        background-attachment: fixed !important;
    }
    
    .hero-bg::before {
        background-attachment: fixed !important;
        opacity: 0.3 !important;
        background-position: center center !important;
    }
    
    .hero-content {
        padding: 3rem 2rem !important;
        min-height: calc(100vh - 180px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Ultra-wide screens - Perfect extra large fit */
@media (min-width: 1440px) {
    .hero-bg {
        padding-top: 110px !important;
    }
    
    .hero-content {
        min-height: calc(100vh - 220px) !important;
        padding: 4rem 2rem !important;
    }
}

/* iOS Safari specific mobile fixes - Perfect iOS fit */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 640px) {
        .hero-bg {
            min-height: -webkit-fill-available !important;
        }
        
        .hero-bg::before {
            background-attachment: scroll !important;
            transform: translateZ(0) !important;
            -webkit-transform: translateZ(0) !important;
        }
        
        .hero-content {
            min-height: calc(-webkit-fill-available - 140px) !important;
        }
    }
}

/* Android Chrome specific fixes - Perfect Android fit */
@media screen and (max-width: 640px) {
    .hero-bg {
        min-height: 100vh !important;
        min-height: calc(var(--vh, 1vh) * 100) !important;
    }
    
    .hero-content {
        min-height: calc(100vh - 140px) !important;
        min-height: calc(var(--vh, 1vh) * 100 - 140px) !important;
    }
}

/* High DPI mobile displays - Perfect retina fit */
@media (max-width: 640px) and (-webkit-min-device-pixel-ratio: 2), 
       (max-width: 640px) and (min-resolution: 192dpi) {
    .hero-bg::before {
        background-image: url('../images/sample1.jpg') !important;
        background-size: cover !important;
    }
}

/* Aspect ratio specific optimizations */
@media (max-width: 640px) and (aspect-ratio: 16/9) {
    .hero-bg::before {
        background-position: center center !important;
    }
}

@media (max-width: 640px) and (aspect-ratio: 4/3) {
    .hero-bg::before {
        background-position: center 40% !important;
    }
}

@media (max-width: 640px) and (aspect-ratio: 3/2) {
    .hero-bg::before {
        background-position: center 35% !important;
    }
}

/* Prevent any overflow or scrolling issues */
@media (max-width: 640px) {
    body {
        overflow-x: hidden !important;
    }
    
    .hero-bg {
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    .hero-content * {
        box-sizing: border-box !important;
    }
}

/* Fix for sections after hero to prevent overlapping */
@media (max-width: 640px) {
    /* Section separators */
    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-24 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    /* About section fixes */
    .parallax-container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Text size fixes for section headings */
    .text-5xl {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
    }
    
    .text-lg {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
}

/* Fix for cards and content sections */
@media (max-width: 640px) {
    /* Card spacing fixes */
    .responsive-grid {
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .intersection-animate {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* News and events cards */
    .modern-card {
        margin-bottom: 1.5rem;
    }
    
    .modern-card .p-8 {
        padding: 1rem;
    }
    
    .modern-card h3 {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .modern-card p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
}

/* Statistics section mobile fixes */
@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        padding: 0 1rem;
    }
    
    .stats-grid > div {
        padding: 1rem 0.5rem;
    }
    
    .stats-grid .text-5xl {
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .stats-grid .text-lg {
        font-size: 0.875rem !important;
        line-height: 1.3 !important;
    }
}

/* Footer mobile fixes */
@media (max-width: 640px) {
    footer .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: left;
        padding: 0 1rem;
    }
    
    footer h3,
    footer h4 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    footer p,
    footer li {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
}

/* Fix for mobile safe areas */
@supports (padding: max(0px)) {
    .mobile-safe-top {
        padding-top: max(env(safe-area-inset-top), 1rem);
    }
    
    .mobile-safe-bottom {
        padding-bottom: max(env(safe-area-inset-bottom), 1rem);
    }
}

/* Prevent text from being too close to edges */
@media (max-width: 640px) {
    .container-responsive,
    .max-w-6xl,
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Ensure minimum spacing between elements */
    .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    .mb-8 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-12 {
        margin-bottom: 2rem !important;
    }
    
    .mb-16 {
        margin-bottom: 2.5rem !important;
    }
    
    .mb-20 {
        margin-bottom: 3rem !important;
    }
}

/* Fix for very tall content on mobile */
@media (max-width: 640px) and (min-height: 800px) {
    .hero-bg {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }
    
    .hero-content h1 {
        font-size: 2.25rem !important;
        margin-bottom: 2rem !important;
    }
    
    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 2.5rem !important;
    }
}

/* About Page Specific Mobile Fixes */
@media (max-width: 640px) {
    /* About Hero Section Fixes */
    .hero-about {
        padding-top: 5rem !important;
        padding-bottom: 2rem !important;
        min-height: auto !important;
    }
    
    .hero-about .hero-content {
        padding: 0 1rem !important;
    }
    
    .hero-about .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
        word-break: break-word;
        hyphens: auto;
    }
    
    .hero-about .hero-content p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
        padding: 0 0.5rem;
    }
    
    /* Mission & Vision Section Mobile Fixes */
    .parallax-container {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .parallax-container .max-w-4xl {
        padding: 0 1rem !important;
    }
    
    .parallax-container h2 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .parallax-container h3 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .parallax-container p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
        text-align: left;
    }
    
    .parallax-container .space-y-12 > * + * {
        margin-top: 1.5rem !important;
    }
    
    /* Core Values Grid Mobile Fixes */
    .responsive-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 1rem;
    }
    
    .intersection-animate {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }
    
    .intersection-animate h3 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .intersection-animate p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0 !important;
    }
    
    .intersection-animate .text-4xl {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* History Section Mobile Fixes */
    .history-section .grid,
    section:has(.grid.grid-cols-1.lg\\:grid-cols-2) .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        text-align: center;
    }
    
    .history-section img,
    section:has(.grid.grid-cols-1.lg\\:grid-cols-2) img {
        width: 8rem !important;
        height: 8rem !important;
        margin: 0 auto 1rem auto !important;
    }
    
    .history-section h2,
    section:has(.grid.grid-cols-1.lg\\:grid-cols-2) h2 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        text-align: center;
    }
    
    .history-section .space-y-6 > * + *,
    section:has(.grid.grid-cols-1.lg\\:grid-cols-2) .space-y-6 > * + * {
        margin-top: 1rem !important;
    }
    
    .history-section p,
    section:has(.grid.grid-cols-1.lg\\:grid-cols-2) p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        text-align: left;
        margin-bottom: 1rem !important;
    }
    
    /* Accreditations Section Mobile Fixes */
    .bg-red-600 .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .bg-red-600 h2 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .bg-red-600 .intersection-animate {
        padding: 1.5rem 1rem !important;
    }
    
    .bg-red-600 .text-6xl {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .bg-red-600 .text-2xl {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .bg-red-600 p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
    
    /* Call to Action Section Mobile Fixes */
    .cta-section h2,
    section:last-of-type:not(footer) h2 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .cta-section p,
    section:last-of-type:not(footer) p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .cta-section .flex,
    section:last-of-type:not(footer) .flex {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: center;
    }
    
    .cta-section a,
    section:last-of-type:not(footer) a {
        width: 100% !important;
        max-width: 280px !important;
        text-align: center !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Footer Mobile Fixes for About Page */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        text-align: left;
    }
    
    footer h4 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    footer p,
    footer li,
    footer span {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
    
    footer .flex.items-center {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    footer .space-y-3 > * + * {
        margin-top: 0.75rem !important;
    }
    
    footer .space-y-4 > * + * {
        margin-top: 1rem !important;
    }
    
    /* Additional fixes for any remaining overlaps */
    .max-w-7xl,
    .max-w-4xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Fix for any large text that might still overlap */
    .text-5xl {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
    }
    
    /* Ensure proper spacing between sections */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-12 {
        margin-bottom: 2rem !important;
    }
    
    .mb-8 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    /* Fix for grid layouts */
    .grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3,
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .grid-cols-1.md\\:grid-cols-3,
    .grid.grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Extra small screens for About page */
@media (max-width: 480px) {
    .hero-about {
        padding-top: 4rem;
        padding-bottom: 1.5rem;
    }
    
    .hero-about .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-about .hero-content p {
        font-size: 0.8125rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
        padding: 0 0.25rem;
    }
    
    .parallax-container {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .parallax-container h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .parallax-container h3 {
        font-size: 1.125rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .intersection-animate {
        padding: 0.75rem !important;
    }
    
    .bg-red-600 .text-6xl {
        font-size: 2rem !important;
    }
    
    .bg-red-600 .text-2xl {
        font-size: 1rem !important;
    }
}

/* Very small screens for About page */
@media (max-width: 360px) {
    .hero-about .hero-content h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-about .hero-content p {
        font-size: 0.75rem !important;
        line-height: 1.25 !important;
    }
    
    .parallax-container h2 {
        font-size: 1.375rem !important;
    }
    
    .parallax-container h3 {
        font-size: 1rem !important;
    }
    
    .intersection-animate h3 {
        font-size: 0.875rem !important;
    }
    
    .intersection-animate p {
        font-size: 0.8125rem !important;
    }
}

/* Landscape mobile fixes for About page */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .hero-about {
        padding-top: 2rem;
        padding-bottom: 1rem;
        min-height: auto;
    }
    
    .hero-about .hero-content h1 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-about .hero-content p {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .parallax-container {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .parallax-container .space-y-12 > * + * {
        margin-top: 1rem !important;
    }
}

/* Universal Public Pages Mobile Fixes */
@media (max-width: 640px) {
    /* Programs Page Fixes */
    .hero-programs {
        padding-top: 5rem !important;
        padding-bottom: 2rem !important;
        min-height: auto !important;
    }
    
    .hero-programs .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-programs .hero-content p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Faculty Page Fixes */
    .hero-faculty {
        padding-top: 5rem !important;
        padding-bottom: 2rem !important;
        min-height: auto !important;
    }
    
    .hero-faculty .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-faculty .hero-content p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Students Page Fixes */
    .hero-students {
        padding-top: 5rem !important;
        padding-bottom: 2rem !important;
        min-height: auto !important;
    }
    
    .hero-students .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-students .hero-content p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Events, News, Awards, Announcements Hero Fixes */
    .py-24 {
        padding-top: 5rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Universal hero content fixes for all public pages */
    section[class*="hero"] .hero-content h1,
    .relative.text-white h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
        word-break: break-word;
        hyphens: auto;
    }
    
    section[class*="hero"] .hero-content p,
    .relative.text-white p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
        padding: 0 0.5rem;
    }
    
    /* Grid layouts for all pages */
    .grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3,
    .grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4,
    .grid-cols-1.md\\:grid-cols-3.lg\\:grid-cols-5 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Card content fixes */
    .rounded-2xl.p-8,
    .rounded-xl.p-6 {
        padding: 1rem !important;
    }
    
    .rounded-2xl.p-6 {
        padding: 0.75rem !important;
    }
    
    /* Text size fixes for cards */
    .text-4xl {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Section spacing fixes */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .py-12 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Container padding fixes */
    .max-w-7xl,
    .max-w-6xl,
    .max-w-5xl,
    .max-w-4xl,
    .max-w-3xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Margin fixes */
    .mb-16 { margin-bottom: 2rem !important; }
    .mb-12 { margin-bottom: 1.5rem !important; }
    .mb-8 { margin-bottom: 1rem !important; }
    .mb-6 { margin-bottom: 0.75rem !important; }
    .mb-4 { margin-bottom: 0.5rem !important; }
    
    /* Faculty card specific fixes */
    .faculty-card {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Form container fixes for apply page */
    .form-container {
        margin: 1rem !important;
        padding: 1.5rem !important;
        border-radius: 0.75rem !important;
    }
    
    .form-group {
        margin-bottom: 1rem !important;
    }
    
    .form-control {
        padding: 0.75rem !important;
        font-size: 1rem !important;
    }
    
    /* Button fixes */
    .btn-primary {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
        margin-top: 1rem !important;
    }
    
    /* Article card fixes for news/events/awards */
    article.bg-white {
        margin-bottom: 1.5rem !important;
    }
    
    article .p-6 {
        padding: 1rem !important;
    }
    
    article h3 {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
    }
    
    article p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Icon fixes */
    .w-20.h-20 {
        width: 3rem !important;
        height: 3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .w-20.h-20 i {
        font-size: 1.5rem !important;
    }
    
    /* Flex layout fixes */
    .flex.items-center.justify-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }
    
    /* Link fixes */
    .inline-flex.items-center {
        font-size: 0.875rem !important;
        padding: 0.5rem 0 !important;
    }
}

/* Extra small screens for all pages */
@media (max-width: 480px) {
    section[class*="hero"] .hero-content h1,
    .relative.text-white h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }
    
    section[class*="hero"] .hero-content p,
    .relative.text-white p {
        font-size: 0.8125rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
        padding: 0 0.25rem;
    }
    
    .py-24 {
        padding-top: 4rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
    }
    
    .text-3xl {
        font-size: 1.375rem !important;
    }
    
    .text-2xl {
        font-size: 1.125rem !important;
    }
    
    .rounded-2xl.p-8,
    .rounded-xl.p-6 {
        padding: 0.75rem !important;
    }
}

/* Very small screens for all pages */
@media (max-width: 360px) {
    section[class*="hero"] .hero-content h1,
    .relative.text-white h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    section[class*="hero"] .hero-content p,
    .relative.text-white p {
        font-size: 0.75rem !important;
        line-height: 1.25 !important;
    }
    
    .text-4xl {
        font-size: 1.5rem !important;
    }
    
    .text-3xl {
        font-size: 1.25rem !important;
    }
    
    .text-2xl {
        font-size: 1rem !important;
    }
    
    .text-xl {
        font-size: 0.875rem !important;
    }
}
/* Hero Logo Mobile Responsive Fixes - Very Small Compact Logo */
@media (max-width: 640px) {
    .hero-logo-container {
        margin-bottom: 0.5rem !important;
        padding: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .hero-logo {
        width: 24px !important;
        height: 24px !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        object-fit: cover !important;
        object-position: center !important;
        transition: all 0.3s ease !important;
        transform: translateZ(0) !important;
        will-change: transform !important;
        backface-visibility: hidden !important;
    }
    
    .hero-logo:hover {
        transform: scale(1.05) translateZ(0) !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero-logo-container {
        margin-bottom: 0.5rem !important;
    }
    
    .hero-logo {
        width: 22px !important;
        height: 22px !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-logo-container {
        margin-bottom: 0.25rem !important;
    }
    
    .hero-logo {
        width: 20px !important;
        height: 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    }
}

/* Landscape mobile fixes */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .hero-logo-container {
        margin-bottom: 0.25rem !important;
    }
    
    .hero-logo {
        width: 20px !important;
        height: 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    }
}

/* Tablet screens */
@media (min-width: 641px) and (max-width: 1023px) {
    .hero-logo-container {
        margin-bottom: 0.5rem !important;
    }
    
    .hero-logo {
        width: 26px !important;
        height: 26px !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    }
}

/* Ensure very small logo doesn't interfere with perfect screen fit */
@media (max-width: 640px) {
    .hero-content {
        padding-top: 1rem !important;
    }
    
    /* Adjust hero content height to accommodate very small logo */
    .hero-content {
        min-height: calc(100vh - 140px) !important;
        min-height: calc(var(--vh, 1vh) * 100 - 140px) !important;
        max-height: calc(100vh - 140px) !important;
        max-height: calc(var(--vh, 1vh) * 100 - 140px) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Adjust title spacing with very small logo */
    .hero-content h1 {
        margin-top: 0 !important;
        margin-bottom: 1rem !important;
    }
}

/* iOS Safari specific very small logo fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 640px) {
        .hero-logo {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
        }
        
        .hero-logo:hover {
            -webkit-transform: scale(1.05) translateZ(0) !important;
            transform: scale(1.05) translateZ(0) !important;
        }
    }
}

/* High DPI mobile displays */
@media (max-width: 640px) and (-webkit-min-device-pixel-ratio: 2), 
       (max-width: 640px) and (min-resolution: 192dpi) {
    .hero-logo {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
}