/* 
 * Color Palette Variables:
 * --gop-blue: #002D62 (Deep Navy)
 * --gop-red: #BF0A30 (Patriotic Red)
 * --gop-white: #F5F5F5 (Off-White)
 * --gop-light-gray: #e9ecef
 */
 :root {
    --gop-blue: #002D62;
    --gop-red: #BF0A30;
    --gop-white: #F5F5F5;
    --gop-light-gray: #e9ecef;
    --gop-dropdown-hover: #dae0e5;
    --social-zoom-scale: 1.3;
    --map-embed-height: 300px; 

    /* Bootstrap color overrides */
    --bs-primary: var(--gop-blue);
    --bs-primary-rgb: 0, 45, 98;
    --bs-secondary: var(--gop-light-gray);
    --bs-secondary-rgb: 233, 236, 239;
    --bs-success: #28a745; /* Default green for success (price) */
    --bs-success-rgb: 40, 167, 69;
    --bs-danger: var(--gop-red);
    --bs-danger-rgb: 191, 10, 48;
    --bs-light: var(--gop-white);
    --bs-light-rgb: 245, 245, 245;
    --bs-dark: #212529;
    --bs-dark-rgb: 33, 37, 41;
    --bs-body-bg: #f4f4f4;
    --bs-body-color: #333;

    /* Carousel overrides */
    --bs-carousel-indicator-active-bg: var(--gop-blue);
    --bs-carousel-control-color: #fff;
    --bs-carousel-control-bg: rgba(0, 0, 0, 0.5);
    --bs-carousel-caption-color: #fff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
}

/* Header and navigation styling */
.logo-img {
    height: auto;
    max-width: 24rem; 
    width: 100%;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.12);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
}

