/* =========================================
   CONTACT PAGE V2 STYLES
   ========================================= */

/* --- 1. TITLE BAR OVERRIDES --- */
/* We inherit base styles from race-card.css, but ensure spacing here */
.race-title-bar {
    margin-bottom: 2rem;
}

/* Header Info Badge (Office Hours) */
.header-info {
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #eee;
}

/* =========================================
   2. CONTACT GRID LAYOUT
   ========================================= */
.contact-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    /* Info (Narrower) | Form (Wider) */
    gap: 2rem;
    margin-bottom: 4rem;
}

/* --- Shared Card Styles --- */
.contact-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.card-header {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid #f8f8f8;
}

.card-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 800;
    text-transform: uppercase;
}

.card-header p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* --- Left: Info Card --- */
.info-card {
    background: linear-gradient(to bottom right, #ffffff, #fcfdfc);
}

.info-list {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex-grow: 1;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.icon-box {
    width: 45px;
    height: 45px;
    background-color: rgba(26, 71, 42, 0.1);
    /* Primary transparent */
    color: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-text label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-text span,
.info-text a {
    font-size: 1.05rem;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.info-text .highlight {
    color: var(--color-primary);
    font-weight: 800;
}

.info-text .link:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

.info-footer {
    padding: 2rem;
    display: flex;
    justify-content: center;
    opacity: 0.1;
    margin-top: auto;
    pointer-events: none;
}

.watermark-logo {
    max-width: 120px;
    filter: grayscale(100%);
}

/* --- Right: Form Card --- */
.v2-form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #444;
}

.form-control {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #fcfcfc;
    font-family: inherit;
    color: #333;
}

.form-control:focus {
    border-color: var(--color-primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
    /* Primary glow */
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background-color: var(--color-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 71, 42, 0.25);
}

/* Feedback Alert */
.alert {
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.loading-overlay p {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* =========================================
   3. LOCATIONS SECTION (Maps)
   ========================================= */
.locations-section {
    margin-top: 2rem;
}

.section-heading {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    border-left: 5px solid var(--color-secondary);
    padding-left: 1rem;
}

.locations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.location-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.loc-header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.loc-header h4 {
    margin: 0;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.loc-header span {
    font-size: 0.8rem;
    color: #666;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.map-wrapper {
    height: 350px;
    width: 100%;
    position: relative;
    background: #eee;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.loc-actions {
    padding: 1rem;
    text-align: center;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.btn-map-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: background 0.2s;
    background-color: #f8f9fa;
    border: 1px solid #eee;
}

.btn-map-link:hover {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    border-color: var(--color-secondary);
}

/* Helpers */
.hidden {
    display: none !important;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 992px) {
    .contact-grid-v2 {
        grid-template-columns: 1fr;
        /* Stack Info and Form */
    }

    .info-card {
        order: 2;
        /* Put form first on mobile, or keep order:1 for info */
    }
}

@media (max-width: 768px) {
    .race-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .race-controls-wrapper {
        width: 100%;
    }

    .header-info {
        width: 100%;
        justify-content: center;
    }

    .locations-grid {
        grid-template-columns: 1fr;
        /* Stack maps */
    }

    .card-header,
    .v2-form,
    .info-list {
        padding: 1.5rem;
    }
}