/* CILIRD Unified Tailwind CSS - Complete Website Styling */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* CSS Variables for consistent theming */
:root {
    --navbar-color: #1e344c;
    --heading-color: #1a2835;
    --subheading-color: #0a0b07;
    --button-color: #0a0b07;
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --input-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.preloader-content {
    text-align: center;
    color: white;
}

.preloader-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    animation: logoFloat 2s ease-in-out infinite alternate;
}

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

.loading-animation {
    width: 60px;
    height: 8px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 10px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
}

.loading-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: loadingSlide 1.5s ease-in-out infinite;
}

@keyframes loadingSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    background: rgba(30, 52, 76, 0.98) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Desktop Dropdown Styling */
.dropdown-container .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-container:hover .dropdown-menu,
.dropdown-container .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.dropdown-container .dropdown-arrow {
    transition: transform 0.3s ease;
}

.dropdown-container:hover .dropdown-arrow,
.dropdown-container .dropdown-toggle-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Mobile Menu Animation */
.mobile-menu-container.show {
    pointer-events: auto;
    opacity: 1;
}

.mobile-menu-container.show .mobile-menu-content {
    transform: translateY(0) scale(1);
}

/* Mobile Hamburger Animation */
.mobile-menu-button[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-button[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Dropdown Animation */
.mobile-dropdown-menu.show {
    max-height: 24rem;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.mobile-dropdown-toggle[aria-expanded="true"] .mobile-dropdown-chevron {
    transform: rotate(180deg);
}

/* Hero Section Styles */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../assets/img/hero/hero-image.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 52, 76, 0.1);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-logo {
    max-width: 350px;
    filter: brightness(0) invert(1);
    animation: float 6s ease-in-out infinite;
    margin-top: 2rem;
}

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

/* Button Styles */
.btn-hero {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    margin: 0 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--button-color);
    border: 2px solid var(--button-color);
    color: white;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--button-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 11, 7, 0.2);
}

.btn-outline-primary {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline-primary:hover {
    background-color: white;
    color: var(--button-color);
    transform: translateY(-2px);
}

/* Card Styles */
.card-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transition: all 0.4s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

/* Event Card Styles */
.event-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    margin-bottom: 2rem;
}

.event-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.event-date-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    color: var(--primary-color);
    border-radius: 15px;
    padding: 0.5rem;
    text-align: center;
    min-width: 60px;
    z-index: 2;
}

/* Publications Styles */
.publication-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.publication-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.publication-type-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge-research {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.badge-blog {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

/* Form Styles */
.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating > .form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-floating > .form-control::placeholder {
    color: transparent;
}

.form-floating > .form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-floating > label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    transform: translate(0, 0) scale(1);
    transform-origin: 0 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: translate(0, -1.5rem) scale(0.85);
    color: white;
}

/* Footer Styles */
.footer {
    background: var(--dark-gradient);
    color: white;
    padding: 80px 0 40px;
}

.footer-section h5 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

/* About Page Styles */
.about-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: white;
}

.mission-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.vision-card {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(241, 196, 15, 0.1));
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.team-member-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Events Page Styles */
.events-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
    padding-top: 100px;
}

.events-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.events-hero .container {
    position: relative;
    z-index: 2;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2px;
    border-radius: 1rem;
}

.border-gradient > * {
    background: white;
    border-radius: calc(1rem - 2px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .hero-logo {
        max-width: 250px;
        margin-top: 1rem;
    }
    
    .btn-hero {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
    }
    
    .mobile-menu-content {
        margin: 1rem;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .events-hero h1 {
        font-size: 2.5rem;
    }
    
    .about-hero h1 {
        font-size: 2.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-menu-container,
    .btn,
    .footer {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
.focus\:ring-custom:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading states */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg' fill='%23667eea'%3e%3ccircle cx='15' cy='15' r='15'%3e%3canimate attributeName='r' from='15' to='15' begin='0s' dur='1s' values='15;9;15' calcMode='linear' repeatCount='indefinite' /%3e%3canimate attributeName='fill-opacity' from='1' to='1' begin='0s' dur='1s' values='1;.5;1' calcMode='linear' repeatCount='indefinite' /%3e%3c/circle%3e%3c/svg%3e");
    background-size: 30px 30px;
    background-repeat: no-repeat;
    background-position: center;
}
