/* static/css/custom.css */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

/* Custom Properties */
:root {
    --primary-color: #4a148c; /* Deep Purple */
    --secondary-color: #ff6f00; /* Amber */
    --accent-color: #7b1fa2; /* Light Purple */
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #212529;
    --text-muted: #6c757d;
    --font-family-headings: 'Montserrat', sans-serif;
    --font-family-base: 'Roboto', sans-serif;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, #ffa726 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* General Styles */
body {
    font-family: var(--font-family-base);
    color: var(--dark-gray);
    background-color: var(--light-gray);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 600;
    line-height: 1.3;
}

/* Modern Navbar */
.navbar-dark.bg-primary {
    background: var(--gradient-primary) !important;
    backdrop-filter: blur(10px);
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* Modern Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #380f6b 0%, #6a1b9a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 20, 140, 0.4);
}

.btn-outline-light {
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

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

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,133.3C960,128,1056,96,1152,90.7C1248,85,1344,107,1392,117.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

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

/* Modern Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    background: white;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(74, 20, 140, 0.2);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Glassmorphism Effects */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Modern Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Responsive Typography */
@media (max-width: 576px) {
    .hero-section {
        min-height: 50vh;
        padding: 2rem 0;
    }
    
    .hero-section .display-3 {
        font-size: 2rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 55vh;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:not(:last-child) {
        margin-right: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-gray: #1a1a1a;
        --medium-gray: #2d2d2d;
        --dark-gray: #f8f9fa;
        --text-muted: #adb5bd;
    }
    
    body {
        background-color: var(--light-gray);
        color: var(--dark-gray);
    }
    
    .card {
        background: #2d2d2d;
        color: var(--dark-gray);
    }
}

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

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

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

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

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

/* Image Slider Styles */
.image-slider-section {
    position: relative;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
    margin-top: 0;
}

/* Full height slider for better display */
.carousel {
    height: 100%;
}

.carousel-item {
    height: 100vh;
    min-height: 500px;
}

.slider-slide {
    position: relative;
    height: 100vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel {
    height: 100%;
}

.carousel-item {
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.slider-slide {
    position: relative;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 20, 140, 0.7) 0%, rgba(123, 31, 162, 0.5) 100%);
    z-index: 1;
}

.slider-content {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-indicators {
    bottom: 2rem;
    z-index: 3;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.carousel-indicators [data-bs-target].active {
    background-color: white;
    transform: scale(1.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    z-index: 3;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

/* Responsive Slider */
@media (max-width: 768px) {
    .image-slider-section {
        height: 70vh;
        min-height: 400px;
    }
    
    .carousel-item {
        height: 70vh;
        min-height: 400px;
    }
    
    .slider-slide {
        height: 70vh;
        min-height: 400px;
    }
    
    .slider-content {
        padding: 0 1rem;
    }
    
    .slider-content .display-3 {
        font-size: 2rem !important;
    }
    
    .slider-content .lead {
        font-size: 1rem !important;
    }
    
    .carousel-indicators {
        bottom: 1rem;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        margin: 0 0.25rem;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 576px) {
    .image-slider-section {
        height: 70vh;
        min-height: 350px;
    }
    
    .carousel-item {
        height: 70vh;
        min-height: 350px;
    }
    
    .slider-slide {
        height: 70vh;
        min-height: 350px;
    }
    
    .slider-content .display-3 {
        font-size: 1.5rem !important;
    }
    
    .slider-content .lead {
        font-size: 0.9rem !important;
    }
}

/* Slider Animation */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slider-content {
    animation: slideInFromLeft 1s ease-out;
}

.carousel-item.active .slider-content {
    animation: slideInFromLeft 1s ease-out;
}

/* Touch-friendly slider controls */
@media (hover: none) {
    .carousel-control-prev,
    .carousel-control-next {
        opacity: 0.9;
    }
}

/* Section spacing improvements */
section {
    margin-bottom: var(--spacing-xl);
}

section:last-child {
    margin-bottom: 0;
}

/* Container spacing improvements */
.container {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

/* Card spacing improvements */
.card {
    margin-bottom: var(--spacing-lg);
}

/* Form spacing improvements */
.form-group, .mb-3 {
    margin-bottom: var(--spacing-md);
}

/* Admin dashboard specific spacing */
.admin-section {
    padding: var(--spacing-lg) 0;
}

/* Page title spacing */
.page-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--medium-gray);
}

/* Enhanced Navbar Dropdowns */
.navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    background: white;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    animation: dropdownFadeIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu-large {
    min-width: 280px;
    padding: 1rem 0;
}

.dropdown-menu-large .dropdown-header {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0;
}

.dropdown-menu-large .dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--medium-gray);
}

.navbar .dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--dark-gray);
    transition: all 0.3s ease;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s ease;
    z-index: -1;
}

.navbar .dropdown-item:hover {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateX(5px);
    padding-left: 2rem;
}

.navbar .dropdown-item:hover::before {
    left: 0;
}

.navbar .dropdown-item:focus {
    background: var(--primary-color);
    color: white;
}

.navbar .dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.navbar .dropdown-item:hover i {
    color: white;
}

/* Dropdown Toggle Styling */
.navbar .dropdown-toggle {
    position: relative;
    transition: all 0.3s ease;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.75em;
    transition: transform 0.3s ease;
}

.navbar .dropdown-toggle:hover::after {
    transform: rotate(180deg);
}

.navbar .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Enhanced Mobile Dropdown */
@media (max-width: 991px) {
    .navbar .dropdown-menu {
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .navbar .dropdown-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem 1.5rem;
    }
    
    .navbar .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu-large .dropdown-header {
        background: var(--primary-color);
        border-radius: 0;
    }
}

/* Dropdown Animation on Show */
.dropdown-menu.show {
    animation: dropdownShow 0.3s ease-out;
}

@keyframes dropdownShow {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Special styling for dropdown items with badges */
.navbar .dropdown-item .badge {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

/* Enhanced hover states for nav links */
.navbar .nav-link:not(.dropdown-toggle) {
    position: relative;
    transition: all 0.3s ease;
}

.navbar .nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar .nav-link:not(.dropdown-toggle):hover::after {
    width: 80%;
}

.navbar .nav-link:hover {
    transform: translateY(-1px);
}

/* Improved Mobile Navigation */
@media (max-width: 991px) {
    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem 1.5rem !important;
        color: rgba(255, 255, 255, 0.9);
    }
    
    .navbar-nav .dropdown-menu {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        margin: 0;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-nav .dropdown-item {
        padding-left: 3rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar-nav .dropdown-item i {
        color: rgba(255, 255, 255, 0.8);
    }
}

/* Smooth transitions for better UX */
.navbar {
    transition: all 0.3s ease;
}

.navbar-sticky {
    backdrop-filter: blur(20px);
}

/* Active state for current page */
.navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Focus states for accessibility */
.navbar .nav-link:focus,
.navbar .dropdown-item:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Loading animation for dropdowns */
.dropdown-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced mobile menu animation */
@media (max-width: 991px) {
    #navbarNav {
        transition: transform 0.3s ease;
    }
    
    #navbarNav.collapsing {
        transition: height 0.35s ease;
    }
}
