/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

html,
body {
    height: 100%;
}

:root {
    --accent: #E65A00;
    --heading: #0F1724;
    --text: #374151;
    --muted: #4B5563;
    --bg: #E9EEF3;
    --card-bg: #F5F7F8;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.messages {
    padding-top: 1rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.alert-success {
    background: #e8f8ed;
    color: #1f5d3a;
}

.alert-error {
    background: #fde8e8;
    color: #8a1f1f;
}

/* ===== Layout ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

section {
    margin-bottom: 18px;
}

h2 {
    margin: 0 0 12px;
    color: var(--heading);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    padding: 56px 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.6));
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.brand-title {
    margin: 0;
    font-size: 30px;
    color: var(--accent);
}

.lead {
    margin: 14px 0 6px;
    font-weight: 600;
}

.sub {
    margin: 0;
}

.hero-cta,
.hero .order-btn {
    margin-top: 22px;
}

/* ===== Navigation ===== */
.site-nav {
    display: flex;
    gap: 12px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    transition: background 0.15s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(255, 255, 255, 0.18);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.15s ease;
}

.btn,
.tab-button,
.order-btn,
.modal-close,
.photo-lightbox-close,
.works-link {
    touch-action: manipulation;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn.primary:hover {
    filter: brightness(0.95);
    box-shadow: 0 8px 24px rgba(230, 90, 0, 0.25);
}

/* ===== Icons ===== */
.iconphone {
    width: 22px;
    height: 22px;
}

/* ===== Hero contacts ===== */
.hero-contacts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== Muted Section ===== */
.muted-section {
    background: var(--bg);
    padding: 12px 0 8px;
    border-radius: 10px;
}

.prices-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.prices-header h2 {
    margin-bottom: 4px;
}

.prices-lead {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

/* ===== Cards ===== */
.tariff-cards,
.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 28px;
}

.card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

.card h3 {
    margin: 0 0 16px;
    font-size: 20px;
    color: var(--heading);
}

.tariff {
    border: 2px solid #FFD1A6;
}

.tariff.featured {
    background: linear-gradient(180deg, #FFF3EA, #FFFFFF);
}

.tariff h3 {
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(230, 90, 0, 0.18);
}

/* ===== Tariff list ===== */
.tariff-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tariff-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px dashed rgba(15, 23, 36, 0.08);
}

.tariff-item:first-child {
    border-top: none;
    padding-top: 2px;
}

.tariff-item.featured {
    margin: 0 -10px;
    padding: 10px;
    border-top: none;
    border-radius: 10px;
    background: rgba(230, 90, 0, 0.08);
}

.tariff-name {
    font-weight: 600;
    color: var(--heading);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.price-inline {
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
    white-space: nowrap;
}

.transport-list {
    margin: 0;
    padding-left: 1.15em;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.works-item {
    margin: 0;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

.works-link {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
}

.works-item img {
    display: block;
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.works-item figcaption {
    padding: 10px 14px 14px;
    color: var(--muted);
    font-size: 14px;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px 16px;
    background: rgba(15, 23, 36, 0.88);
}

.photo-lightbox[hidden] {
    display: none !important;
}

.photo-lightbox-image {
    max-width: min(96vw, 1100px);
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.photo-lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 11001;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.photo-lightbox-close:hover {
    background: var(--accent);
    color: #fff;
}

/* ===== Contact block ===== */
.contact-block {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ===== Footer ===== */
footer {
    padding: 24px 0;
    color: var(--muted);
    text-align: center;
}

.footer-contacts {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-contacts a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}

/* Footer phone simple styling (no copy) */
.footer-phone {
    display: inline-block;
    color: var(--heading);
    background: transparent;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

/* SEO / content sections styling */
.seo-section,
section.container[class*="seo-"],
.card.about {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.seo-section h2 {
    margin-top: 28px;
    margin-bottom: 8px;
    font-size: 22px
}

.seo-section p,
.seo-section ul,
.seo-section ol {
    color: var(--muted);
    margin-bottom: 12px
}

/* Make about-card sections consistent and slightly elevated */
.card.about {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    margin-top: 14px
}

/* Tabs styles */
.tabs {
    margin-top: 14px;
}

.tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tab-button {
    background: transparent;
    border: 1px solid rgba(15, 23, 36, 0.06);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700
}

.tab-button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(230, 90, 0, 0.12)
}

.tab-panels {
    position: relative
}

.tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .26s ease, transform .26s ease
}

.tab-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0)
}

/* Improve spacing inside panels */
.tab-panel .container {
    padding: 6px 0 24px
}

/* ===== Toast ===== */
#toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 99999;
}

#toast.show {
    opacity: 1;
}

/* ===== Order button (light sections) ===== */
.order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(230, 90, 0, 0.45);
    animation: order-pulse 1.8s ease-in-out infinite;
    transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.order-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 36px rgba(230, 90, 0, 0.55);
    transform: translateY(-2px) scale(1.03);
    animation: none;
}

.order-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(230, 90, 0, 0.45);
}

.order-btn--hero {
    margin-bottom: 0;
    font-size: 22px;
    padding: 18px 40px;
}

.order-btn--full {
    width: 100%;
    margin-bottom: 0;
    margin-top: 4px;
    animation: none;
    text-transform: none;
    letter-spacing: 0;
    font-size: 16px;
    padding: 12px 18px;
}

@keyframes order-pulse {
    0%,
    100% {
        box-shadow: 0 10px 28px rgba(230, 90, 0, 0.4);
    }
    50% {
        box-shadow: 0 14px 42px rgba(230, 90, 0, 0.75);
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .order-btn {
        animation: none;
    }
}

/* ===== Modal ===== */
body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 36, 0.55);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--heading);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    background: #e8edf2;
}

