/* --- СИСТЕМНЫЕ ПЕРЕМЕННЫЕ --- */
:root {
    --bg-dark: #0b0f1a;
    --accent-blue: #3b82f6;
    --accent-hover: #2563eb;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
}

/* --- БАЗОВЫЙ СБРОС --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

.max-w-7xl {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HERO SECTION (ВЕРХНЯЯ ЧАСТЬ) --- */
section.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px; /* Уменьшенная высота, чтобы контент снизу поднялся */
    padding-top: 80px; /* Отступ под меню */
    text-align: center;
    position: relative;
}

/* Контейнер сферы - приподнят, чтобы шар был за текстом */
#canvas-wrapper {
    position: absolute;
    top: -20px; 
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    font-weight: 900;
    margin: 0 0 10px 0;
    background: linear-gradient(to right, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.text-xl {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px auto;
}

/* --- КНОПКА СВЯЗАТЬСЯ --- */
.btn-primary, a[href="contact.php"].bg-blue-500 {
    display: inline-block;
    background-color: var(--accent-blue) !important;
    color: #ffffff !important;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.4);
}

/* --- ДОСТИЖЕНИЯ (БЛОК С ЦИФРАМИ) --- */
.achievements-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    padding: 40px 0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.achievement-item h3 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--accent-blue);
    margin: 0;
}

.achievement-item p {
    color: var(--text-muted);
    margin: 5px 0 0 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- УСЛУГИ (КАРТОЧКИ) --- */
.services-container {
    padding: 60px 0;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.service-card {
    height: 220px;
    perspective: 1000px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.card-front {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
    font-size: 1.1rem;
}

.card-back {
    background: var(--accent-blue);
    color: #fff;
    transform: rotateY(180deg);
    font-size: 0.9rem;
    text-align: center;
}

/* --- ФУТЕР --- */
.site-footer {
    padding: 50px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-contacts a {
    color: var(--accent-blue);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 600;
}

.footer-info p {
    color: #4b5563;
    font-size: 0.8rem;
    margin: 3px 0;
}

/* АДАПТИВ */
@media (max-width: 768px) {
    section.hero { height: auto; padding: 100px 20px 60px; }
    .achievements-grid { flex-direction: column; gap: 30px; }
    .footer-content { flex-direction: column; gap: 20px; }
}

/* Фикс для иконок соцсетей и мессенджеров */
.social-link svg, 
a svg {
    width: 24px;   /* Строго задаем ширину */
    height: 24px;  /* Строго задаем высоту */
    display: inline-block;
    vertical-align: middle;
}

/* Стили для контейнера иконки ТГ */
.bg-gray-800.rounded-full {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #1e293b;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.bg-gray-800.rounded-full:hover {
    background-color: #0088cc; /* Цвет Telegram */
    transform: translateY(-3px);
}
/* --- ФИКСЫ ДЛЯ СТРАНИЦЫ КОНТАКТОВ --- */

/* Сетка для контактов и карты */
.grid-2-cols {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 50px;
}

.grid-2-cols > div {
    flex: 1;
}

/* ФИКС ИКОНКИ ТЕЛЕГРАМ */
.social-link {
    display: inline-flex !important;
    width: 45px !important;
    height: 45px !important;
    background: #1e293b;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.social-link svg {
    width: 20px !important; /* Жестко ограничиваем размер иконки внутри круга */
    height: 20px !important;
    fill: white;
}

/* ФОРМА (Центрирование и оформление) */
.form-container {
    max-width: 800px;
    margin: 80px auto;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row input, .contact-form textarea {
    flex: 1;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    outline: none;
}

.form-row input:focus, .contact-form textarea:focus {
    border-color: #3b82f6;
}

/* КАРТА */
#map  {
    width: 100%;
    height: 400px; /* Обязательно! */
    background-color: #1e293b; /* Цвет-заглушка, пока карта грузится */
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    .grid-2-cols, .form-row { flex-direction: column; }
}