/* Contact Page Styles */

/* Hero Section */
.contact-hero {
    position: relative;
    height: 446px;
    width: 100%;
    overflow: hidden;
    color: #fff;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 2;
}

/* 6% horizontal padding for wide-screen alignment */
.contact-hero-wrapper {
    position: relative;
    z-index: 3;
    padding: 0 6%;
    box-sizing: border-box;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-hero-wrapper .hero-container {
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.hero-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 60px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 600px;
    opacity: 0.9;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* Contact Section — 6% horizontal padding, inner container max 1440px */
.contact-section {
    padding: 100px 6%;
    background: #fff;
    box-sizing: border-box;
}

.contact-section .contact-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

/* Left Column */
.contact-info {
    padding-top: 20px;
}

.eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    margin-bottom: 24px;
}

.section-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 400px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.method-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: #FF5500; /* Orange brand color */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.method-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.method-text .label {
    font-size: 14px;
    color: #999;
}

.method-text .value {
    font-size: 16px;
    color: #111;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.5;
}

/* Right Column (Form Card) */
.contact-form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    padding: 40px;
    border: 1px solid #eee;
}

.form-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
    width: fit-content;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.tab-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.tab-btn.active {
    background: #fff;
    color: #FF5500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.main-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tab-based visibility: hidden attribute must override display so Product/Service dropdowns show only on their tab */
.form-group-product[hidden],
.form-group-service[hidden] {
    display: none !important;
}

.form-group label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.required-mark {
    color: #e85d2a;
}

.field-error {
    display: block;
    font-size: 14px;
    color: #dc2626;
    margin-top: 4px;
    min-height: 18px;
}

.field-error:empty {
    display: none;
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: #dc2626;
}

.phone-input:has(input.invalid) {
    border-color: #dc2626;
}

.form-check .field-error--full {
    flex-basis: 100%;
    margin-top: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.3s;
    background: #f9f9f9;
}

/* Topic dropdown: align arrow and consistent appearance */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    display: block;
    width: 100%;
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.select-wrapper select:focus {
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #FF5500;
    background: #fff;
}

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

.phone-input {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
    overflow: visible;
    position: relative;
}

.phone-input:focus-within {
    border-color: #FF5500;
    background: #fff;
}

/* Country select trigger (replaces flag-select) */
.country-select {
    position: relative;
}

.country-select-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 0 12px;
    background: #f0f0f0;
    border: none;
    border-right: 1px solid #e0e0e0;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    min-height: 44px;
}

.country-select-trigger:hover {
    background: #e8e8e8;
}

.country-select-flag {
    font-size: 18px;
    line-height: 1;
}

.country-select-dial {
    font-weight: 500;
}

.country-select-chevron {
    font-size: 10px;
    color: #666;
    margin-left: 2px;
}

/* Dropdown panel */
.country-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 260px;
    max-width: 320px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    overflow: hidden;
}

