/* CSS Variables - Enhanced Color Scheme */
:root {
    --primary-dark: #0A2B3E;
    --primary: #1A6D8F;
    --primary-light: #3A8EB5;
    --primary-lighter: #E6F3F9;
    --primary-glow: rgba(26, 109, 143, 0.2);
    --secondary: #2C3E50;
    --accent: #E76F51;
    --accent-light: #F4EAE6;
    --gray-light: #F8F9FA;
    --gray-border: #E9ECEF;
    --text-dark: #1A2B3C;
    --text-muted: #6C757D;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 24px 56px rgba(0,0,0,0.16);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hero Section - Enhanced with reduced spacing */
.hero-section-wrapper {
    background: linear-gradient(135deg, #0A2640 0%, #0E334C 50%, #1A4D6F 100%);
    position: relative;
    overflow: hidden;
    margin-top: -1.5rem;
    padding: 2rem 0 0.5rem 0;
    isolation: isolate;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 2px, transparent 2px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    pointer-events: none;
}

.hero-section-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(57, 136, 189, 0.15) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-section-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--primary), var(--primary-light), transparent);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.hero-section {
    position: relative;
    z-index: 2;
    padding: 0.5rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #FFFFFF, #E0F0F8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 1rem auto;
}

.hero-line-main {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--primary-light), transparent);
}

.hero-line-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(91, 163, 212, 0.6);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.5;
}

.hero-scroll-indicator {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.hero-scroll-indicator:hover {
    transform: translateY(3px);
}

.scroll-text {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.hero-scroll-indicator i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Event Card Styles */
.event-card {
    border-radius: 15px !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    border: 3px solid var(--border, #cad4e2) !important;
    background: white;
}

.event-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
    border-color: var(--primary-light, #5b9dbb) !important;
}

.event-card .card-img-top {
    transition: transform 0.5s ease !important;
    border-bottom: 1px solid var(--gray-border, #E9ECEF);
}

.event-card:hover .card-img-top {
    transform: scale(1.08) !important;
}

.card-body {
    background: white;
}

/* Improved Modal Styles for Long Descriptions */
.modal-content {
    border-radius: 20px !important;
    overflow: hidden;
}

.modal-body {
    padding-bottom: 1.5rem !important;
}

.modal-body .row:last-child {
    margin-bottom: 0;
}

.modal-body .col-lg-5,
.modal-body .col-lg-7 {
    margin-bottom: 0;
}

.modal-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f8f9fa;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.modal-image:hover {
    transform: scale(1.02);
}

.description-wrapper-custom {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.description-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-lighter);
    display: inline-block;
}

.description-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 12px;
    line-height: 1.8;
    color: #555;
    text-align: justify;
    max-height: 450px;
    margin-bottom: 0;
}

.description-content::-webkit-scrollbar {
    width: 6px;
}

.description-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.description-content::-webkit-scrollbar-thumb {
    background: #3988BD;
    border-radius: 10px;
}

.description-content::-webkit-scrollbar-thumb:hover {
    background: #0E334C;
}

.info-badge {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-border);
}

.info-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.info-badge-item i {
    color: var(--primary);
    font-size: 0.9rem;
}

/* Responsive Modal Adjustments */
@media (max-width: 768px) {
    .modal-body {
        padding: 1.5rem !important;
    }
    
    .modal-image-container {
        min-height: 200px;
        margin-bottom: 1.5rem;
    }
    
    .modal-image {
        max-height: 250px;
    }
    
    .description-content {
        max-height: 300px;
    }
    
    .description-title {
        font-size: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .modal-image-container {
        min-height: 250px;
    }
    
    .description-content {
        max-height: 350px;
    }
}

.empty-state {
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 20px;
}

.filter-btn {
    padding: 8px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.filter-btn:hover {
    transform: translateY(-2px);
}

.search-box {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 50px;
}

.search-box .input-group-text {
    border-radius: 50px 0 0 50px;
}

.search-box input {
    border-radius: 0 50px 50px 0;
    padding: 12px 20px;
}

.search-box input:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

.pagination {
    gap: 4px;
    flex-wrap: wrap;
}

.pagination .page-item .page-link {
    padding: 4px 10px;
    font-size: 12px;
    min-width: 32px;
    height: 32px;
    line-height: 20px;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination .page-item.active .page-link {
    background-color: #3988BD;
    border-color: #3988BD;
    color: #fff;
}

.pagination .page-item .page-link:hover {
    background-color: #f1f5f9;
    color: #3988BD;
}

.pagination .page-item.disabled .page-link {
    font-size: 11px;
    opacity: 0.6;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    padding: 4px 8px;
}

.pagination .page-item.active .page-link {
    background: #3988BD;
    border-color: #3988BD;
    color: white;
    box-shadow: 0 2px 4px rgba(57, 136, 189, 0.2);
}

.pagination .page-item .page-link:hover {
    background: #f8f9fa;
    border-color: #3988BD;
    color: #3988BD;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link:hover {
    background: #3988BD;
    color: white;
    transform: translateY(-1px);
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background: #f8f9fa;
    cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    background: #f8f9fa;
    border-color: #e0e0e0;
}

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

.event-item {
    animation: fadeInUpCard 0.5s ease-out;
    animation-fill-mode: both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-line-main {
        width: 35px;
    }
    
    .hero-line-dot {
        width: 6px;
        height: 6px;
    }
    
    .hero-scroll-indicator {
        margin-top: 1rem;
    }
    
    .filter-btn {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .filter-btn i {
        font-size: 12px;
    }
    
    .pagination {
        gap: 3px;
    }
    
    .pagination .page-item .page-link {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 30px;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 4px 8px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-section-wrapper {
        padding: 1rem 0 0.75rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .hero-line {
        margin: 0.75rem auto;
    }
    
    .hero-line-main {
        width: 25px;
    }
    
    .scroll-text {
        font-size: 0.6rem;
    }
    
    .hero-scroll-indicator i {
        font-size: 0.75rem;
    }
    
    .pagination {
        gap: 2px;
    }
    
    .pagination .page-item .page-link {
        padding: 3px 6px;
        font-size: 11px;
        min-width: 26px;
        border-radius: 6px !important;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 3px 6px;
    }
}

/* Tablet devices */
@media (min-width: 769px) and (max-width: 1024px) {
    .pagination .page-item .page-link {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 34px;
    }
}