/* ============================================================
   CSS ДЛЯ САЙТА "РАЗВИТИЕ" — ПОЛНАЯ ВЕРСИЯ
   ============================================================ */

/* ===== ОБЩИЕ СБРОСЫ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background-color: #f8faff;
    color: #0b2b44;
}

:root {
    --blue: #0b3b5c;
    --blue-light: #e7f0fa;
    --orange: #f48c2e;
    --orange-hover: #d97a1e;
    --white: #ffffff;
    --shadow: 0 12px 30px rgba(0, 20, 40, 0.08);
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 0.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(11, 59, 92, 0.08);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.company-name {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--blue);
}
.company-name span {
    color: var(--orange);
}

.nav-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--blue);
    font-weight: 500;
    padding: 0.5rem 1.1rem;
    border-radius: 40px;
    transition: 0.25s ease;
    font-size: 0.95rem;
    background: transparent;
}

.nav-links a:hover {
    background: var(--blue);
    color: white;
    box-shadow: 0 4px 12px rgba(11, 59, 92, 0.2);
    transform: translateY(-2px);
}

/* ===== СЕКЦИИ ===== */
section {
    padding: 4rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.6rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    color: var(--blue);
    letter-spacing: -0.5px;
    border-left: 8px solid var(--orange);
    padding-left: 1.2rem;
}
.section-title i {
    color: var(--orange);
    margin-right: 0.6rem;
}

/* ===== ГЛАВНАЯ ===== */
#home {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-card {
    background: var(--white);
    padding: 3.5rem 3rem;
    border-radius: 60px 20px 60px 20px;
    box-shadow: var(--shadow);
    width: 100%;
    background: linear-gradient(145deg, #ffffff, #f5faff);
    border: 1px solid rgba(11, 59, 92, 0.05);
}

.hero-card h1 {
    font-size: 3.8rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 0.5rem;
}
.hero-card h1 i {
    color: var(--orange);
    margin-right: 10px;
}
.hero-card p {
    font-size: 1.3rem;
    color: #1f4b6e;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 2rem;
}
.hero-badge {
    display: inline-block;
    background: var(--orange);
    color: white;
    padding: 0.5rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 18px rgba(244, 140, 46, 0.3);
}

/* ===== О НАС ===== */
#about {
    background: var(--blue-light);
    border-radius: 80px 20px 80px 20px;
    margin-top: 1rem;
    padding: 4rem 3rem;
}
.about-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: center;
}
.about-text {
    flex: 2;
    min-width: 280px;
}
.about-text p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #10354f;
    margin-bottom: 1.2rem;
}
.about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    margin-top: 1.5rem;
}
.stat-item {
    background: white;
    padding: 0.8rem 1.8rem;
    border-radius: 60px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    border: 1px solid rgba(11, 59, 92, 0.08);
    font-weight: 600;
    color: var(--blue);
}
.stat-item i {
    color: var(--orange);
    margin-right: 8px;
}
.about-image {
    flex: 1;
    min-width: 200px;
    text-align: center;
}
.about-image i {
    font-size: 8rem;
    color: var(--blue);
    opacity: 0.15;
    transition: 0.3s;
}
.about-image i:hover {
    opacity: 0.3;
    transform: scale(1.05);
}

/* ===== ФОТО ===== */
#photo {
    background: white;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
}
@media (max-width: 900px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 540px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
}

.photo-card {
    background: white;
    border-radius: 28px 8px 28px 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(11, 59, 92, 0.05);
    cursor: default;
}

.photo-card:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(11, 59, 92, 0.12);
    border-color: var(--orange);
}

