:root {
    --contact-red: #1a73e8;
    --contact-red-dark: #1765cc;
    --contact-text: #202124;
    --contact-muted: #5f6368;
    --contact-bg: #f8f9fa;
    --contact-card: #ffffff;
    --contact-border: #dadce0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Roboto, Arial, sans-serif;
    background: var(--contact-bg);
    color: var(--contact-text);
}

.contact-page {
    width: 100%;
}

.contact-hero {
    background: #fff;
    color: #202124;
    padding: 36px 16px 32px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #dadce0;
}

.contact-hero::before,
.contact-hero::after {
    display: none;
}

.contact-hero::before {
    width: 260px;
    height: 260px;
    top: -80px;
    right: -80px;
}

.contact-hero::after {
    width: 190px;
    height: 190px;
    bottom: -80px;
    left: -70px;
}

.contact-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-kicker {
    margin: 0 0 10px;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: #1a73e8;
    font-weight: 700;
}

.contact-hero h1 {
    margin: 0;
    max-width: 700px;
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.15;
}

.hero-subtitle {
    margin: 16px 0 0;
    max-width: 680px;
    color: #5f6368;
    font-size: 1rem;
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-btn:hover {
    transform: translateY(-1px);
}

.hero-btn-primary {
    background: var(--contact-red);
    color: #fff;
}

.hero-btn-primary:hover {
    background: var(--contact-red-dark);
}

.hero-btn-secondary {
    border: 1px solid #dadce0;
    color: #1a73e8;
    background: #fff;
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.13);
}

.contact-main-section {
    margin-top: 0;
    padding: 24px 20px 34px;
    position: relative;
    z-index: 2;
}

.contact-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.contact-info-panel,
.contact-form-panel {
    background: var(--contact-card);
    border: 1px solid var(--contact-border);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(10, 25, 55, 0.08);
    padding: 26px;
}

.contact-info-panel h2,
.contact-form-panel h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.panel-intro {
    margin: 0;
    color: var(--contact-muted);
    font-size: 0.95rem;
}

.info-list {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.info-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border-radius: 10px;
    background: #f7f9fd;
    border: 1px solid #edf1f8;
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8f1fd;
    color: #1a73e8;
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.info-icon i {
    color: #1a73e8;
}

.info-item h3 {
    margin: 1px 0 4px;
    font-size: 1rem;
}

.info-item p,
.info-item a {
    margin: 0;
    color: var(--contact-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.info-item a {
    color: var(--contact-red);
    font-weight: 600;
}

.info-item a:hover {
    text-decoration: underline;
}

.contact-form {
    margin-top: 18px;
}

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

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

.form-group label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group label span {
    color: var(--contact-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #d8e1f0;
    background: #fff;
    color: var(--contact-text);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-input-wrap {
    width: 100%;
    border: 1px solid #d8e1f0;
    background: #fff;
    border-radius: 10px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-prefix {
    color: #44516b;
    font-size: 0.92rem;
    font-weight: 700;
}

.form-group .phone-input-wrap input,
.form-group .phone-input-wrap input:hover,
.form-group .phone-input-wrap input:focus {
    width: auto;
    min-width: 0;
    flex: 1;
    border: 0;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    appearance: none;
    padding-left: 0;
    padding-right: 0;
}

.phone-input-wrap:focus-within {
    border-color: #9aabcb;
    box-shadow: 0 0 0 3px rgba(125, 150, 190, 0.2);
}

.phone-validity-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    visibility: hidden;
}

.phone-input-wrap.is-valid {
    border-color: #1f9d46;
    box-shadow: 0 0 0 3px rgba(31, 157, 70, 0.14);
}

.phone-input-wrap.is-valid .phone-validity-icon {
    visibility: visible;
    background: #1f9d46;
    color: #fff;
}

.phone-input-wrap.is-valid .phone-validity-icon::before {
    content: "✓";
}

.phone-input-wrap.is-invalid {
    border-color: #d01a1a;
    box-shadow: 0 0 0 3px rgba(208, 26, 26, 0.12);
}

.phone-input-wrap.is-invalid .phone-validity-icon {
    visibility: visible;
    background: #d01a1a;
    color: #fff;
}

.phone-input-wrap.is-invalid .phone-validity-icon::before {
    content: "✕";
}

.phone-validation-text {
    margin: 6px 0 0;
    min-height: 18px;
    font-size: 0.8rem;
    color: #64748b;
}

.phone-validation-text.error {
    color: #b91c1c;
}

.phone-validation-text.success {
    color: #166534;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9aabcb;
    box-shadow: 0 0 0 3px rgba(125, 150, 190, 0.2);
}

.service-select {
    position: relative;
}

.service-select-trigger {
    width: 100%;
    border: 1px solid #d8e1f0;
    background: #fff;
    color: var(--contact-text);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    min-height: 46px;
}

.service-select-trigger:focus {
    outline: none;
    border-color: #9aabcb;
    box-shadow: 0 0 0 3px rgba(125, 150, 190, 0.2);
}

.service-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: min(280px, 52vh);
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d8e1f0;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(10, 25, 55, 0.12);
    z-index: 8;
    padding: 6px;
}

.service-option {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    color: var(--contact-text);
    min-height: 42px;
}

.service-option:hover {
    background: #f3f6fb;
}

.service-option img,
.service-option-fallback {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.service-option-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffecec;
    color: var(--contact-red);
}

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

.contact-submit-btn {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    background: var(--contact-red);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-submit-btn:hover {
    background: var(--contact-red-dark);
}

.contact-submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.form-status {
    margin: 10px 0 0;
    min-height: 22px;
    font-size: 0.9rem;
    color: var(--contact-muted);
}

.form-status.success {
    color: #0c8a39;
}

.form-status.error {
    color: #be1a1a;
}

.contact-success-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: #0f6f33;
    color: #fff;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
}

.contact-success-home-btn:hover {
    background: #0b5828;
}

.contact-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 13, 24, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.contact-popup-overlay[hidden] {
    display: none !important;
}

.contact-popup-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 14px;
    padding: 22px 18px 18px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.2);
}

.contact-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #e5eaf3;
    background: #fff;
    color: #30405f;
    cursor: pointer;
}

.contact-popup-icon {
    font-size: 2.1rem;
    color: #168a3d;
    margin-bottom: 10px;
}

.contact-popup-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #113d22;
}

