/* Events Page Specific Styles */

/* Page Hero */
.page-hero {
    background: var(--tg-theme-primary);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.page-hero::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.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,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;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Event Cards */
.event-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    margin-bottom: 30px;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tg-theme-primary), #667eea);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.event-card:hover::before {
    transform: scaleX(1);
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.event-image {
    height: 250px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.event-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-card:hover .event-image::after {
    opacity: 1;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.1);
}

.event-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.badge-open {
    background: linear-gradient(135deg, #00d2ff 0%, #3a47d5 100%);
    color: white;
}

.badge-closed {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.badge-full {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #212529;
}

.event-content {
    padding: 30px;
}

.event-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.3;
}

.event-meta {
    margin-bottom: 25px;
}

.event-meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #6c757d;
    font-size: 15px;
    transition: color 0.3s ease;
}

.event-card:hover .event-meta-item {
    color: #495057;
}

.event-meta-item i {
    width: 24px;
    margin-right: 12px;
    color: var(--tg-theme-primary);
    font-size: 16px;
}

.event-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--tg-theme-primary);
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.05) 100%);
    border-radius: 10px;
    text-align: center;
}

.event-price .price-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 400;
    display: block;
    margin-top: 5px;
}

.event-card .btn {
    width: 100%;
    padding: 12px 30px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.event-card .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.event-card .btn:hover::before {
    width: 300px;
    height: 300px;
}

.event-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.event-card .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Past Events */
.event-card.opacity-75 {
    opacity: 0.85;
}

.event-card.opacity-75:hover {
    opacity: 1;
}

/* No Events State */
.no-events {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.no-events i {
    font-size: 80px;
    margin-bottom: 30px;
    opacity: 0.3;
    color: var(--tg-theme-primary);
}

.no-events h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #495057;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.pagination a {
    display: inline-block;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
}

.pagination a:hover {
    background: var(--tg-theme-primary);
    color: white;
    border-color: var(--tg-theme-primary);
    transform: translateY(-2px);
}

.pagination a.active {
    background: var(--tg-theme-primary);
    color: white;
    border-color: var(--tg-theme-primary);
}

/* Section Title */
.section-title .title {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title .title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--tg-theme-primary), #667eea);
    border-radius: 2px;
}

/* Registration Modal Styles */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--tg-theme-primary) 0%, #667eea 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    border: none;
    padding: 25px 30px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-body {
    padding: 40px 30px;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tg-theme-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.registration-form .btn {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Additional Form Styles */
.registration-form .form-floating > .form-control {
    padding: 1rem 0.75rem 0.25rem 0.75rem;
    line-height: 1.5;
}

.registration-form .form-floating > label {
    padding: 1rem 0.75rem 0;
}

.registration-form .form-floating > .form-control:focus ~ label {
    color: var(--tg-theme-primary);
}

.registration-form .form-control:focus {
    border-color: var(--tg-theme-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15) !important;
}

.registration-form .form-select:focus {
    border-color: var(--tg-theme-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15) !important;
}

.registration-form .section-icon {
    transition: transform 0.3s ease;
}

.registration-form .section-icon:hover {
    transform: translateY(-3px);
}

/* Animation for form sections */
.personal-info-section,
.address-section,
.member-info-section {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2rem;
    }

    .page-hero {
        padding: 60px 0;
    }

    .event-content {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }
}
