/* ========================================
   ABOUT PAGE IMAGE FIXES
   Proper image display and container styling
   ======================================== */

/* About Image Container */
.about-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* About Campus Image */
.about-campus-image {
    width: 100% !important;
    height: auto !important;
    max-height: 400px;
    object-fit: cover !important;
    border-radius: var(--radius-2xl) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.about-campus-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Loading state for image container */
.about-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0),
                linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0;
    animation: loadingShimmer 1.5s infinite;
    z-index: 1;
}

.about-image-container.loading::before {
    opacity: 1;
}

@keyframes loadingShimmer {
    0% { background-position: 0 0, 10px 10px; }
    100% { background-position: 20px 20px, 30px 30px; }
}

/* Image loaded state */
.about-image-container.loaded::before {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Fallback image styling */
.about-campus-image[alt*="not available"] {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* Hero section background image fix */
.hero-premium {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 33, 71, 0.85) 0%,
            rgba(0, 61, 130, 0.75) 100%);
    z-index: 1;
}

.hero-content-premium {
    position: relative;
    z-index: 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-image-container {
        min-height: 250px;
        margin-bottom: 2rem;
    }
    
    .about-campus-image {
        max-height: 300px;
    }
    
    .hero-premium {
        min-height: 40vh !important;
        background-attachment: scroll !important;
    }
}

@media (max-width: 480px) {
    .about-image-container {
        min-height: 200px;
        border-radius: var(--radius-xl);
    }
    
    .about-campus-image {
        max-height: 250px;
        border-radius: var(--radius-xl) !important;
    }
    
    .hero-premium {
        min-height: 35vh !important;
        margin-top: 60px !important;
    }
}

/* Print styles */
@media print {
    .about-image-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .about-campus-image {
        max-height: 300px !important;
    }
    
    .hero-premium {
        background: none !important;
        min-height: auto !important;
    }
    
    .hero-premium::before {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .about-image-container {
        border: 2px solid #000;
    }
    
    .about-campus-image {
        filter: contrast(1.2);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .about-campus-image {
        transition: none;
    }
    
    .about-image-container::before {
        animation: none;
    }
    
    .hero-premium {
        background-attachment: scroll !important;
    }
}