.contact-popup-card p {
    margin: 0;
    color: #3f4f69;
    font-size: 0.92rem;
}

.contact-popup-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-popup-ok-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: #e9eef7;
    color: #243957;
    border: 1px solid #d8e1f0;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.contact-popup-ok-btn:hover {
    background: #dfe7f4;
}

.map-section {
    padding: 10px 20px 64px;
}

.map-shell {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--contact-border);
    box-shadow: 0 14px 34px rgba(10, 25, 55, 0.08);
    padding: 24px;
}

.map-shell h2 {
    margin: 0;
    font-size: 1.4rem;
}

.map-shell p {
    margin: 8px 0 18px;
    color: var(--contact-muted);
}

.map-embed {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dde5f1;
    height: 360px;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-main-section {
        margin-top: 0;
        padding-top: 18px;
    }
}

@media (max-width: 640px) {
    .contact-hero {
        padding: 56px 14px 62px;
    }

    .hero-subtitle {
        font-size: 0.94rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-btn {
        width: 100%;
    }

    .contact-main-section,
    .map-section {
        padding-left: 14px;
        padding-right: 14px;
    }

    .contact-info-panel,
    .contact-form-panel,
    .map-shell {
        padding: 18px;
    }

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

    .info-item {
        grid-template-columns: 36px 1fr;
        gap: 10px;
        padding: 12px;
    }

    .info-icon {
        width: 36px;
        height: 36px;
        font-size: 0.92rem;
    }

    .map-embed {
        height: 290px;
    }

    .contact-popup-card {
        max-width: 100%;
        padding: 20px 14px 14px;
        border-radius: 12px;
    }

    .contact-popup-actions {
        flex-direction: column;
    }

    .contact-success-home-btn,
    .contact-popup-ok-btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .contact-hero h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .hero-kicker {
        font-size: 0.74rem;
    }

    .contact-info-panel h2,
    .contact-form-panel h2,
    .map-shell h2 {
        font-size: 1.2rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .service-select-trigger {
        font-size: 0.9rem;
    }

    .service-option {
        padding: 8px;
        gap: 8px;
    }

    .service-option span {
        font-size: 0.88rem;
    }

    .service-option img,
    .service-option-fallback {
        width: 24px;
        height: 24px;
    }

    .map-embed {
        height: 250px;
    }
}