.nav-menu li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.nav-menu li a {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.nav-menu li a:hover,
.nav-menu .active a {
    background-color: var(--gop-red);
    color: #fff !important;
    font-weight: bolder;
}

@media (min-width: 768px) {
    .nav-menu {
        flex-direction: row;
        align-items: center;
    }

    .nav-menu li {
        margin-right: 1rem;
        margin-bottom: 0;
    }

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

    .nav-menu .dropdown .dropdown-content {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 10rem;
        background-color: #fff;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        border-radius: 0.25rem;
        display: none;
        z-index: 1000;
    }

    .nav-menu .dropdown:hover .dropdown-content {
        display: block;
    }

    .nav-menu .dropdown-item {
        padding: 0.5rem 1rem;
        color: #333;
        text-decoration: none;
        display: block;
    }

    .nav-menu .dropdown-item:hover {
        background-color: var(--gop-dropdown-hover);
        font-weight: bolder;
    }
}

/* Mobile Responsiveness */
@media (max-width: 767.98px) { /* Bootstrap's sm breakpoint */
    .photo-jumbotron .carousel-inner {
        height: 300px !important; /* Reduced height for mobile */
        max-height: 50vh; /* Adjust based on screen size */
    }

    .events-jumbotron .carousel-inner {
        height: 200px !important; /* Reduced height for mobile */
        max-height: 40vh; /* Adjust based on screen size */
    }

    .photo-jumbotron .carousel-item img,
    .events-jumbotron .carousel-item img {
        object-fit: cover !important; /* Ensure images fill the space on mobile */
    }
}

/* Hero section styling */
.hero {
    background-color: var(--gop-light-gray);
    border-radius: 10px;
}

/* Specific hero sizes for different pages */
.hero-photos {
    max-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-events {
    max-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Elected Officials Page Styles */

/* Filter buttons container */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

/* Individual filter button style */
.filter-button {
    background-color: #e2e6ea;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: 500;
}

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

.filter-button.active {
    background-color: var(--gop-blue);
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Officials grid container */
.officials-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Individual official card */
.official-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.official-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    object-position: center;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #212529;
    font-weight: 600;
}

.card-content p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.card-content a {
    color: var(--gop-blue);
    text-decoration: none;
    font-weight: 500;
}

.card-content a:hover {
    text-decoration: underline;
}

/* Contact Us Page Styles */

h2 {
    color: #212529;
    font-weight: 600;
    margin-bottom: 20px;
}

form {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gop-blue);
    box-shadow: 0 0 0 2px rgba(0, 45, 98, 0.25);
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

legend {
    font-size: 1.1em;
    font-weight: 600;
    padding: 0 10px;
    color: #212529;
}

button[type="submit"] {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--gop-blue);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

button[type="submit"]:hover {
    background-color: #001f44;
    transform: translateY(-2px);
}

/* Tooltip styles */
.tooltip-container {
    position: relative;
    cursor: pointer;
}

.tooltip-container::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

.tooltip-container:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Messages */
p[style="color: red;"] {
    color: var(--gop-red) !important;
    background-color: #f8d7da;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

p[style="color: green;"] {
    color: #28a745 !important;
    background-color: #d4edda;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

/* Events Page Styles */
.events-jumbotron {
    background-color: var(--gop-light-gray);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.events-jumbotron .carousel-inner img {
    width: 100%;
    height: auto;
    max-height: 400px; /* Adjust as needed for hero size */
    object-fit: cover;
}

.events-jumbotron .carousel-control-prev,
.events-jumbotron .carousel-control-next {
    background-color: rgba(0, 45, 98, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.3s;
}

.events-jumbotron .carousel-control-prev:hover,
.events-jumbotron .carousel-control-next:hover {
    background-color: rgba(0, 45, 98, 0.7);
}

.events-jumbotron .carousel-indicators button {
    background-color: var(--gop-blue);
}

.events-jumbotron .carousel-indicators .active {
    background-color: var(--gop-red);
}

.photo-jumbotron {
    background-color: var(--gop-light-gray);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.photo-jumbotron .carousel-inner {
    height: 600px !important; /* Ensure fixed height */
    position: relative; /* Ensure proper positioning */
}

.photo-jumbotron .carousel-item {
    height: 100% !important; /* Match container height */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important; /* Center images */
    position: absolute !important; /* Ensure only one slide is visible */
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.6s ease, opacity 0.6s ease; /* Smooth transitions */
    opacity: 0;
}

.photo-jumbotron .carousel-item.active {
    opacity: 1; /* Show only the active slide */
    z-index: 1; /* Ensure active slide is on top */
}

.photo-jumbotron .carousel-item img {
    max-height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important; /* Ensure full image visibility */
    width: auto !important; /* Allow natural width */
    height: auto !important; /* Allow natural height */
}

#events-container iframe {
    height: var(--map-embed-height);
    max-height: var(--map-embed-height);
    width: 100%;
}

.btn-primary {
    background-color: var(--gop-blue);
    border-color: var(--gop-blue);
}

.btn-primary:hover {
    background-color: #001f44;
    border-color: #001f44;
}

.btn-gop-red {
    background-color: #C8102E; /* GOP Red */
    border-color: #C8102E;
    color: #ffffff; /* White text for contrast */
}
.btn-gop-red:hover {
    background-color: #A50D27; /* Darker shade for hover */
    border-color: #A50D27;
    color: #ffffff;
}
.btn-gop-red:focus,
.btn-gop-red:active {
    background-color: #C8102E !important; /* Ensure focus/active states */
    border-color: #C8102E !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(200, 16, 46, 0.5); /* Matching outline */
}

.text-primary {
    color: var(--gop-blue) !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-success {
    color: #28a745 !important;
}

hr.border-primary-subtle {
    border-color: rgba(0, 45, 98, 0.3) !important;
}

.space-y-2 {
    margin-top: 0.5rem !important;
}

.fs-2 {
    font-size: 2rem !important;
}

.fs-sm-1 {
    font-size: 1.5rem !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fs-3 {
    font-size: 1.75rem !important;
}

.fs-4 {
    font-size: 1.25rem !important;
}

.fs-5 {
    font-size: 1rem !important;
}

.list-unstyled {
    list-style: none !important;
}

.ps-4 {
    padding-left: 1rem !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.ratio-4x3 {
    aspect-ratio: 4 / 3 !important;
}

.rounded-3 {
    border-radius: 0.25rem !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.ratio {
    position: relative;
    width: 100%;
}

.ratio::before {
    display: block;
    padding-top: 75%; /* 4:3 aspect ratio */
    content: "";
}

.ratio > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
}

.rounded-pill {
    border-radius: 50rem !important;
}

.px-5 {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.text-center {
    text-align: center !important;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between icons */
    margin-top: 10px;
    justify-content: center;
}
.social-links a {
    text-decoration: none;
}
.social-links svg {
    transition: transform 0.2s;
}
.social-links a:hover svg {
    transform: scale(var(--social-zoom-scale)); /* Slight zoom on hover */
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    vertical-align: middle;
}
.footer-social a:hover svg {
    transform: scale(var(--social-zoom-scale)); 
    transition: transform 0.2s;
}

.tooltip-container {
    position: relative;
    cursor: pointer;
}
.tooltip-container::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
    font-size: 0.875rem;
}
.tooltip-container:hover::after {
    opacity: 1;
    visibility: visible;
}

.bio-section {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.bio-text {
    flex: 2;
}

.bio-photo {
    flex: 1;
    max-width: 280px;   /* adjust until it looks balanced */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* Mobile layout: stack text and image */
@media (max-width: 767.98px) {
    .bio-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .bio-photo {
        max-width: 70%;
        margin-top: 15px;
    }
}

/* --- CSS for Postponed Banner Overlay --- */

/* 1. Ensure the jumbotron is the positioning context for the banner */
.events-jumbotron.postponed-weather {
    /* Required to position the banner absolutely inside the jumbotron */
    position: relative; 
    /* The banner is draped OVER the content */
    z-index: 10; 
}

/* 2. Style and position the red banner */
.postponed-banner {
    /* Banner appearance */
    background-color: #dc3545; /* Bootstrap Red (Danger) */
    color: white;
    font-size: 2.5rem; /* Large text */
    font-weight: bold;
    text-align: center;
    padding: 1rem 0;
    
    /* Absolute Positioning to drape over the content */
    position: absolute;
    top: 20%; /* Move it down from the top */
    left: -10%; /* Extend past the left edge */
    width: 120%; /* Extend past the right edge */
    z-index: 1000; /* Ensure it's above all carousel items */
    
    /* Rotation for the draped effect */
    transform: rotate(-5deg); 
    
    /* Make the banner slightly transparent to see content underneath */
    opacity: 0.95; 
    
    /* Optional: Add a subtle shadow */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    
    /* Optional: For smaller screens, adjust font size */
    word-break: break-word;
}

/* Optional: Media query for smaller screens */
@media (max-width: 576px) {
    .postponed-banner {
        font-size: 1.5rem;
        padding: 0.75rem 0;
        top: 15%;
        left: -20%;
        width: 140%;
    }
}