/* Modern CSS Enhancements for Searchlight Website */

/* ============================================
   CSS Variables for Dark Mode Support
   ============================================ */
:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a2e;
    --text-secondary: #717275;
    --accent-primary: #0f3460;
    --accent-secondary: #16213e;
    --accent-info: #0dcaf0;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-color: #dee2e6;
    
    /* Animation Variables */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    --bounce-easing: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #0f3460;
    --bg-secondary: #16213e;
    --bg-tertiary: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #0dcaf0;
    --accent-secondary: #0f3460;
    --accent-info: #0dcaf0;
    --card-bg: #1a1a2e;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --border-color: #2a2a4a;
}

/* ============================================
   Dark Mode Toggle Button
   ============================================ */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-medium);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.theme-toggle i {
    color: white;
    font-size: 24px;
    transition: transform var(--transition-medium);
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* ============================================
   CSS Grid Layout Enhancements
   ============================================ */
.grid-container {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Enhanced Feature Cards with Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-medium);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform var(--transition-medium);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(10deg);
}

/* ============================================
   Team Card Hover Effects
   ============================================ */
.team-card:hover,
.team-card-small:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.team-card-small:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ============================================
   Glass Effect for Sections
   ============================================ */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-effect-dark {
    background: rgba(15, 52, 96, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Form Input Focus Effects
   ============================================ */
.form-control:focus {
    border-color: #0dcaf0 !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.25) !important;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* ============================================
   Stats Counter Animation
   ============================================ */
.stat-item h3 {
    transition: transform 0.3s ease;
}

.stat-item:hover h3 {
    transform: scale(1.1);
}

/* ============================================
   Navigation Link Hover Effects
   ============================================ */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0dcaf0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   Footer Link Hover Effects
   ============================================ */
footer a {
    position: relative;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #0dcaf0 !important;
}

/* LinkedIn icon - keep blue color on hover */
.social-icon-link.bi-linkedin {
    color: #0077b5 !important;
}

.social-icon-link.bi-linkedin:hover {
    color: #0077b5 !important;
}

/* ============================================
   Smooth Image Loading
   ============================================ */
img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded {
    opacity: 1;
}

/* ============================================
   Advanced Micro-interactions
   ============================================ */

/* Button Micro-interactions */
.custom-btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium);
}

.custom-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.custom-btn:active::before {
    width: 300px;
    height: 300px;
}

.custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Card Hover Effects */
.team-card, .location-card, .milestone-card {
    transition: all var(--transition-medium);
    cursor: pointer;
}

.team-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.team-card:hover .team-overlay {
    background: rgba(15, 52, 96, 0.9);
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.milestone-card:hover {
    transform: translateX(10px);
    border-left-color: var(--accent-info);
}

/* Image Hover Effects */
img {
    transition: transform var(--transition-medium);
}

.team-card:hover img,
.location-card:hover img {
    transform: scale(1.05);
}

/* ============================================
   Scroll Animations
   ============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered Animation Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ============================================
   Stats Counter Animation
   ============================================ */
.stat-item {
    position: relative;
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--accent-info);
    transition: width var(--transition-slow);
}

.stat-item:hover::after {
    width: 60%;
}

.stat-item h3 {
    transition: transform var(--transition-medium);
}

.stat-item:hover h3 {
    transform: scale(1.1);
}

/* ============================================
   Mobile-First Responsive Enhancements
   ============================================ */

/* Better Touch Targets */
@media (max-width: 768px) {
    .custom-btn {
        min-height: 48px;
        min-width: 48px;
        padding: 12px 24px;
    }
    
    .navbar-nav .nav-link {
        padding: 16px 20px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .theme-toggle {
        top: auto;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .feature-card,
    .team-card-small,
    .milestone-card {
        padding: 1.5rem;
    }
    
    /* Larger touch targets for interactive elements */
    .social-icon-link {
        width: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 20px;
    }
    
    /* Better spacing for mobile */
    .section-padding {
        padding-top: 80px;
        padding-bottom: 80px;
    }
}

/* Mobile-First Grid Adjustments */
@media (max-width: 576px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Stack location cards on mobile */
    .location-card {
        margin-bottom: 1.5rem;
    }
}

/* ============================================
   Dark Mode Specific Styles
   ============================================ */
[data-theme="dark"] .hero {
    background-image: linear-gradient(rgba(15, 52, 96, 0.95), rgba(26, 26, 46, 0.95)), url('images/hero-background.jpg');
}

[data-theme="dark"] .about,
[data-theme="dark"] .schedule,
[data-theme="dark"] .venue {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

[data-theme="dark"] .contact {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

[data-theme="dark"] .navbar {
    background: var(--bg-secondary);
}

[data-theme="dark"] .contact-form {
    background: var(--card-bg);
}

[data-theme="dark"] .form-control {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-secondary);
}

/* ============================================
   Loading Animation
   ============================================ */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================
   Bounce Animation
   ============================================ */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ============================================
   Smooth Scroll Enhancements
   ============================================ */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Improve scroll performance - only apply will-change to animated elements */
.scroll-reveal,
.scroll-reveal-left,
.scroll-reveal-right,
.scroll-reveal-scale {
    will-change: transform, opacity;
}

/* ============================================
   Focus States for Accessibility
   ============================================ */
*:focus-visible {
    outline: 3px solid var(--accent-info);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .theme-toggle,
    .navbar,
    .hero {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
