/**
 * TP Contacts — contacts page layout styles
 *
 * Grid layouts for contacts section, map, team grid, requisites grid.
 * Component styles (team card, requisite item) are in info-block.css.
 * Page hero is rendered by tp_page_hero widget (page-hero.css).
 *
 * @package Technoproekt
 * @author  Kkalganov <https://kkalganov.com>
 */

/* ==========================================================================
   Contacts Section
   ========================================================================== */

.tp-contacts-section {
    padding: 60px 20px !important;
    background: var(--tp-cream) !important;
}

/* ==========================================================================
   Contacts Grid — info + map (mobile: stacked, desktop: 2 cols)
   ========================================================================== */

.tp-contacts-grid.e-con-full,
.tp-contacts-grid > .e-con-inner {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 40px !important;
}

.tp-contacts-grid.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

/* Force child containers to fill grid cells */
.tp-contacts-grid > .e-con-inner > .e-con,
.tp-contacts-grid.e-con-full > .e-con {
    width: 100% !important;
    max-width: 100% !important;
}

/* Info column */
.tp-contacts-info.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

/* ==========================================================================
   Contact Block (phones, email, address+schedule)
   ========================================================================== */

.tp-contact-block {
    background: var(--tp-white);
    padding: 24px 20px;
    border: 1px solid var(--tp-cream-warm);
    margin-bottom: 32px;
}

.tp-contact-block:last-child {
    margin-bottom: 0;
}

.tp-contact-block__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.tp-contact-block__icon {
    width: 48px;
    height: 48px;
    background: var(--tp-green-main);
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
    flex-shrink: 0;
}

.tp-contact-block__icon svg {
    width: 22px;
    height: 22px;
    color: var(--tp-white);
}

.tp-contact-block h3 {
    font-family: 'Unbounded', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tp-text);
    margin: 0;
}

/* Contact list */
.tp-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.tp-contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.tp-contact-list li svg {
    width: 16px;
    height: 16px;
    color: var(--tp-green-main);
    flex-shrink: 0;
}

.tp-contact-list a {
    color: var(--tp-text);
    transition: color 0.2s;
    text-decoration: none;
}

.tp-contact-list a:hover {
    color: var(--tp-green-main);
}

.tp-contact-note {
    font-size: 12px;
    color: var(--tp-text-light);
    margin-left: 4px;
}

/* Address block */
.tp-contact-address {
    font-style: normal;
    font-size: 15px;
    line-height: 1.8;
}

.tp-contact-address strong {
    font-weight: 600;
    color: var(--tp-text);
}

/* Schedule table */
.tp-schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tp-schedule-table tr {
    border-bottom: 1px solid var(--tp-cream-warm);
}

.tp-schedule-table tr:last-child {
    border-bottom: none;
}

.tp-schedule-table td {
    padding: 10px 0;
    font-size: 14px;
}

.tp-schedule-table td:first-child {
    color: var(--tp-text);
    font-weight: 500;
}

.tp-schedule-table td:last-child {
    text-align: right;
    color: var(--tp-text-light);
}

/* ==========================================================================
   Map Placeholder
   ========================================================================== */

.tp-contacts-map {
    background: var(--tp-cream-warm);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tp-map-placeholder {
    text-align: center;
    color: var(--tp-text-light);
}

.tp-map-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--tp-green-main);
    margin-bottom: 16px;
}

.tp-map-placeholder p {
    font-size: 14px;
    margin-bottom: 4px;
}

.tp-map-placeholder strong {
    font-size: 16px;
    color: var(--tp-text);
    display: block;
    margin-bottom: 12px;
}

.tp-map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tp-green-main);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
    text-decoration: none;
}

.tp-map-link:hover {
    color: var(--tp-green-dark);
}

.tp-map-link svg {
    width: 14px;
    height: 14px;
}

/* Yandex map iframe */
.tp-contacts-map iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 0;
    display: block;
}

/* ==========================================================================
   Team Section (layout)
   ========================================================================== */

.tp-team-section {
    padding: 0 20px 60px !important;
    background: var(--tp-cream) !important;
}

.tp-team-inner.e-con-full,
.tp-team-inner > .e-con-inner {
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.tp-team-inner.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

/* Team grid — wraps tp_info_block --team widgets */
.tp-team-grid.e-con-full,
.tp-team-grid > .e-con-inner {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2px !important;
}

.tp-team-grid.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

/* Equal height team cards — stretch widget wrappers to fill grid cells */
.tp-team-grid .elementor-widget {
    height: 100% !important;
}

.tp-team-grid .elementor-widget-container {
    height: 100%;
}

/* ==========================================================================
   Requisites Section (layout)
   ========================================================================== */

.tp-requisites-section {
    padding: 60px 20px !important;
    background: var(--tp-white) !important;
}

.tp-requisites-inner.e-con-full,
.tp-requisites-inner > .e-con-inner {
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.tp-requisites-inner.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

/* Requisites grid — wraps tp_info_block --requisite widgets */
.tp-requisites-grid.e-con-full,
.tp-requisites-grid > .e-con-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
}

.tp-requisites-grid.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

/* Equal height requisite cards — stretch widget wrappers to fill grid cells */
.tp-requisites-grid .elementor-widget {
    height: 100% !important;
}

.tp-requisites-grid .elementor-widget-container {
    height: 100%;
}

/* Section headers use tp_section_header widget — styles in section-header.css */

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Small mobile — single column team grid */
@media (max-width: 480px) {
    .tp-team-grid.e-con-full,
    .tp-team-grid > .e-con-inner {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

@media (min-width: 769px) {
    .tp-contacts-section {
        padding: 80px 40px 100px !important;
    }

    .tp-contact-block {
        padding: 32px;
    }

    .tp-contacts-map {
        min-height: 480px;
    }

    .tp-contacts-map iframe {
        min-height: 480px;
    }

    .tp-team-section {
        padding: 0 40px 100px !important;
    }

    .tp-team-grid.e-con-full,
    .tp-team-grid > .e-con-inner {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .tp-requisites-section {
        padding: 80px 40px !important;
    }

    .tp-requisites-grid.e-con-full,
    .tp-requisites-grid > .e-con-inner {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1025px) {
    .tp-contacts-grid.e-con-full,
    .tp-contacts-grid > .e-con-inner {
        grid-template-columns: 1fr 1fr !important;
    }

    .tp-team-grid.e-con-full,
    .tp-team-grid > .e-con-inner {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .tp-requisites-grid.e-con-full,
    .tp-requisites-grid > .e-con-inner {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
