/* Universal box-sizing rule for intuitive layout */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Enhanced Dark Theme with Gradient & Mobile First Styles */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #121218; /* Fallback for older browsers */
    /* New subtle pink and black blended background */
    background-image: radial-gradient(ellipse at bottom right, rgba(255, 0, 122, 0.15) 0%, #121218 70%);
    color: #E0E0E0;
    background-attachment: fixed; /* Makes gradient stay in place on scroll */
}

.container { /* General container style */
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(26, 26, 46, 0.8); /* Dark translucent, plays with body gradient */
    backdrop-filter: blur(5px); /* Frosted glass effect for supported browsers */
    color: #FFFFFF;
    padding: 0.6rem 0; /* Reduced padding to make header smaller */
    border-bottom: 2px solid #FF007A; /* Pink accent border */
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Needed for absolute positioning of nav.is-active */
}

#headerEmblem {
    max-height: 120px;
    width: auto;
    margin-right: 15px;
}

nav {
    flex-grow: 1;
}

nav ul {
    padding: 0;
    list-style: none;
    margin: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 8px;
}

nav ul li:last-child {
    margin-right: 0;
}

nav a {
    color: #E0E0E0;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

nav a:hover, nav a.active {
    color: #FFFFFF;
    background-color: #FF007A;
}

.social-icons-header {
    display: flex;
    align-items: center;
    margin-left: auto;
}
.social-icons-header a {
    margin-left: 12px;
    display: inline-block;
    line-height: 0;
}
.social-icons-header img {
    height: 24px;
    width: 24px;
    vertical-align: middle;
    transition: opacity 0.3s;
}
.social-icons-header img:hover {
    opacity: 0.8;
}

/* Announcement Bar Styles */
.announcement-bar-container {
    background-color: #FF007A;
    color: #FFFFFF;
    padding: 10px 0;
    text-align: center;
    overflow: hidden;
    position: relative;
    z-index: 999;
}

.announcement-bar {
    position: relative;
    height: 1.6em; /* Adjust based on font size to prevent layout jump */
}

.announcement-item {
    display: none;
    width: 100%;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    left: 0;
    right: 0;
}

.announcement-item.active {
    display: block;
    opacity: 1;
}

.announcement-item a { /* Style for links within announcements */
    color: #FFFFFF;
    text-decoration: underline;
    font-weight: bold;
}
.announcement-item a:hover {
    text-decoration: none;
}

.main-content {
    padding: 30px 0;
}

.video-placeholder { /* Used in index.html */
    background: #1F1F24;
    padding: 25px;
    margin-bottom: 25px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #28282E;
    border-radius: 8px;
    color: #A0A0A0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
 .video-placeholder iframe { /* Used in index.html */
    border-radius: 5px;
    border: none;
    max-width: 100%;
}


.content-section { /* Used in index.html, about.html, clubcontact.html, live-streams.html */
    background: #1F1F24;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.content-section h2 {
    color: #FF007A;
    margin-top: 0;
    border-bottom: 1px solid #38383E;
    padding-bottom: 15px;
    font-size: 1.8rem;
}
.content-section h3 { /* Used in about.html, clubcontact.html */
    color: #FF007A;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.5rem; /* For about.html subheadings */
}
/* Ensuring specificity for clubcontact.html h3 if needed */
#club-outreach .content-section h3 {
    color: #E0E0E0; /* As it was in clubcontact.html */
    border-bottom: none;
    padding-bottom: 0;
}
.content-section p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #E0E0E0; /* Default paragraph color within content sections */
}
.content-section strong {
     color: #F0F0F0;
}
.content-section ul { /* For clubcontact.html */
    margin-bottom: 15px;
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
}
.content-section ul li { /* For clubcontact.html */
    margin-bottom: 8px;
}
.content-section a { /* For clubcontact.html */
    color: #FF007A;
    text-decoration: none;
}
.content-section a:hover {
    text-decoration: underline;
}

/* Styles specific to clubcontact.html form & value prop */
.value-prop-section {
    margin-bottom: 30px;
    line-height: 1.7;
}
.value-prop-section h3 {
    color: #FF007A;
    margin-bottom: 10px;
    font-size: 1.4rem;
    border-bottom: none;
    padding-bottom: 0;
}
.content-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #C0C0C0;
}
.content-section input[type="text"],
.content-section input[type="email"],
.content-section textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #38383E;
    background-color: #28282E;
    color: #E0E0E0;
    font-size: 1rem;
}
.content-section input[type="text"]:focus,
.content-section input[type="email"]:focus,
.content-section textarea:focus {
    border-color: #FF007A;
    outline: none;
}
.content-section textarea {
    min-height: 150px;
    resize: vertical;
}
.social-icons-footer { /* clubcontact.html */
    text-align: left;
    margin-top: 10px;
}
.social-icons-footer a {
    margin-left: 12px;
    display: inline-block;
    line-height: 0;
}
.social-icons-footer a:first-child {
    margin-left: 0;
}
.social-icons-footer img {
    height: 24px;
    width: 24px;
    vertical-align: middle;
    transition: opacity 0.3s;
}
.social-icons-footer img:hover {
    opacity: 0.8;
}


