/* ── RESET BOX MODEL ── */
*, *::before, *::after {
    box-sizing: border-box;
}

/* SECTION */
.contact-section {
    padding: 80px 6%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    width: 100%;
    overflow-x: hidden;
}

/* HEADER */
.contact-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 10px;
}

.contact-header h2 {
    font-size: clamp(26px, 4vw, 40px);
    margin-bottom: 10px;
}

.contact-header p {
    opacity: 0.7;
    font-size: 16px;
}

.contact-header h2.typing::after,
.contact-header p.typing::after {
    content: '|';
    display: inline-block;
    margin-left: 3px;
    animation: blinkCursor 0.8s step-end infinite;
    opacity: 0.8;
}

.contact-header p.typing::after {
    opacity: 0.6;
}

@keyframes blinkCursor {
    0%, 49%  { opacity: 0.8; }
    50%, 100% { opacity: 0; }
}

/* ========================= */
/* TABS                      */
/* ========================= */
.form-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
}

.tab-btn i { font-size: 14px; }

.tab-btn:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(59,130,246,0.4);
}

/* GRID — mobile-first: single column always */
.contact-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: 100%;
}

/* Mobile: form (whichever tab is active) shows first, office info follows */
.contact-form {
    order: 1;
}

.contact-info {
    order: 2;
}

/* Two columns on tablet and up */
@media (min-width: 768px) {
    .contact-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 40px;
    }

    /* Restore natural left/right order once side-by-side */
    .contact-info {
        order: 0;
    }

    .contact-form {
        order: 0;
    }
}

/* GLASS CARD */
.contact-info,
.contact-form {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(15px);
    padding: 35px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    word-break: break-word;
    box-sizing: border-box;
}

/* ========================= */
/* TAB PANELS                */
/* ========================= */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeSlideUp 0.45s ease;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* INFO CARD */
.info-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 25px;
}

.info-card i {
    font-size: 20px;
    color: #3b82f6;
    margin-bottom: 4px;
}

.info-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.info-card p {
    font-size: 14px;
    opacity: 0.8;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Fallback .info-item */
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 20px;
    color: #3b82f6;
    min-width: 25px;
}

.info-item h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 14px;
    opacity: 0.8;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* MAP */
.map-wrapper {
    width: 100%;
    overflow: hidden;
}

.map-wrapper iframe {
    width: 100%;
    height: 200px;
    border: 0;
    border-radius: 12px;
    margin-top: 20px;
    display: block;
}

/* DIRECTIONS BUTTON */
.directions-btn {
    display: inline-block;
    margin: 10px 0 20px;
    padding: 10px 20px;
    background: #3b82f6;
    border-radius: 30px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    transition: 0.3s ease;
}

.directions-btn:hover {
    background: #2563eb;
}

/* ========================= */
/* FORM (Contact tab — floating labels) */
/* ========================= */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

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

@media (min-width: 480px) {
    .form-row-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: #fff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group select option {
    background: #0f172a;
    color: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* Floating label (contact form only) */
.form-group label {
    position: absolute;
    left: 14px;
    top: 14px;
    font-size: 14px;
    opacity: 0.6;
    pointer-events: none;
    transition: 0.3s ease;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    background: #0f172a;
    padding: 0 5px;
    opacity: 1;
}

/* Static label override (Suggestion / Reviews tabs) */
.form-group label.static-label {
    position: static;
    display: block;
    top: auto;
    left: auto;
    opacity: 0.85;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    background: none;
    padding: 0;
    pointer-events: auto;
    transition: none;
}

.req {
    color: #ef4444;
}

.required-note {
    font-size: 12px;
    opacity: 0.5;
    margin-top: 8px;
    text-align: right;
}

/* Info / note box */
.form-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    opacity: 0.9;
}

.form-note p {
    margin: 0;
    line-height: 1.5;
}

.form-note i {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59,130,246,0.2);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

/* ========================= */
/* STAR RATING               */
/* ========================= */
.star-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.star-rating i {
    font-size: 24px;
    color: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.star-rating i.active,
.star-rating i:hover {
    color: #facc15;
    transform: scale(1.15);
}

.rating-hint {
    font-size: 13px;
    opacity: 0.6;
    margin-left: 8px;
}

/* SEND BUTTON */
.send-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.03);
}

.send-btn.loading {
    pointer-events: none;
    opacity: 0.75;
}

.btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================= */
/* TOAST NOTIFICATION        */
/* ========================= */
#toastContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -140%);
    min-width: 300px;
    max-width: min(90vw, 420px);
    background: linear-gradient(160deg, #1a2436 0%, #10182a 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid transparent;
    border-radius: 14px;
    padding: 16px 40px 18px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(.34,1.56,.64,1), opacity 0.3s ease;
    pointer-events: all;
    overflow: hidden;
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.toast.success {
    border-left-color: #22c55e;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 32px -8px rgba(34,197,94,0.35);
}

.toast.error {
    border-left-color: #ef4444;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 32px -8px rgba(239,68,68,0.35);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 17px;
    margin-top: 1px;
}

.toast.success .toast-icon {
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34,197,94,0.45);
}

.toast.error .toast-icon {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239,68,68,0.45);
}

.toast-content h5 {
    margin: 0 0 4px;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.1px;
    color: #fff;
}

.toast-content p {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.68);
    line-height: 1.5;
}

.toast-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.toast-close:hover {
    color: #fff;
    transform: scale(1.15);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transform-origin: left;
    animation: toastCountdown 5s linear forwards;
}

.toast.success .toast-progress {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.toast.error .toast-progress {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

@keyframes toastCountdown {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@media (max-width: 480px) {
    .toast {
        min-width: 0;
        width: calc(100vw - 32px);
    }
}

/* ========================= */
/* RESPONSIVE BREAKPOINTS    */
/* ========================= */

@media (max-width: 992px) {
    .contact-info,
    .contact-form {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 60px 4%;
    }

    .contact-header h2 {
        font-size: clamp(22px, 6vw, 32px);
    }

    .contact-container {
        gap: 20px;
    }

    .info-card p,
    .info-item p {
        font-size: 13px;
        word-break: break-all;
        overflow-wrap: anywhere;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .contact-section {
        padding: 50px 4%;
    }

    .contact-header h2 {
        font-size: 22px;
    }

    .contact-info,
    .contact-form {
        padding: 20px;
    }

    .info-item {
        flex-direction: column;
        gap: 8px;
    }

    .map-wrapper iframe {
        height: 180px;
    }

    .directions-btn {
        display: block;
        text-align: center;
    }

    .form-tabs {
        gap: 8px;
    }

    .tab-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Very small screens (≤ 400px) */
@media (max-width: 400px) {
    .contact-section {
        padding: 40px 3%;
    }

    .contact-info,
    .contact-form {
        padding: 16px;
        border-radius: 14px;
    }

    .info-card h4 {
        font-size: 15px;
    }

    .info-card p {
        font-size: 12px;
    }

    .tab-btn span {
        display: none;
    }
}

footer {
    margin-top: 0 !important;
}
