/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: "Proxima Nova", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
}

/* Hero Section with Gradient */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 20%,
        rgba(0, 0, 0, 0.2) 40%,
        rgba(0, 0, 0, 0) 60%
    );
    pointer-events: none;
}

/* Header and Navigation */
header {
    position: absolute;
    width: 100%;
    z-index: 1000;
    padding-top: 20px;
}

.top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    flex: 0 0 auto;
}

.logo img {
    height: 110px;
    width: auto;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-join, .btn-donate {
    padding: 8px 20px;
    text-decoration: none;
    font-weight: 600;
    color: white;
    background-color: #c46d33;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.btn-join:hover, .btn-donate:hover {
    background-color: #b35d2b;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

/* Navigation */
.main-nav {
    max-width: 1400px; /* Increased from 1200px */
    margin: 20px auto 0;
    padding-right: 60px; /* Add right padding */
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
    margin-right: 0; /* Ensure right alignment */
    padding-left: 200px; /* Add left padding to offset from logo */
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Dropdown Indicators */
.has-dropdown > a::after {
    content: "∨";
    display: inline-block;
    margin-left: 8px; /* Increased from 6px */
    font-size: 12px;
    transform: scaleX(1.4) scaleY(0.6);
    opacity: 0.8;
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    list-style: none;
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    color: #333;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: #f8f8f8;
    color: #c46d33;
}

/* Hero Content */
.hero-text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    padding-top: 0px; /* Add padding to create space from header */
}

/* Add these typography rules to ensure text formatting */
.hero-text-container h1 {
    color: white;
    text-align: left;
    margin-bottom: 0;
    font-size: 36px;
}

.hero-text-container h2 {
    color: white;
    text-align: left;
    margin-top: 5px;
    margin-bottom: 25px;
    font-size: 24px;
}

.hero-text-container p {
    color: white;
    text-align: left;
    margin-bottom: 20px;
    font-size: 16px;
}

.hero-text-container em {
    font-style: normal;
}

.cta-button {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 24px;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    background: #333;
    color: white;
}

/* Mission Section */
.mission-section {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.mission-statement {
    font-size: 1.5rem;
    font-style: italic;
    color: #333;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.mission-button {
    display: inline-block;
    padding: 12px 24px;
    background: white;
    color: black;
    text-decoration: none;
    font-weight: 500;
    border: 2px solid black;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mission-button:hover {
    background: black;
    color: white;
}

/* Map Section */
.map-section {
    padding: 2rem;
    background: white;
    max-width: 1200px;
    margin: 0 auto;
}

#map-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#us-map {
    width: 100%;
    height: auto;
}

/* State styling */
.state { 
    fill: #d3d3d3; 
    cursor: pointer;
    transition: fill 0.3s ease;
    pointer-events: all;
}

.state:hover { 
    fill: #87CEEB; 
}

.state.selected { 
    fill: #FFA500; 
}

/* Year selector */
#year-select-container {
    text-align: center;
    margin: 20px auto;
    width: 100%;
    max-width: 1000px;
}

#year-select {
    margin: 0 auto;
    width: 200px;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
}

#year-select:focus {
    outline: none;
    border-color: #c46d33;
}

/* Data Tables */
#data-container {
    max-width: 1000px;
    margin: 20px auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bill-table, .votes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
}

.bill-table th, .votes-table th {
    background-color: #f5f5f5;
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1;
}

.bill-table td, .votes-table td {
    padding: 12px;
    border: 1px solid #ddd;
}

.bill-table tr:nth-child(even), .votes-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Search Functionality */
.votes-header {
    margin-bottom: 20px;
}

.votes-header h2 {
    margin-bottom: 15px;
}

.results-search {
    width: 100%;
    margin-bottom: 20px;
    padding: 0;
}

.results-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.results-search input:focus {
    outline: none;
    border-color: #c46d33;
    box-shadow: 0 0 0 2px rgba(196, 109, 51, 0.1);
}

.results-search input::placeholder {
    color: #999;
}

/* Pagination Controls */
.pagination-controls {
    margin: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination-controls button,
.pagination-controls .current-page {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-controls button:hover {
    background-color: #f5f5f5;
    border-color: #c46d33;
}

.pagination-controls .current-page {
    background-color: #c46d33;
    color: white;
    border-color: #c46d33;
}

/* Links */
.bill-link {
    color: #c46d33;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bill-link:hover {
    color: #a85d2b;
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
}

.contact-info, .social-links {
    flex: 1;
}

.social-links {
    text-align: right;
}

.social-links nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.social-links a {
    color: white;
    text-decoration: none;
    margin: 5px 0;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #c46d33;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}




/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .header-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        margin-top: 0.5rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        text-align: center;
        margin-top: 20px;
    }

    .social-links nav {
        align-items: center;
    }

   .hero-section {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;  /* Add space below the header */
    }
    
    .hero-text-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        padding: 20px;
        margin-top: 80px; /* Increase space below header */
    }
    
    .hero-text-container > div {
        width: 95% !important;
        max-width: 95% !important;
        margin: 0 auto !important;
        padding: 15px !important;
    }
    
    /* Ensure text is readable */
    .hero-text-container p, 
    .hero-text-container li {
        color: white !important;
        font-size: 16px !important;
    }
    
    .hero-text-container h1 {
        font-size: 24px !important;
    }
    
    .hero-text-container h2 {
        font-size: 20px !important;
    }
    
    /* Adjust logo for mobile */
    .logo img {
        height: 60px; /* Make logo slightly smaller on mobile */
    }
    
    /* Add more spacing after the header */
    header {
        padding-bottom: 20px;
    }


    .mission-statement {
        font-size: 1.2rem;
    }
    
	#map-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important; /* Changed from visible to hidden */
    margin: 0 auto !important;
    padding: 10px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  /* Object containing the SVG */
  #us-map {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    transform: none !important; /* Remove any transform */
    margin: 0 auto !important;
  }
    
    /* Force object tag to properly fit contents */
    object {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    
    /* Ensure SVG gets proper dimensions */
    svg {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
    
    /* Table wrapper for better mobile display */
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
    }
    
    /* Make tables scroll horizontally on mobile */
    .bill-table, .votes-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* SVG Map Improvements - this should be OUTSIDE the media query */
.responsive-svg {
    width: 100%;
    height: auto;
    max-width: 100%;
    min-width: 960px;
}

/* Button styling */
.cta-button a,
a.cta-button {
    text-decoration: none;
    color: #333; /* Match your button text color */
}

/* Also add this to maintain hover effect on the text */
.cta-button:hover a,
a.cta-button:hover {
    color: white;
    text-decoration: none;
}

/* Direct fix for both sections */
#bills-section, #votes-section {
    width: 100%;
    margin-bottom: 30px;
}

/* Force tables to have consistent appearance in both sections */
#bills-section table, #votes-section table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    overflow-x: auto;
}

/* Force scrolling on all table containers */
#bills-section, #votes-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

/* Style all table headers consistently */
#bills-section h2, #votes-section h2 {
    margin-bottom: 15px;
}

/* Ensure all table cells have consistent styling */
#bills-section td, #votes-section td,
#bills-section th, #votes-section th {
    padding: 12px;
    border: 1px solid #ddd;
}

/* Ensure zebra striping on all tables */
#bills-section tr:nth-child(even), #votes-section tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Make sure all headers are sticky */
#bills-section th, #votes-section th {
    background-color: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Make pagination consistent */
.pagination-controls {
    flex-wrap: wrap;
    margin: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}