/* Ayman Tennis Association - Original Stylesheet */

:root {
    --primary-color: #008000; /* A vibrant tennis green */
    --secondary-color: #FFD700; /* Tennis ball yellow */
    --dark-color: #2c3e50; /* A modern dark blue/grey */
    --light-color: #f4f4f4;
    --text-color: #333;
    --error-color: #D8000C;
    --error-bg: #FFD2D2;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    scroll-behavior: smooth;
}

.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 2rem;
}

/* --- Header & Footer --- */
header {
    background: #fff;
    color: var(--dark-color);
    padding: 1rem 0;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
}

header h1 a {
    text-decoration: none;
    color: inherit;
}

footer {
    background: var(--dark-color);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
}

/* --- General Sections & Buttons --- */
.section {
    padding: 5rem 0;
}

.section-light {
    background: var(--secondary-color);
}

.section h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.section p {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #006400;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* --- Specific Sections (Hero, Features) --- */
.hero {
    background: linear-gradient(to right, var(--primary-color), #006400);
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-text {
    flex-basis: 50%;
    padding-right: 2rem;
}

.hero-text h2 {
    font-size: 4.5rem;
    margin: 0 0 1rem 0;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-image {
    flex-basis: 45%;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 70vh;
}

.features {
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
}

.feature-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Form Styles --- */
.signup-form {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* Important for consistent sizing */
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 128, 0, 0.5);
}

.signup-form .btn {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
}

.signup-form hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

/* ======================================= */
/* === FINAL SIMPLIFIED BRACKET STYLES === */
/* ======================================= */

.bracket-container {
    overflow-x: auto;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
}

.bracket {
    display: flex;
    flex-direction: row;
    min-width: 900px; /* Ensures bracket has enough space on desktop */
}

.round {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center matchups */
    flex: 1; /* Each round will take up equal space */
    position: relative; /* Required for the vertical line */
    padding: 20px;
}

/* The SINGLE VERTICAL line for each round */
.round:not(:last-child)::before {
    content: '';
    position: absolute;
    right: 0;
    top: 5%;  /* Give a little space at the top */
    height: 90%; /* Span most of the height */
    width: 3px;
    background-color: #bbb;
}

.round-title {
    text-align: center;
    font-weight: 700;
    color: var(--dark-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.matchup {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    margin-bottom: 50px; /* This adds the space */
}

/* The HORIZONTAL line coming from each matchup */
.round:not(:last-child) .matchup::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px; /* Extends out from the padding of the round */
    width: 20px;
    height: 3px;
    background-color: #bbb;
}

.participant {
    background: #fff;
    padding: 12px 15px;
    border-radius: 5px;
    border-left: 5px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.participant .score {
    font-size: 0.9em;
    color: #666;
    font-weight: 700;
}

.participant.winner {
    border-color: var(--secondary-color);
    font-weight: 700;
}

/* --- Final Round & Champion Styling --- */
.champion {
    justify-content: center;
    align-items: center;
}

.champion-trophy {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--secondary-color);
    text-align: center;
    font-size: 1.2rem;
    justify-content: center;
    gap: 10px;
}

.champion-trophy .fa-trophy {
    color: var(--secondary-color);
}

/* --- Responsive (Mobile) View --- */
@media (max-width: 768px) {
    .bracket {
        flex-direction: column;
        min-width: unset;
    }
    .round {
        width: 100%;
        margin-bottom: 1rem;
    }
    /* Hide all connector lines on mobile */
    .round::before, .round .matchup::after {
        display: none;
    }
}
/* =================================== */
/* === STYLES FOR ABOUT SECTION V2 === */
/* =================================== */

.about-content {
    display: flex;
    align-items: center; /* Vertically aligns the image and text */
    gap: 3rem; /* Creates space between the image and text */
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-text {
    flex: 1;
}

/* This rule now has a max-width to prevent the image from getting too big */
.about-image img {
    width: 100%;
    max-width: 250px; /* The key change: sets a maximum size */
    height: auto;
}

.about-text p {
    text-align: left; /* Aligns the paragraph text to the left */
    font-size: 1.2rem;
}

/* Make the About section stack vertically on mobile */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column; /* Stacks image on top of text */
        text-align: center;
    }
    .about-text p {
        text-align: center; /* Center the text on mobile */
    }
}
/* =================================== */
/* === ANNOUNCEMENT SECTION STYLES === */
/* =================================== */

.announcement-section {
    background-color: var(--secondary-color); /* Tennis ball yellow */
    padding: 2rem 0;
    border-bottom: 1px solid #e0a800;
}

.announcement-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.announcement-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: var(--dark-color);
    font-weight: 900;
}

.announcement-text p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark-color);
    max-width: none; /* Override default max-width for this section */
    text-align: left;
}

/* Make the announcement stack on mobile */
@media (max-width: 768px) {
    .announcement-content {
        flex-direction: column;
        text-align: center;
    }
    .announcement-text p {
        text-align: center;
        margin-bottom: 1.5rem;
    }
}