.button-pink {
    display: inline-block;
    background-color: #FF007A;
    color: #FFFFFF; /* Default text color for pink buttons */
    padding: 12px 25px;
    text-decoration: none;
    border: none; /* Added for button type */
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s, color 0.3s; /* Added color to transition */
    box-shadow: 0 2px 5px rgba(255, 0, 122, 0.3);
    cursor: pointer; /* Added for button type */
}

.button-pink:hover {
    background-color: #E0006C;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    padding: 25px 0;
    background: rgba(26, 26, 46, 0.7);
    color: #A0A0A0;
    margin-top: 40px;
    border-top: 1px solid #28282E;
}

/* Hamburger Menu Styles */
.menu-toggle {
    display: none; /* Hidden by default, shown on mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    padding: 5px;
    margin-left: auto; /* Push to the right by default, overridden on mobile */
    z-index: 1001; /* Ensure it's above other elements */
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #FF007A; /* Pink color for the bars */
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Initial state of navigation for mobile: hidden */
nav {
    display: none; /* Hide nav by default for mobile-first */
    flex-grow: 1; /* Retain flex-grow for larger screens */
}

/* Active state for the menu toggle (e.g., when open) */
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Styles for when the menu is active (open) */
nav.is-active {
    display: flex; /* Show the nav when active */
    flex-direction: column; /* Stack menu items vertically */
    position: absolute;
    top: 100%; /* Position below the header */
    left: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95); /* Darker, less transparent background for menu */
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    border-top: 1px solid #38383E;
    padding: 20px 0;
    text-align: center;
}

nav.is-active ul {
    flex-direction: column;
    width: 100%;
}

nav.is-active ul li {
    display: block; /* Each list item takes full width */
    margin: 10px 0; /* Vertical spacing for menu items */
}

nav.is-active ul li a {
    padding: 10px 20px;
    display: block; /* Make links fill the button area */
    border-radius: 0; /* Remove border-radius for full-width items */
}

/* Map specific styles - from map.html */
.map-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.sport-filter-container,
.location-search-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
}

.sport-filter-container label,
.location-search-container label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #E0E0E0;
}

#sportSelector,
#locationSearchInput {
    padding: 10px 15px;
    border-radius: 5px;
    background-color: #1F1F24;
    color: #E0E0E0;
    border: 1px solid #38383E;
    font-size: 1rem;
    width: 100%;
}

#locationSearchInput {
     flex-grow: 1;
}

#sportSelector:focus,
#locationSearchInput:focus {
    outline: none;
    border-color: #FF007A;
    box-shadow: 0 0 0 2px rgba(255, 0, 122, 0.3);
}

.location-search-container div {
     display: flex;
     width: 100%;
}

#locationSearchButton {
    padding: 10px 15px;
    background-color: #FF007A;
    color: #FFFFFF; /* Default text color for this button */
    border: none;
    border-radius: 0 5px 5px 0;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
    height: 42px; /* Adjusted for consistency with input field */
    margin-left: -1px; /* To visually merge with input */
}
#locationSearchInput { /* Ensure input border radius is correct */
    border-radius: 5px 0 0 5px;
}

#locationSearchButton:hover {
    background-color: #E0006C;
}

#map-message-box {
    position: absolute;
    top: 10px; /* Adjusted from 70px as header height might vary slightly */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 0, 122, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1001; /* Ensure it's above map tiles, below header if header moves */
    display: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 80%;
}
 #map-message-box.error {
    background-color: rgba(211, 47, 47, 0.9);
}