#order-modal-title {
    margin: 0 32px 6px 0;
    font-size: 22px;
    color: var(--heading);
}

.modal-sub {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field span,
.form-field label {
    font-size: 14px;
    font-weight: 700;
    color: var(--heading);
}

.order-when,
.order-maps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.order-map {
    width: 100%;
    height: 200px;
    min-height: 200px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 36, 0.12);
    background: #e8edf2;
}

.order-map .leaflet-container {
    width: 100%;
    height: 100%;
}

.order-map.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.field-error {
    color: #dc2626;
    font-size: 13px;
}

.form-field input.is-invalid,
.form-field select.is-invalid {
    border-color: #dc2626;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 36, 0.12);
    border-radius: 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 90, 0, 0.15);
}

.form-field input[type="text"]:invalid:not(:placeholder-shown),
.form-field input[type="tel"]:invalid:not(:placeholder-shown),
.form-field select:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

/* ===== Responsive ===== */
@media (max-width: 800px) {
    .hero-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-contacts {
        width: 100%;
    }

    .hero-contacts .btn {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 44px;
    }

    .order-btn--hero {
        width: 100%;
        font-size: 18px;
        padding: 16px 20px;
    }

    .tab-buttons {
        width: 100%;
    }

    .tab-button {
        flex: 1 1 0;
        min-height: 44px;
        font-size: 13px;
        padding: 10px 8px;
        text-align: center;
    }

    .tariff-cards,
    .info-cards,
    .works-grid,
    .order-maps,
    .order-when {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 18px;
    }

    .works-item img {
        height: 220px;
    }

    .brand-title {
        font-size: 24px;
    }

    .lead {
        font-size: 15px;
    }

    .modal {
        padding: 8px;
        align-items: stretch;
    }

    .modal-dialog {
        max-width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 14px;
        padding: 20px 16px 16px;
    }

    .order-map {
        height: 180px;
        min-height: 180px;
    }

    .form-field input,
    .form-field select,
    .form-field textarea {
        font-size: 16px;
        min-height: 44px;
    }

    .photo-lightbox {
        padding: 64px 10px 10px;
    }

    .photo-lightbox-close {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
    }

    .photo-lightbox-image {
        max-height: calc(100dvh - 88px);
    }

    .seo-section h2,
    #panel-about h3 {
        font-size: 18px;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 14px;
    }

    .hero {
        padding: 28px 0;
    }

    .brand-title {
        font-size: 20px;
    }

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

    .tariff-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    .price-inline {
        font-size: 18px;
    }

    .works-item img {
        height: 200px;
    }

    .footer-contacts {
        flex-direction: column;
        gap: 8px;
    }

    #toast {
        left: 12px;
        right: 12px;
        transform: none;
        text-align: center;
    }
}