.photo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.photo-card:hover img {
    transform: scale(1.06);
}
.photo-card .card-body {
    padding: 1rem 1.2rem 1.3rem;
    background: white;
}
.photo-card .card-body h4 {
    color: var(--blue);
    font-weight: 600;
    font-size: 1.1rem;
}
.photo-card .card-body p {
    color: #3d5f7a;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== ЗАКАЗ ===== */
#order {
    background: var(--blue-light);
    border-radius: 80px 20px 80px 20px;
}
.order-card {
    background: white;
    padding: 2.8rem;
    border-radius: 40px 12px 40px 12px;
    box-shadow: var(--shadow);
    max-width: 750px;
    margin: 0 auto;
    border: 1px solid rgba(11, 59, 92, 0.05);
}
.order-card form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.form-group label {
    font-weight: 600;
    color: var(--blue);
    font-size: 0.95rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem 1.2rem;
    border-radius: 40px;
    border: 1px solid #dae6f0;
    font-size: 1rem;
    transition: 0.2s;
    background: #fafdff;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(244, 140, 46, 0.15);
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
    border-radius: 24px;
}
.btn-submit {
    background: var(--orange);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    padding: 0.9rem 2rem;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 8px 20px rgba(244, 140, 46, 0.3);
    letter-spacing: 0.5px;
    align-self: flex-start;
}
.btn-submit:hover {
    background: var(--orange-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(244, 140, 46, 0.4);
}
.btn-submit i {
    margin-right: 10px;
}

/* ===== КОНТАКТЫ ===== */
#contacts {
    background: white;
}
.contacts-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: space-between;
    align-items: center;
}
.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    font-size: 1.2rem;
}
.contacts-info a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}
.contacts-info a i {
    color: var(--orange);
    width: 2rem;
    font-size: 1.5rem;
}
.contacts-info a:hover {
    color: var(--orange);
    transform: translateX(6px);
}
.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 0.6rem;
}
.social-links a {
    background: var(--blue-light);
    color: var(--blue);
    width: 54px;
    height: 54px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: 0.25s;
    text-decoration: none;
}
.social-links a:hover {
    background: var(--blue);
    color: white;
    transform: scale(1.08) rotate(-4deg);
}

/* ===== КНОПКА ПОДДЕРЖКИ ===== */
.support-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    background: var(--blue);
    color: white;
    width: 68px;
    height: 68px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 10px 30px rgba(11, 59, 92, 0.35);
    transition: 0.25s;
    text-decoration: none;
    border: 2px solid white;
}
.support-fab:hover {
    background: var(--orange);
    transform: scale(1.08) rotate(6deg);
    box-shadow: 0 14px 40px rgba(244, 140, 46, 0.5);
}

/* ===== КНОПКА "НАВЕРХ" ===== */
.scroll-top {
    position: fixed;
    bottom: 110px;
    right: 28px;
    z-index: 998;
    background: var(--blue-light);
    color: var(--blue);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--blue);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.25s;
    opacity: 0.7;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.scroll-top:hover {
    background: var(--blue);
    color: white;
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(11, 59, 92, 0.25);
}

/* ===== ЧАТ КЛИЕНТА ===== */
.chat-container {
    max-width: 900px;
    margin: 2rem auto;
    background: white;
    border-radius: 30px;
    padding: 2rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--blue-light);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.chat-status {
    display: inline-block;
    padding: 0.3rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}