#map {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 25px;
    position: relative; /* for #map-message-box positioning */
    background-color: #333; /* Darker placeholder background for map div */
}
.leaflet-marker-icon.sport-ball-icon { /* Ensure Leaflet custom icons are not affected by default marker styles */
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Live Streams Page Specific Styles (Old video-grid, kept for reference if needed) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.video-item { /* This was for the old live stream items, may not be used now */
    background: #28282E;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.video-item h3 { /* For old video item titles */
    color: #E0E0E0;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: none;
    padding-bottom: 0;
}
.video-item p { /* For old video item descriptions */
    font-size: 0.9rem;
    color: #A0A0A0;
    margin-bottom: 10px;
    flex-grow: 1;
}
.video-item .video-thumbnail {
    width: 100%;
    height: 180px;
    background-color: #38383E;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E0E0E0;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}
.video-item .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-item .video-thumbnail .play-icon {
    position: absolute;
    font-size: 3rem;
    color: rgba(255, 0, 122, 0.8);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}
/* End of Old Live Streams Page Specific Styles */


/* === Styles for Upcoming Games (from live-streams.html, Adapted for Dark Theme) === */

.upcoming-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px; /* Added a bit more margin */
}

.game-category {
    border: 1px solid #38383E;
    border-radius: 8px;
    padding: 20px; /* Increased padding */
    background-color: #24242A; /* Slightly different dark background for category box */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2); /* Subtle shadow */
}

.game-category h3 { /* Titles like "Cricket", "Netball", "Rugby Union" */
    margin-top: 0;
    margin-bottom: 15px; /* Space below category title */
    color: #FF007A; /* Pink accent color */
    border-bottom: 2px solid #FF007A; /* Pink accent border */
    padding-bottom: 8px; /* Space for border */
    font-size: 1.5rem; /* Adjusted size */
}

/* Paragraphs directly under .game-category (e.g., "While specific East Sussex...") */
.game-category > p { /* Using > for direct children paragraphs */
    color: #B0B0B0; /* Lighter grey for readability */
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}
.game-category > p em { /* Style for italicized text within these paragraphs */
    color: #c8c8c8; /* Slightly brighter for emphasis */
}


.game-item { /* Individual game listing box */
    background-color: #2E2E34; /* Darker card item background */
    border: 1px solid #404046; /* Slightly lighter border for item */
    border-radius: 6px; /* Slightly smaller radius */
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.game-item h4 { /* Game titles like "Newick CC I vs Eastbourne CC II" */
    margin-top: 0;
    margin-bottom: 8px;
    color: #E8E8E8; /* Bright light color for game titles */
    font-size: 1.15rem; /* Slightly larger */
}

.game-item p { /* Details within each game item */
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #B8B8B8; /* Light grey for details */
}

.game-item p strong {
    color: #DCDCDC; /* Lighter color for strong elements */
}

.game-item ul { /* For the list of fixtures in rugby section */
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
    margin-bottom: 10px;
    margin-top: 5px; /* Added margin top */
}
.game-item ul li {
    margin-bottom: 5px;
    color: #B8B8B8; /* Match paragraph color */
}
.game-item em { /* For italicized notes within a game item */
    color: #c8c8c8;
    font-size: 0.85em;
}


.coming-soon-note { /* Note about live streams coming soon */
    background-color: #3D2F00; /* Darker, richer gold/brown background */
    border: 1px solid #8C6D00; /* Gold border */
    color: #FFDEAD; /* Light gold/Navajo white text */
    padding: 15px 20px;
    margin: 25px 0;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.coming-soon-note p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.5; /* Added for better readability if text wraps */
}

.coming-soon-note p strong { /* For "Exciting News!" part */
    color: #FFF59D; /* Brighter, creamy yellow for emphasis */
    font-weight: bold; /* Ensure it's bold */
}

/* === End of Styles for Upcoming Games === */


/* Responsive Adjustments */
@media (max-width: 767px) {
    header .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
    }

    #headerEmblem {
        grid-column: 1 / 2;
        max-height: 100px;
    }

    .menu-toggle {
        display: flex;
        grid-column: 2 / 3;
        justify-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    nav {
        display: none;
        grid-column: 1 / -1;
    }

    .social-icons-header {
        display: none; /* Hidden on mobile by default in this layout */
        grid-column: 3 / 4;
        justify-self: end;
    }
    /* Map specific responsive */
    .map-controls { flex-direction: column; align-items: stretch; }
    .sport-filter-container, .location-search-container { max-width: 100%; }
    .sport-filter-container label, .location-search-container label { margin-bottom: 8px; margin-right: 0; }
    #locationSearchInput { margin-right: 0; margin-bottom: 0; }
    .location-search-container div { width: 100%; }
    #locationSearchButton { width: auto; } /* Let it size based on padding */

    /* Upcoming games responsive */
    .upcoming-games-grid {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
    .game-category {
        padding: 15px;
    }
    .game-item {
        padding: 12px;
    }
}

@media (min-width: 768px) {
    header .container {
        display: flex;
        justify-content: flex-start;
    }
    .menu-toggle {
        display: none;
    }

    nav {
        display: flex !important; /* Use !important to override the initial mobile display:none if needed, or manage class toggling carefully */
        position: static;
        background: none;
        box-shadow: none;
        border-top: none;
        padding: 0;
        flex-direction: row; /* Explicitly set for nav itself */
    }

    nav ul {
        flex-direction: row;
        text-align: center;
    }

    nav ul li {
        display: inline;
        margin: 0 12px;
    }

    .social-icons-header {
        display: flex;
        margin-left: auto;
    }
    #headerEmblem {
        max-height: 140px;
        margin-right: 20px;
    }
}
 @media (min-width: 1024px) {
    #headerEmblem {
        max-height: 160px;
    }
 }
 @media (max-width: 400px) {
    #headerEmblem {
        max-height: 80px; /* Further reduced for very small screens */
    }
    .social-icons-footer { /* clubcontact.html */
        text-align: center;
    }
    .social-icons-footer a {
        margin: 0 8px; /* Adjust spacing */
    }
 }

/* Style for specific button text colors to make them black */
#watch-featured-button,
#watch-live-button,
#view-details-button-1,
#view-details-button-2,
#feature-contact-button {
    color: #000000; /* Black text color */
}

