/* Events Page Styles */
.events-page {
    min-height: 100vh;
    padding-top: 70px;
}

.event-details-page {
    padding-top: 70px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* Search and Filter Section */
.search-box .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.section-title {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.filter-stats .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* Event Cards - Unified Design */
.event-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 2rem;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.event-image {
    position: relative !important;
    height: 220px !important;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-date {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: rgba(220, 53, 69, 0.9) !important;
    color: white !important;
    padding: 8px 6px !important;
    border-radius: 8px !important;
    text-align: center !important;
    min-width: 50px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    z-index: 10 !important;
    backdrop-filter: blur(3px) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.event-date .day {
    display: block !important;
    font-size: 1.4rem !important;
    font-weight: bold !important;
    line-height: 1 !important;
    margin-bottom: 1px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
}

.event-date .month {
    display: block !important;
    font-size: 0.65rem !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
}

.event-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    margin-top: 12px;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.event-meta span {
    display: flex;
    align-items: center;
}

.event-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-register {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    color: white;
}

.event-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-full {
    background-color: #f8d7da;
    color: #721c24;
}

.status-ended {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Event Progress */
.event-progress {
    margin-top: 1rem;
}

.event-progress .progress {
    height: 6px;
    border-radius: 3px;
}

.event-progress .progress-bar {
    background-color: #dc3545;
}

/* Blood Types */
.blood-types {
    margin-top: 1rem;
    text-align: center;
}

.blood-types .badge {
    background-color: #dc3545;
    margin-right: 0.25rem;
}

/* Loading and No Events */
.loading-indicator,
.no-events {
    text-align: center;
    padding: 3rem 0;
}

.no-events i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Additional Classes for Index Page */
.text-center.py-5 {
    text-align: center;
    padding: 3rem 0;
}

.text-center.py-5 i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.text-center.mt-5 {
    text-align: center;
    margin-top: 3rem;
}

.text-center.mt-5 i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Bootstrap Overrides for Events Page */
.bg-primary {
    background-color: #dc3545 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.text-success {
    color: #28a745 !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Form Controls */
.form-control-lg,
.form-select-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

/* Buttons */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Badges */
.badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Spacing Utilities */
.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Display Utilities */
.display-4 {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.2;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

/* Flexbox Utilities */
.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

/* Grid System */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-lg-2,
.col-lg-4,
.col-lg-8,
.col-lg-12,
.col-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-lg-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
}

.col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group .btn {
    position: relative;
    z-index: 2;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Visually Hidden */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Additional Classes for Event Cards */
.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.w-100 {
    width: 100% !important;
}

.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.align-items-stretch {
    align-items: stretch !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.text-center {
    text-align: center !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.ms-auto {
    margin-left: auto !important;
}

.d-block {
    display: block !important;
}

/* Progress Bar */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #007bff;
    transition: width 0.6s ease;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Small Text */
small {
    font-size: 80%;
}

/* Image Fluid */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Font Awesome Icons */
.fas {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* Button Styles */
.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* Text Colors */
.text-muted {
    color: #6c757d !important;
}

/* No Events */
.no-events {
    text-align: center;
    padding: 3rem 0;
}

.no-events i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .event-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .event-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .event-card {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .event-date {
        top: 10px;
        right: 10px;
        padding: 8px 6px;
        min-width: 55px;
    }
    
    .event-date .day {
        font-size: 1.4rem;
    }
    
    .event-date .month {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .event-date {
        top: 8px;
        right: 8px;
        padding: 6px 4px;
        min-width: 50px;
    }
    
    .event-date .day {
        font-size: 1.2rem;
    }
    
    .event-date .month {
        font-size: 0.65rem;
    }
}

/* Filter Section Enhancements */
.search-filter-section {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.filter-options .form-select,
.filter-options .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
}

.filter-options .form-select:focus,
.filter-options .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Events Section */
.events-list-section {
    background-color: #ffffff;
}

.events-section {
    margin-bottom: 3rem;
}

.section-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* Event Card Enhancements */
.event-card .btn-outline-primary {
    border-color: #dc3545;
    color: #dc3545;
}

.event-card .btn-outline-primary:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Animation Enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Event Date Animation */
.event-date {
    animation: fadeInScale 0.8s ease-out 0.2s both;
}

/* Debug: Force Event Date Display */
.event-card .event-image .event-date {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    left: auto !important;
    background: rgba(220, 53, 69, 0.95) !important;
    color: white !important;
    padding: 12px 8px !important;
    border-radius: 10px !important;
    text-align: center !important;
    min-width: 65px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    z-index: 10 !important;
    backdrop-filter: blur(5px) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.event-card .event-image .event-date .day {
    display: block !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    line-height: 1 !important;
    margin-bottom: 2px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
}

.event-card .event-image .event-date .month {
    display: block !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hover Effects */
.event-card:hover .event-title {
    color: #dc3545;
}

.event-card:hover .btn-outline-primary {
    transform: scale(1.05);
}