.navbar,
.navbar * {
    color: #000 !important;
}
footer,
footer * {
    color: #ffffff !important;
}

:root {
    --btncolor: #B22222;
    --apply_heading: #1E3A8A;
    --header-bg: #1E3A8A;
    --footer-bg: #1E3A8A;
}

/* Form header styling */
.form-head {
    background-color: var(--apply_heading);
    color: white;
    font-weight: bold;
    padding: 15px;
    text-align: center;
}

/* Button styling */
.btn-primary,
.btn-submit {
    background-color: var(--btncolor);
    border-color: var(--btncolor);
}

.btn-primary:hover,
.btn-submit:hover {
    background-color: var(--btncolor);
    border-color: var(--btncolor);
    opacity: 0.9;
}

.btn-call {
    background-color: var(--btncolor);
    border-color: var(--btncolor);
    color: var(--btn-text-color, white);
}

/* Dynamic text color calculation for call button */
.btn-call,
.btn-call * {
    --btn-text-color: white; /* Default to white for most button colors */
}

/* Fallback: Use contrast-based approach with mix-blend-mode for better readability */
.navbar .btn-call .tracking_href,
.navbar .btn-call .trackingid,
.navbar .btn-call span,
.navbar .btn-call b {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* For very light button colors, override to use dark text */
.btn-call.light-button,
.btn-call.light-button * {
    color: black !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}

/* Event selection styling */
.event-box {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.event-box:hover {
    border-color: var(--btncolor);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.event-box.selected {
    border-color: var(--btncolor);
    border-width: 3px;
    background-color: rgba(27, 99, 169, 0.05);
}

.event-date {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--btncolor);
    margin-bottom: 5px;
}

.event-time {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
}

.event-venue {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.event-address {
    font-size: 0.9rem;
    color: #666;
}

/* Layout */
.content {
    padding-top: 100px;
}

/* Header styles */
.navbar {
    background-color: var(--header-bg);
}

/* Footer styles */
footer {
    background-color: var(--footer-bg);
}

footer p,
footer a {
    color: #ffffff !important;
}

/* Background */
body {
    background: url('bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

/* Form container styling */
.custom-bg-top {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Main content area */
.masthead-minor {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-uppercase {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Logo sizing */
.navbar-brand img {
    max-height: 60px;
}

/* Event info section */
.event-info-section {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.event-info-title {
    color: var(--apply_heading);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.event-info-list {
    list-style: none;
    padding-left: 0;
}

.event-info-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.event-info-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--btncolor);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 40px;
        width: auto;
    }

    .event-box {
        padding: 12px;
        margin: 8px 0;
    }

    .event-date {
        font-size: 1.1rem;
    }

    /* Increase top margin for welcome text on mobile to prevent overlap with fixed navbar */
    .content {
        padding-top: 180px;
    }

    /* Add extra margin to first row on mobile */
    .content .row:first-child {
        margin-top: 20px;
    }
}
