/* 
 * NITH Logo Rounded Corners Styling
 * Global CSS for all logo instances across the application
 * Author: NITH IT Department
 * Version: 1.0
 */

/* Base logo styling - applies to all logo images */
.logo-rounded,
img[alt="NITH Logo"],
img[src*="logo.png"],
img[src*="logo.jpg"],
img[src*="logo.jpeg"],
img[src*="logo.svg"] {
    border-radius: 12px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: cover;
}

/* Hover effects for all logos */
.logo-rounded:hover,
img[alt="NITH Logo"]:hover,
img[src*="logo.png"]:hover,
img[src*="logo.jpg"]:hover,
img[src*="logo.jpeg"]:hover,
img[src*="logo.svg"]:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* Context-specific logo styling */

/* Navbar logos */
.navbar-brand img[alt="NITH Logo"],
.navbar img[alt="NITH Logo"] {
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.navbar-brand img[alt="NITH Logo"]:hover,
.navbar img[alt="NITH Logo"]:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Footer logos */
.footer img[alt="NITH Logo"],
footer img[alt="NITH Logo"] {
    border-radius: 10px !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Hero section logos */
.jumbotron img[alt="NITH Logo"],
.hero img[alt="NITH Logo"],
.hero-section img[alt="NITH Logo"] {
    border-radius: 15px !important;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.jumbotron img[alt="NITH Logo"]:hover,
.hero img[alt="NITH Logo"]:hover,
.hero-section img[alt="NITH Logo"]:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

/* Admin sidebar logos */
.sidebar img[alt="NITH Logo"],
.admin-sidebar img[alt="NITH Logo"] {
    border-radius: 15px !important;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sidebar img[alt="NITH Logo"]:hover,
.admin-sidebar img[alt="NITH Logo"]:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Handler portal logos */
.handler-sidebar img[alt="NITH Logo"],
.handler-portal img[alt="NITH Logo"] {
    border-radius: 15px !important;
    border: 2px solid rgba(40, 167, 69, 0.2);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.1);
}

/* Login page logos */
.login-page img[alt="NITH Logo"],
.auth-page img[alt="NITH Logo"] {
    border-radius: 50% !important;
    border: 4px solid rgba(44, 62, 80, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.login-page img[alt="NITH Logo"]:hover,
.auth-page img[alt="NITH Logo"]:hover {
    border-color: rgba(44, 62, 80, 0.5);
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Guest layout header logos */
.guest-header img[alt="NITH Logo"],
header.guest img[alt="NITH Logo"] {
    border-radius: 50% !important;
    border: 3px solid rgba(44, 62, 80, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Card logos */
.card img[alt="NITH Logo"],
.card-header img[alt="NITH Logo"] {
    border-radius: 10px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Modal logos */
.modal img[alt="NITH Logo"],
.modal-header img[alt="NITH Logo"] {
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Email template logos */
.email-template img[alt="NITH Logo"],
.email-header img[alt="NITH Logo"] {
    border-radius: 10px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Size-specific styling */

/* Small logos (height <= 40px) */
img[alt="NITH Logo"][style*="height: 30px"],
img[alt="NITH Logo"][style*="height: 35px"],
img[alt="NITH Logo"][style*="height: 40px"] {
    border-radius: 6px !important;
}

/* Medium logos (height 41-60px) */
img[alt="NITH Logo"][style*="height: 45px"],
img[alt="NITH Logo"][style*="height: 50px"],
img[alt="NITH Logo"][style*="height: 55px"],
img[alt="NITH Logo"][style*="height: 60px"] {
    border-radius: 10px !important;
}

/* Large logos (height > 60px) */
img[alt="NITH Logo"][style*="height: 70px"],
img[alt="NITH Logo"][style*="height: 80px"],
img[alt="NITH Logo"][style*="height: 90px"],
img[alt="NITH Logo"][style*="height: 100px"] {
    border-radius: 15px !important;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    .logo-rounded,
    img[alt="NITH Logo"] {
        border-radius: 8px !important;
    }
    
    .jumbotron img[alt="NITH Logo"],
    .hero img[alt="NITH Logo"] {
        border-radius: 12px !important;
    }
    
    .sidebar img[alt="NITH Logo"] {
        border-radius: 10px !important;
    }
}

@media (max-width: 480px) {
    .logo-rounded,
    img[alt="NITH Logo"] {
        border-radius: 6px !important;
    }
    
    .jumbotron img[alt="NITH Logo"],
    .hero img[alt="NITH Logo"] {
        border-radius: 8px !important;
    }
}

/* Animation keyframes */
@keyframes logoGlow {
    0% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 6px 12px rgba(44, 62, 80, 0.3);
    }
    100% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Special effects (optional - can be enabled with additional classes) */
.logo-glow img[alt="NITH Logo"] {
    animation: logoGlow 3s ease-in-out infinite;
}

.logo-float img[alt="NITH Logo"] {
    animation: logoFloat 4s ease-in-out infinite;
}

/* Print styles */
@media print {
    .logo-rounded,
    img[alt="NITH Logo"] {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .logo-rounded,
    img[alt="NITH Logo"] {
        border: 2px solid currentColor !important;
        box-shadow: none !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .logo-rounded,
    img[alt="NITH Logo"] {
        transition: none !important;
        animation: none !important;
    }
    
    .logo-rounded:hover,
    img[alt="NITH Logo"]:hover {
        transform: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .logo-rounded,
    img[alt="NITH Logo"] {
        box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    }
    
    .logo-rounded:hover,
    img[alt="NITH Logo"]:hover {
        box-shadow: 0 6px 12px rgba(255, 255, 255, 0.15);
    }
}

/* Focus styles for accessibility */
.logo-rounded:focus,
img[alt="NITH Logo"]:focus {
    outline: 3px solid #2c3e50;
    outline-offset: 2px;
    border-radius: 12px !important;
}

/* Loading state */
.logo-loading {
    opacity: 0.7;
    filter: blur(1px);
}

/* Error state */
.logo-error {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* Success state */
.logo-success {
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3) !important;
}

/* Utility classes */
.logo-no-hover img[alt="NITH Logo"] {
    transition: none !important;
}

.logo-no-hover img[alt="NITH Logo"]:hover {
    transform: none !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.logo-extra-rounded img[alt="NITH Logo"] {
    border-radius: 20px !important;
}

.logo-circle img[alt="NITH Logo"] {
    border-radius: 50% !important;
}

.logo-square img[alt="NITH Logo"] {
    border-radius: 0 !important;
}

/* Brand consistency */
.nith-brand img[alt="NITH Logo"] {
    border: 2px solid #2c3e50;
    box-shadow: 0 4px 8px rgba(44, 62, 80, 0.2);
}

.nith-brand img[alt="NITH Logo"]:hover {
    border-color: #34495e;
    box-shadow: 0 6px 12px rgba(44, 62, 80, 0.3);
}