/* Custom Contact Page Styles & Mobile Responsiveness Fixes */

.hidden {
    display: none !important;
}

.page-hero {
    padding-top: 80px;
    padding-bottom: 60px;
    background: radial-gradient(circle at top right, rgba(255, 94, 0, 0.12) 0%, rgba(10, 12, 16, 0) 60%);
}

.contacts-hero-content {
    max-width: 850px;
}

.contacts-hero-content .hero-title {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.contacts-quick-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.quick-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(18, 22, 31, 0.8);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition-fast);
}

.quick-badge-item svg {
    color: var(--primary-orange);
    flex-shrink: 0;
}

/* Contact Departments Grid */
.contact-departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.dept-card {
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

.dept-icon {
    width: 54px;
    height: 54px;
    background: rgba(255, 94, 0, 0.12);
    border: 1px solid rgba(255, 94, 0, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.dept-tag {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-orange);
    font-weight: 700;
    margin-bottom: 8px;
}

.dept-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.dept-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

.dept-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.dept-phone {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-white);
    word-break: break-word;
    overflow-wrap: break-word;
}

.dept-phone:hover {
    color: var(--primary-orange);
}

.dept-email {
    font-size: 0.88rem;
    color: var(--text-muted);
    word-break: break-all;
    overflow-wrap: break-word;
}

.dept-hours {
    font-size: 0.8rem;
    color: var(--accent-gold);
    font-weight: 600;
}

/* Location and Map Section */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.location-info-block {
    display: flex;
    flex-direction: column;
}

.address-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.address-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.address-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    flex-shrink: 0;
}

.address-item strong {
    display: block;
    color: var(--text-white);
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.address-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.btn-copy-coords {
    background: transparent;
    border: none;
    color: var(--primary-orange);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    padding: 0;
    display: inline-block;
    margin-top: 4px;
}

.btn-copy-coords:hover {
    color: #fff;
}

.nav-app-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.margin-right-xs {
    margin-right: 6px;
}

/* Map Mock Viewport */
.location-map-box {
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 480px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.map-placeholder-header {
    padding: 16px 20px;
    background: rgba(10, 12, 16, 0.9);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.map-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-white);
}

.map-controls {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.map-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.map-tab-btn.active {
    background: var(--primary-orange);
    color: #fff;
}

.map-viewport {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.map-mock-bg {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a2232 0%, #0d1117 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.map-pin-pulse {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.pin-marker {
    width: 48px;
    height: 48px;
    background: rgba(255, 94, 0, 0.2);
    border: 2px solid var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px var(--primary-orange);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 15px var(--primary-orange); transform: scale(1); }
    50% { box-shadow: 0 0 35px var(--primary-orange); transform: scale(1.08); }
    100% { box-shadow: 0 0 15px var(--primary-orange); transform: scale(1); }
}

.pin-popup {
    margin-top: 10px;
    background: rgba(14, 18, 26, 0.95);
    border: 1px solid var(--border-color-glow);
    padding: 8px 14px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-deep);
}

.pin-popup strong {
    font-size: 0.85rem;
    color: var(--text-white);
}

.pin-popup span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.scheme-mock-bg {
    width: 100%;
    height: 100%;
    background: #0e121a;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.scheme-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.scheme-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.scheme-item .num {
    width: 28px;
    height: 28px;
    background: var(--primary-orange);
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.map-footer-note {
    padding: 10px 16px;
    background: rgba(10, 12, 16, 0.95);
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    z-index: 5;
}

/* Requisites Card */
.requisites-card {
    padding: 35px;
}

.requisites-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.req-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    font-size: 0.92rem;
}

.req-label {
    color: var(--text-muted);
    min-width: 180px;
}

.req-value {
    color: var(--text-white);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    overflow-wrap: break-word;
}

.req-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.req-note {
    font-size: 0.82rem;
    color: var(--accent-gold);
}

/* Topics Selector in Form */
.form-topics-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.topic-radio input[type="radio"] {
    display: none;
}

.topic-btn {
    display: inline-block;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    user-select: none;
}

.topic-radio input[type="radio"]:checked + .topic-btn {
    background: var(--primary-orange);
    color: #fff;
    border-color: var(--primary-orange);
    box-shadow: 0 0 15px rgba(255, 94, 0, 0.4);
}

/* Responsive Overrides & Mobile Optimization */
@media (max-width: 1024px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .location-map-box {
        height: 420px;
    }
    .contact-departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .contact-departments-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dept-card {
        padding: 25px 20px;
    }

    .address-card {
        padding: 20px 16px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .req-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .req-value {
        text-align: left;
    }
    .requisites-card {
        padding: 24px 18px;
    }
    .req-actions {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .req-actions .btn {
        width: 100%;
    }

    .location-map-box {
        height: 380px;
        border-radius: 16px;
    }
    .map-placeholder-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
    }
    .map-controls {
        width: 100%;
    }
    .map-tab-btn {
        flex: 1;
        text-align: center;
    }

    .nav-app-buttons {
        flex-direction: column;
    }
    .nav-app-buttons .btn {
        width: 100%;
    }

    .form-topics-selector {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }
    .topic-radio {
        width: 100%;
    }
    .topic-btn {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .contacts-quick-badges {
        flex-direction: column;
        gap: 10px;
    }

    .quick-badge-item {
        width: 100%;
        justify-content: flex-start;
        box-sizing: border-box;
    }

    .address-item {
        gap: 12px;
    }

    .address-icon {
        width: 36px;
        height: 36px;
    }

    .scheme-mock-bg {
        padding: 15px;
    }

    .scheme-item {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .location-map-box {
        height: 360px;
    }

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