/* ==========================================================================
   ОБЩИЕ СТИЛИ И СБРОС (RESET)
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    background-color: #f8f9fa;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   ШАПКА И НАВИГАЦИЯ (HEADER)
   ========================================================================== */
.top-bar {
    background-color: #3f60a0;
    color: #fff;
    padding: 8px 10%;
    font-size: 13px;
    display: flex;
    gap: 20px;
}

.header {
    background-color: #fff;
    padding: 15px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #2b4c7e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Выпадающее меню */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    font-weight: 600;
    color: #444;
}

.nav-menu > li {
    position: relative;
    padding: 10px 0;
}

.nav-menu a {
    transition: color 0.3s;
}

.nav-menu li a:hover {
    color: #2b4c7e;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
    list-style: none;
    display: none;
    z-index: 1000;
    padding: 10px 0;
}

.dropdown li {
    padding: 8px 20px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown li:hover {
    background-color: #f4f6f9;
}

.nav-menu > li:hover .dropdown {
    display: block;
}

/* ==========================================================================
   ГЛАВНАЯ СТРАНИЦА (INDEX.PHP)
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)), url('https://images.unsplash.com/photo-1581092160607-ee22621dd758?auto=format&fit=crop&w=1350&q=80') center/cover;
    padding: 80px 10%;
    display: flex;
    justify-content: flex-end;
    min-height: 480px;
    align-items: center;
}

.hero-card {
    background-color: #f0f2f5;
    padding: 40px;
    border-radius: 20px;
    max-width: 650px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.hero-card h3 {
    font-size: 13px;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 10px;
}

.hero-card h1 {
    font-size: 38px;
    color: #2b4c7e;
    margin-bottom: 10px;
}

.hero-card h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #2b4c7e;
    margin: 10px auto;
}

.hero-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 28px;
    border-radius: 6px;
    background-color: #3f60a0;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn:hover {
    background-color: #2b4c7e;
}

/* Секция Услуги и Анимация */
.features-section {
    padding: 60px 10%;
}

.features-grid {
    background: #fff;
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.feature-card {
    padding: 40px 20px;
    text-align: center;
    border-right: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:last-child {
    border-right: none;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.icon-circle { 
    width: 80px; 
    height: 80px; 
    background-color: #1a437e; 
    color: #fff; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto 20px; 
    font-size: 32px; 
    transition: all 0.4s ease;
    animation: floatIcon 4s ease-in-out infinite;
}

.feature-card:nth-child(2) .icon-circle { animation-delay: 1s; }
.feature-card:nth-child(3) .icon-circle { animation-delay: 2s; }
.feature-card:nth-child(4) .icon-circle { animation-delay: 3s; }

.feature-card:hover .icon-circle {
    transform: scale(1.15) rotate(8deg);
    background-color: #3f60a0;
    box-shadow: 0 0 20px rgba(63, 96, 160, 0.5);
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.feature-card h3 {
    font-size: 15px;
    color: #111;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Проекты */
.projects-section {
    background-color: #2b3348;
    color: #fff;
    padding: 60px 10%;
    text-align: center;
    clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%);
    margin-top: -2vw;
}

.projects-section h2 {
    font-size: 48px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.projects-section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #fff;
    margin: 10px auto;
}

.projects-subtitle {
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 14px;
    color: #ccc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.project-item {
    position: relative;
    height: 220px;
    border-radius: 4px;
    overflow: hidden;
    background: #1a2232;
    display: block;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.project-item:hover img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

/* Новости */
.news-section {
    padding: 80px 10%;
    background-color: #fff;
}

.news-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    gap: 40px;
}

.news-title h2 {
    font-size: 52px;
    color: #2b4c7e;
    line-height: 1;
}

.news-title p {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-top: 5px;
}

.news-intro {
    max-width: 500px;
    font-size: 13px;
    color: #666;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #ccc;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-icon {
    position: absolute;
    left: -30px;
    top: 0;
    width: 32px;
    height: 32px;
    background-color: #3f60a0;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.timeline-content {
    padding-left: 20px;
}

.timeline-date {
    font-size: 20px;
    font-weight: 600;
    color: #3f60a0;
    margin-bottom: 5px;
}

.timeline-text {
    font-size: 14px;
    color: #555;
}

/* ==========================================================================
   СТРАНИЦА ОБЪЕКТА (PROJECT.PHP)
   ========================================================================== */
.project-hero {
    background: #2b3348;
    color: #fff;
    padding: 60px 10%;
}

.project-hero h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.project-location {
    font-size: 16px;
    color: #a0aec0;
}

.project-content {
    padding: 50px 10% 30px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.main-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
    cursor: pointer;
}

.text-block {
    font-size: 15px;
    color: #4a5568;
    white-space: pre-line;
    line-height: 1.8;
}

.details-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    height: fit-content;
}

.details-card h3 {
    font-size: 20px;
    color: #2b4c7e;
    margin-bottom: 20px;
    border-bottom: 2px solid #2b4c7e;
    padding-bottom: 5px;
}

.detail-item {
    margin-bottom: 20px;
}

.detail-item label {
    font-size: 12px;
    text-transform: uppercase;
    color: #a0aec0;
    font-weight: 700;
    display: block;
}

.detail-item span {
    font-size: 15px;
    color: #2d3748;
    font-weight: 600;
}

.gallery-section {
    padding: 20px 10% 60px;
}

.gallery-section h3 {
    font-size: 26px;
    color: #2b4c7e;
    margin-bottom: 20px;
    border-bottom: 2px solid #3f60a0;
    padding-bottom: 8px;
    display: inline-block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-grid img:hover {
    transform: scale(1.04);
}

/* Modal Lightbox */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

/* ==========================================================================
   СТРАНИЦА КОНТАКТОВ (CONTACTS.PHP)
   ========================================================================== */
.contacts-wrapper { 
    background: linear-gradient(to bottom, #ffffff 0%, #ffffff 40%, #d4deef 40%, #d4deef 100%); 
    padding: 50px 10% 80px; 
    flex: 1;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border: 1px solid #2b4c7e;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.card-title {
    font-size: 32px;
    color: #2b4c7e;
    margin-bottom: 30px;
}

.card-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: #2b4c7e;
    margin-top: 5px;
}

.info-text {
    font-size: 18px;
    color: #2b4c7e;
    margin-bottom: 20px;
}

.info-group {
    font-size: 16px;
    color: #3f60a0;
    margin-bottom: 25px;
    line-height: 1.8;
}

.download-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #3f60a0;
    color: #fff;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #1a437e;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}

.download-btn:hover {
    background-color: #2b4c7e;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #3f60a0;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dce2eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.input-with-icon .form-control {
    padding-left: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: #3f60a0;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn:hover {
    background-color: #2b4c7e;
}

.captcha-box {
    background-color: #f0f4f8;
    border: 1px dashed #3f60a0;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-label {
    font-weight: bold;
    color: #2b4c7e;
    font-size: 15px;
    white-space: nowrap;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.logo {
    font-size: 24px;
    font-weight: 800;
    color: #2b4c7e;
    display: flex;
    align-items: center;
    gap: 12px;
}


.logo-img {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
}
/* ==========================================================================
   АДАПТИВНОСТЬ (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 900px) { 
    .header, .news-header { flex-direction: column; text-align: center; }
    .hero { justify-content: center; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-card { border-right: none; border-bottom: 1px solid #eee; }
    .contacts-grid, .form-row, .project-content { grid-template-columns: 1fr; } 
    .captcha-box { flex-direction: column; align-items: flex-start; }
}