.country-select-search {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.country-select-search::placeholder {
    color: #999;
}

.country-select-list {
    max-height: 240px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.country-select-item {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-select-item:hover,
.country-select-item.country-select-item--active {
    background: #fff5f0;
    color: #FF5500;
}

.country-select-item:focus {
    outline: none;
    background: #fff5f0;
}

.phone-input input[type="tel"] {
    border: none;
    background: transparent;
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-size: 14px;
}

.phone-input input[type="tel"]:focus {
    outline: none;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.counter {
    font-size: 12px;
    color: #999;
}

.form-check {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    position: relative;
}

/* Custom checkbox to match form field border (1px solid #e0e0e0, 6px radius) */
.form-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.form-check label {
    position: relative;
    padding-left: 32px;
    cursor: pointer;
}

.form-check label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
    transition: border-color 0.3s, background 0.3s;
    box-sizing: border-box;
}

.form-check input:focus + label::before {
    border-color: #FF5500;
}

.form-check input:checked + label::before {
    background: #e85d2a;
    border-color: #e85d2a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.form-check input:checked:focus + label::before {
    border-color: #e85d2a;
}

.form-check label {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.form-check a {
    color: #FF5500;
    text-decoration: none;
}

.submit-btn {
    background: #FF5500;
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
    width: fit-content;
}

.submit-btn:hover {
    background: #e64d00;
}

/* Responsive */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .section-desc {
        margin: 0 auto 48px;
    }
    
    .contact-methods {
        align-items: stretch;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .method-item {
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 48px 20px 60px;
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-bottom: max(60px, env(safe-area-inset-bottom));
        overflow-x: hidden;
    }

    .contact-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0;
        gap: 40px;
    }

    .contact-form-card {
        width: 100%;
        max-width: 100%;
        padding: 24px 20px;
        box-sizing: border-box;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* 16px prevents iOS from zooming on input focus */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }

    .phone-input input[type="tel"] {
        font-size: 16px;
    }

    .country-select-search {
        font-size: 16px;
    }

    .country-select-dial {
        font-size: 16px;
    }

    .form-tabs {
        width: 100%;
        box-sizing: border-box;
    }

    .tab-btn {
        flex: 1;
        font-size: 12px;
        padding: 10px 8px;
    }

    .hero-title {
        font-size: 32px;
    }
}


/* Global Locations Section — 6% horizontal padding, inner container max 1440px */
.locations-section {
    background-color: #141414;
    padding: 80px 6% 100px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.locations-section .locations-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.locations-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.locations-title {
    font-size: 42px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    margin: 0;
    letter-spacing: 0.26px;
}

/* Map Container — single image with built-in tag markings */
.map-container {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 40px;
}

.map-container .map-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Locations Grid */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    --loc-col-gap: 40px;
    gap: var(--loc-col-gap);
    width: 100%;
    text-align: center;
}

/* Contact page only: footer.css uses same .location-card class with border-right — reset here
   and draw vertical rules centered in the grid gap instead of on the card edge */
.locations-section .locations-grid .location-card {
    border: none !important;
    position: relative;
}

.location-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

/* Vertical dividers in the middle of the column gap (4-up layout) */
@media (min-width: 1025px) {
    .locations-section .locations-grid .location-card:not(:nth-child(4n))::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: calc(100% + (var(--loc-col-gap) / 2) - 0.5px);
        width: 1px;
        background-color: #1e2939;
        pointer-events: none;
    }
}

.location-heading {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin: 0;
    text-transform: uppercase;
}

.text-orange {
    color: #ff6900;
}

.location-address {
    font-size: 14px;
    color: #d1d5dc;
    line-height: 1.6;
}

.location-address p {
    margin: 0;
}

.location-phone {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

/* Responsive — 2×2 tablet only (not mobile; see 768px below) */
@media (max-width: 1024px) and (min-width: 769px) {
    .locations-grid {
        grid-template-columns: repeat(2, 1fr);
        --loc-col-gap: 60px;
        gap: var(--loc-col-gap);
    }

    /* 2×2: only odd columns need a rule to the right (between col 1|2 and 3|4) */
    .locations-section .locations-grid .location-card::after {
        content: none;
    }

    .locations-section .locations-grid .location-card:nth-child(odd)::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: calc(100% + (var(--loc-col-gap) / 2) - 0.5px);
        width: 1px;
        background-color: #1e2939;
        pointer-events: none;
    }
}

/* Single column: rule below full location (heading + address + phone), centered in gap before next card */
@media (max-width: 768px) {
    .locations-grid {
        grid-template-columns: 1fr;
        --locations-stack-gap: 48px;
        gap: var(--locations-stack-gap);
    }

    .locations-section .locations-grid .location-card::after {
        content: none !important;
    }

    .locations-section .locations-grid .location-card:not(:last-child)::after {
        content: '' !important;
        position: absolute;
        top: auto;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(-0.5 * var(--locations-stack-gap) - 0.5px);
        width: min(92%, 400px);
        height: 1px;
        background-color: #1e2939;
        pointer-events: none;
    }
}

/* Brand alert modal (replaces browser alert) */
.brand-alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.brand-alert-overlay[data-visible="true"] {
    opacity: 1;
    visibility: visible;
}
.brand-alert-box {
    background: #fff;
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    padding: 32px 28px 28px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
    text-align: center;
    transform: scale(0.94);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}
.brand-alert-overlay[data-visible="true"] .brand-alert-box {
    transform: scale(1);
}
.brand-alert-header {
    position: relative;
    margin-bottom: 16px;
}
.brand-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #fff;
}
.brand-alert-icon--success {
    background: linear-gradient(135deg, #e85c29 0%, #d64d1f 100%);
    box-shadow: 0 6px 20px rgba(232, 92, 41, 0.4);
}
.brand-alert-icon--error {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.35);
}
.brand-alert-box .brand-alert-icon--success,
.brand-alert-box .brand-alert-icon--error {
    display: none;
}
.brand-alert-box[data-type="success"] .brand-alert-icon--success {
    display: inline-flex;
}
.brand-alert-box[data-type="error"] .brand-alert-icon--error {
    display: inline-flex;
}
.brand-alert-title {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.brand-alert-box[data-type="success"] .brand-alert-title {
    color: #0f172a;
}
.brand-alert-box[data-type="error"] .brand-alert-title {
    color: #b91c1c;
}
.brand-alert-message {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 24px;
    padding: 0 4px;
    max-height: 36vh;
    overflow-y: auto;
}
.brand-alert-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #e85c29;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(232, 92, 41, 0.4);
}
.brand-alert-btn:hover {
    background: #d64d1f;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 92, 41, 0.45);
}
.brand-alert-btn:focus {
    outline: 2px solid #e85c29;
    outline-offset: 2px;
}
.brand-alert-box[data-type="error"] .brand-alert-btn {
    background: #b91c1c;
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.4);
}
.brand-alert-box[data-type="error"] .brand-alert-btn:hover {
    background: #991b1b;
    box-shadow: 0 8px 24px rgba(185, 28, 28, 0.45);
}
.brand-alert-box[data-type="error"] .brand-alert-btn:focus {
    outline-color: #b91c1c;
}