/* images.css - Dedicated styles for images */

.headshot-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    vertical-align: middle;
}

.usbc-fade {
    opacity: 0.6;
    animation: fadeInOut 4s linear infinite;
    transition: opacity 0.5s;
    max-width: 520px;
    width: 100%;
    height: 175px;
}

.qr-signup {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 20px 0 !important;
}

.qr-signup img {
    max-width: 180px !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

.usbc-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 20px 0;
}

@keyframes fadeInOut {
    0%   { opacity: 0.2; }
    20%  { opacity: 0.6; }
    50%  { opacity: 1; }
    80%  { opacity: 0.6; }
    100% { opacity: 0.2; }
}

.video-row iframe {
    width: 300px !important;
    height: 170px !important;
    max-width: 90vw;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Base styles from HTML */
body {
    background: linear-gradient(90deg, #1a1a1a 0%, #23235b 100%);
    color: #fff;
}

.tournament-banner {
    background: linear-gradient(90deg, #ca0b0b 0%, #23235b 100%);
    color: #fff;
    text-align: center;
    padding: 32px 0 18px 0;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.tournament-banner h1 {
    font-size: 2.5em;
    font-weight: 900;
    margin: 0;
    letter-spacing: 3px;
    text-shadow: 0 2px 12px #000, 0 1px 0 #211ec0;
}

/* MODIFIED: Flex container for side-by-side layout, aligned left and centered vertically */
.main-content-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap to the next line on smaller screens */
    justify-content: center; /* Centers the whole wrapper horizontally */
    align-items: flex-start; /* Aligns items to the start of the cross-axis (top) */
    gap: 24px; /* Space between the two sections */
    max-width: 1400px; /* Max width for the entire content block */
    margin: 0 auto 32px auto; /* Centers the wrapper itself horizontally */
    padding: 0 20px; /* Add some padding on the sides for smaller screens */
}


.tournament-details {
    /* Individual tournament-details blocks */
    margin-bottom: 32px; /* Keep vertical margin for individual blocks */
    background: rgba(34, 34, 34, 0.98);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    padding: 32px 24px 16px 24px;
    color: #fff;
    /* Flex properties for items within main-content-wrapper */
    flex-basis: calc(50% - 12px); /* A good starting point for two columns (50% minus half the gap) */
    flex-grow: 1; /* Allow it to grow if there's extra space */
    min-width: 350px; /* Minimum width for each column before wrapping */
}

/* MODIFIED: Specific sizing for the Bowling Agenda for left placement and alignment */
.bowling-agenda-section {
    /* Removed conflicting absolute positioning from here */
    /* position: absolute; */
    /* top: 440px; */
    /* left: 32px; */
    /* z-index: 10; */
    /* Existing properties were max-width: 370px; width: 100%; */

    flex-basis: 370px; /* Give it a more fixed width as per your previous design attempt */
    flex-grow: 0; /* Prevent it from growing to take equal space, keeps it more compact */
    flex-shrink: 1; /* Allow it to shrink if needed, but min-width will protect it */
    min-width: 300px; /* Ensure it doesn't get too small */
    order: -1; /* Puts this item first in the flex order */
}

.tournament-details h2 {
    color: #ca0b0b;
    font-size: 1.5em;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.tournament-list {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
}

.tournament-list li {
    background: #23235b;
    color: #fff;
    margin-bottom: 18px;
    border-radius: 10px;
    padding: 18px 20px;
    font-size: 1.2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tournament-list li a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    display: block;
    width: 100%;
}

.tournament-list li a:hover {
    color: #ff9900;
}

.tournament-date {
    font-weight: bold;
    font-size: 1.1em;
}

.tournament-status {
    background: #ca0b0b;
    color: #fff;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.95em;
    margin-left: 10px;
}

.tournament-highlight {
    background: #ca0b0b;
    color: #fff;
    font-weight: bold;
    border-radius: 8px;
    padding: 8px 0;
    text-align: center;
    margin: 18px 0 10px 0;
    font-size: 1.1em;
    letter-spacing: 1px;
}

.side-games {
    background: #23235b;
    color: #fff;
    border-radius: 8px;
    padding: 12px 18px;
    margin: 18px 0 10px 0;
    font-size: 1.05em;
}

.register-btn {
    display: block;
    width: 100%;
    background: #ca0b0b;
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    padding: 14px 0;
    margin: 24px 0 0 0;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
}

.register-btn:hover {
    background: #a00a0a;
}

.tournament-flyer {
    display: block;
    margin: 32px auto 0 auto;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.info-list {
    margin: 18px 0 10px 0;
    color: #fff;
    padding-left: 0;
}

.info-list li {
    margin-bottom: 6px;
    font-size: 1.08em;
}

.highlight-orange {
    color: #ff9900;
    font-weight: bold;
}

.highlight-blue {
    color: #00bfff;
    font-weight: bold;
}

.highlight-red {
    color: #ca0b0b;
    font-weight: bold;
}

.highlight-white {
    color: #fff;
    font-weight: bold;
}

.tournament-footnote {
    text-align: center;
    color: #bbb;
    font-size: 0.9em;
    margin-top: 16px;
}

.sunday-tournaments {
    font-size: 1.1em;
    margin-top: 8px;
    letter-spacing: 1px;
}

.tournament-signup-note {
    text-align: center;
    color: #bbb;
    margin-top: 24px;
}

nav {
    background: #111;
    padding: 10px 0;
    margin-bottom: 32px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.2s;
}

nav ul li a:hover {
    color: #ca0b0b;
}

/* MODIFIED MEDIA QUERIES for responsiveness with new flex layout */
@media (max-width: 1000px) {
    .main-content-wrapper {
        flex-direction: column; /* Stack sections vertically on smaller screens */
        align-items: center; /* Center stacked items */
        margin-left: auto; /* Recenter the wrapper when stacked */
        margin-right: auto;
    }
    .tournament-details {
        max-width: 90%; /* Allow sections to take more width when stacked */
        width: 100%; /* Ensure it takes full width when stacked */
        flex-basis: auto; /* Reset flex-basis when stacked */
        flex-grow: 1; /* Allow growing when stacked */
    }
    .bowling-agenda-section {
        flex-basis: auto; /* Reset flex-basis when stacked */
        flex-grow: 1; /* Allow growing when stacked */
        order: unset; /* Remove explicit order when stacked */
    }
}

@media (max-width: 900px) { /* This media query was also in your original CSS */
    main {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .form-section-right, .video-side, .branding-and-dashboard-container {
        min-width: 0;
        margin: 0 auto 20px auto;
        width: 100%;
        max-width: 100vw;
    }
    .form_container {
        margin: 20px auto;
        max-width: 95vw;
    }
    .video-row {
        flex-direction: column;
        padding-left: 0;
        gap: 20px;
        align-items: center;
    }
    .video-row iframe {
        width: 95vw !important;
        height: 180px !important;
    }
    .headshot-img {
        margin: 0 auto 20px auto;
        display: block;
    }
    /* Removed the conflicting rule for bowling-agenda-section from here as it's handled above */
    /* .bowling-agenda-section {
        position: static;
        max-width: 100vw;
        margin: 0 auto 18px auto;
        top: unset;
        left: unset;
    } */
}

@media (max-width: 600px) {
    header h1, .main-banner h1 {
        font-size: 1.5em;
        padding: 8px 10px;
    }
    .form_container {
        padding: 10px;
    }
    .branding {
        flex-direction: column;
        align-items: center;
    }
    .usbc-fade {
        max-width: 90vw;
        height: auto;
    }
    .qr-signup img {
        max-width: 90vw !important;
        width: 90vw !important;
    }
    .qr-signup {
        width: 100vw;
        overflow-x: auto;
        text-align: center;
    }
    section {
        padding: 10px;
    }
    .main-banner {
        padding: 18px 0 14px 0;
    }
    footer {
        font-size: 0.9em;
        padding: 6px;
    }
    /* Removed the conflicting rule for bowling-agenda-section from here as it's handled above */
    /* .bowling-agenda-section {
        position: static;
        max-width: 100vw;
        margin: 0 auto 18px auto;
    } */
}

/* Original bowling-agenda-section (now commented out/removed from base as Flexbox handles it) */
/* .bowling-agenda-section {
    position: absolute;
    top: 440px;
    left: 32px;
    max-width: 370px;
    width: 100%;
    z-index: 10;
} */

.bowler-note {
    color: #bbb;
    font-size: 0.98em;
    display: block;
    margin-top: 4px;
}

.bowling-agenda-contact {
    margin-top: 12px;
}

.contact-link {
    color: #00bfff;
    text-decoration: underline;
}
