/* ========================================
   SWIMMING EVENTS PLATFORM - MAIN CSS
   ======================================== */

/* ============= VARIABLES ============= */
:root {
    --primary-color: #0099cc;
    --secondary-color: #00b0e6;
    --accent-color: #00d8ff;
    --light-color: #f8fcff;
    --dark-color: #003b4d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* ============= GENERAL ============= */
body {
    background-color: var(--light-color);
    color: #333;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* ============= NAVIGATION ============= */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* ============= HEADER SECTION ============= */
.header-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
    margin-bottom: 60px;
    overflow: hidden;
    border-radius: 0 0 30% 30% / 60px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.header-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255, 255, 255, 0.1)" fill-opacity="1" d="M0,160L48,144C96,128,192,96,288,101.3C384,107,480,149,576,170.7C672,192,768,192,864,202.7C960,213,1056,235,1152,229.3C1248,224,1344,192,1392,176L1440,160L1440,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>');
    background-size: cover;
    background-position: bottom;
    opacity: 0.6;
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23f8fcff" fill-opacity="1" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,213.3C672,224,768,224,864,202.7C960,181,1056,139,1152,144C1248,149,1344,203,1392,229.3L1440,256L1440,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>');
    background-size: cover;
}

.header-section .display-4 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-section .lead {
    font-size: 1.3rem;
    font-weight: 300;
    margin-top: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============= SWIMMING ANIMATED ICONS ============= */
.swimming-icon {
    position: absolute;
    animation: swim 30s linear infinite;
    opacity: 0.1;
}

.swimming-icon:nth-child(1) {
    top: 30%;
    font-size: 2rem;
    animation-duration: 25s;
}

.swimming-icon:nth-child(2) {
    top: 60%;
    font-size: 1.5rem;
    animation-delay: 5s;
    animation-duration: 35s;
}

.swimming-icon:nth-child(3) {
    top: 20%;
    font-size: 1.8rem;
    animation-delay: 10s;
    animation-duration: 30s;
}

@keyframes swim {
    0% {
        left: -50px;
        transform: translateX(0);
    }
    100% {
        left: 100%;
        transform: translateX(0);
    }
}

/* ============= EVENT SELECTOR ============= */
.event-selector-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0 30px;
}

.event-selector {
    display: inline-flex;
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    gap: 10px;
}

.selector-btn {
    background: transparent;
    border: none;
    padding: 15px 35px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
}

.selector-btn .badge {
    background: #e0e0e0;
    color: #666;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.85rem;
    margin-left: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.selector-btn:hover {
    color: var(--primary-color);
}

.selector-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 5px 15px rgba(0, 153, 204, 0.3);
}

.selector-btn.active .badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ============= SLIDER ANIMATIONS ============= */
.events-slider-container {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.event-category {
    min-width: 100%;
    flex-shrink: 0;
    transition: opacity 0.5s ease;
}

.event-category.slide-out-left {
    animation: slideOutLeft 0.5s ease forwards;
}

.event-category.slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

.event-category.slide-out-right {
    animation: slideOutRight 0.5s ease forwards;
}

.event-category.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-20%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(20%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(20%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============= EVENT CARDS (TORNEI) ============= */
.event-wrapper {
    position: relative;
    margin-top: -40px;
}

.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    background-color: white;
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(0, 153, 204, 0.3);
}

.card-img-container {
    position: relative;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 1;
}

.card-body {
    padding: 25px;
    position: relative;
    text-align: center;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

.card-info span {
    display: flex;
    align-items: center;
}

.card-info i {
    margin-right: 5px;
    color: var(--primary-color);
}

/* ============= CHAMPIONSHIP CARDS ============= */
.championship-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.championship-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.championship-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.championship-info {
    flex: 1;
}

.championship-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.championship-subtitle {
    margin: 8px 0 0 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.championship-stages {
    padding: 30px;
    background: linear-gradient(to bottom, #f8fcff, white);
}

.stage-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: white;
    height: 100%;
}

.stage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 153, 204, 0.2);
}

.stage-number {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ============= BUTTONS ============= */
.card .btn {
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 153, 204, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    box-shadow: 0 6px 15px rgba(0, 153, 204, 0.4);
    transform: translateY(-3px);
}

.btn-primary:disabled, 
.btn-primary.disabled {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color)) !important;
    border: none !important;
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-warning {
    background-color: var(--warning-color);
    border: none;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background-color: #ffb400;
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4);
    transform: translateY(-3px);
}

.btn-danger {
    background-color: var(--danger-color);
    border: none;
    color: white;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background-color: #c82333;
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.4);
    transform: translateY(-3px);
}

/* ============= MODALS ============= */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 25px;
    border: none;
}

.modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-body {
    padding: 25px;
}

.modal .btn {
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 500;
}

/* ============= FORMS ============= */
.form-control, 
.form-select {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.form-control:focus, 
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.2);
}

.form-label {
    font-weight: 500;
    color: #444;
}

/* ============= FOOTER ============= */
.footer {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    border-radius: 30% 30% 0 0 / 40px;
}

/* ============= UTILITY CLASSES ============= */
.plus-div {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.plus-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 153, 204, 0.4);
    transition: all 0.3s ease;
}

.plus-button:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 15px 30px rgba(0, 153, 204, 0.5);
}

.coming-soon-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--warning-color);
    color: #333;
    padding: 5px 15px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 1;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    /* Header */
    .header-section {
        padding: 60px 0 80px;
        border-radius: 0 0 15% 15% / 40px;
    }

    /* Selector */
    .event-selector {
        flex-direction: column;
        width: 90%;
        border-radius: 20px;
    }

    .selector-btn {
        padding: 12px 25px;
        font-size: 1rem;
        justify-content: center;
    }

    /* Slider */
    .events-slider-container {
        min-height: 300px;
    }

    /* Cards */
    .card img {
        height: 200px;
    }

    .card-body {
        padding: 20px;
    }

    .card-title {
        font-size: 1.2rem;
    }

    /* Championship */
    .championship-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .championship-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .championship-title {
        font-size: 1.4rem;
    }

    .championship-subtitle {
        font-size: 1rem;
    }

    .championship-stages {
        padding: 20px;
    }

    /* Plus button */
    .plus-button {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
}