.status-open { background: #e8f5e9; color: #2e7d32; }
.status-progress { background: #fff3e0; color: #e65100; }
.status-closed { background: #fce4ec; color: #c62828; }
.messages-box {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8faff;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    border: 1px solid #e7f0fa;
}
.message {
    margin-bottom: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 18px;
    max-width: 75%;
    word-wrap: break-word;
}
.message-user {
    background: var(--blue);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.message-support {
    background: white;
    border: 1px solid #dae6f0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}
.message-meta {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.3rem;
}
.message-user .message-meta { color: #b3d4f0; }
.chat-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.chat-form textarea {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border-radius: 30px;
    border: 1px solid #dae6f0;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    min-width: 200px;
}
.chat-form textarea:focus {
    outline: none;
    border-color: var(--orange);
}
.chat-form button {
    background: var(--orange);
    border: none;
    color: white;
    padding: 0 2rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    white-space: nowrap;
}
.chat-form button:hover {
    background: var(--orange-hover);
    transform: scale(1.02);
}
.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}
.back-link:hover { color: var(--orange); }
.ticket-info {
    background: var(--blue-light);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}
.ticket-info span { font-weight: 600; }

/* ===== АДМИН-ЧАТ ===== */
.admin-chat-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}
.chat-header .back-btn {
    background: #0b3b5c;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.25s;
}
.chat-header .back-btn:hover {
    background: #1a5a7a;
    transform: scale(1.05);
}
.ticket-info-admin {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}
.ticket-info-admin .row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.ticket-info-admin .row span {
    font-weight: 600;
    color: #0b3b5c;
}
.ticket-info-admin .row .label {
    color: #4a6e8a;
    font-weight: 400;
}
.status-select {
    padding: 0.3rem 1rem;
    border-radius: 30px;
    border: 1px solid #dae6f0;
    font-weight: 600;
}
.status-select:focus {
    outline: none;
    border-color: #f48c2e;
}
.messages-box-admin {
    height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8faff;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    border: 1px solid #e7f0fa;
}
.message-from-user {
    background: #0b3b5c;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.message-from-admin {
    background: white;
    border: 1px solid #dae6f0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}
.message-from-user .message-meta { color: #b3d4f0; }
.reply-form {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.reply-form textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: 30px;
    border: 1px solid #dae6f0;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}
.reply-form textarea:focus {
    outline: none;
    border-color: #f48c2e;
}
.reply-form .actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.reply-form .actions button {
    background: #f48c2e;
    color: white;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}
.reply-form .actions button:hover {
    background: #d97a1e;
    transform: scale(1.02);
}
/* ===== ОШИБКИ ФОРМЫ ЗАКАЗА ===== */
.form-errors {
    background: #ffebee;
    color: #c62828;
    border-left: 6px solid #c62828;
    padding: 0.9rem 1.2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.field-error {
    color: #c62828;
    font-size: 0.85rem;
    padding-left: 1.2rem;
}
.field-error:empty { display: none; }
.form-group input.input-validation-error,
.form-group select.input-validation-error,
.form-group textarea.input-validation-error {
    border-color: #c62828;
    background: #fffafa;
}

/* ===== СПИСОК ЗАЯВОК ===== */
.ticket-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
}
.ticket-filter {
    background: white;
    border: 1px solid #dae6f0;
    color: var(--blue);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}
.ticket-filter:hover { border-color: var(--orange); }
.ticket-filter.is-active {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}
.ticket-filter .count {
    opacity: 0.65;
    margin-left: 0.3rem;
    font-weight: 400;
}

.tickets-table-wrap {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow-x: auto;
}
/* Список шире карточки чата: в него не влезает семь колонок. */
.admin-chat-container.is-wide { max-width: 1300px; }

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
.tickets-table td:last-child { white-space: nowrap; }
.tickets-table th {
    text-align: left;
    padding: 1rem 1.2rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a6e8a;
    border-bottom: 2px solid var(--blue-light);
    white-space: nowrap;
}
.tickets-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eef4fa;
    vertical-align: middle;
    color: #0b2b44;
}
.tickets-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}
.tickets-table tbody tr:hover { background: #f5faff; }
.tickets-table tbody tr:last-child td { border-bottom: none; }
.tickets-table .muted { color: #4a6e8a; font-size: 0.85rem; }
.ticket-link {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.ticket-link:hover { color: var(--orange); }

.empty-state {
    background: white;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    color: #4a6e8a;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.empty-state i {
    font-size: 3rem;
    color: var(--blue-light);
    margin-bottom: 1rem;
    display: block;
}

/* ===== СТРАНИЦА ОШИБКИ ===== */
.error-page {
    max-width: 600px;
    margin: 6rem auto;
    padding: 3rem 2rem;
    text-align: center;
    background: white;
    border-radius: 30px;
    box-shadow: var(--shadow);
}
.error-page .error-code {
    font-size: 5rem;
    font-weight: 700;
    color: var(--orange);
    line-height: 1;
}
.error-page h1 {
    color: var(--blue);
    margin: 1rem 0 0.5rem;
}
.error-page p { color: #4a6e8a; margin-bottom: 1.5rem; }

/* ===== АДАПТИВ ===== */
@media (max-width: 700px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem 1rem;
    }
    .nav-links a {
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
    }
    .hero-card h1 {
        font-size: 2.4rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .order-card {
        padding: 1.5rem;
    }
    .chat-container {
        padding: 1rem;
        margin: 1rem;
    }
    .message {
        max-width: 90%;
    }
    .scroll-top {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        bottom: 100px;
        right: 20px;
    }
    .support-fab {
        width: 58px;
        height: 58px;
        font-size: 1.8rem;
        bottom: 20px;
        right: 20px;
    }
    .admin-chat-container {
        padding: 0 1rem;
    }
    .ticket-info-admin {
        padding: 1rem;
    }
    .reply-form .actions {
        flex-direction: column;
    }
    .reply-form .actions .email-input {
        width: 100%;
    }
    .reply-form .actions button {
        width: 100%;
    }
}

/* ===== АНИМАЦИЯ ===== */
.fade-in {
    animation: fadeUp 0.7s ease forwards;
}
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}