/* ===== CSS Variables ===== */
:root {
    --primary-color: #0056b3;
    --primary-dark: #004494;
    --secondary-color: #ff9900;
    --accent-color: #28a745;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --white: #ffffff;
    --black: #212529;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --section-padding: 80px 0;
    --container-padding: 0 20px;
    
    --font-main: 'Roboto', sans-serif;
    --font-heading: 'Open Sans', sans-serif;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ===== Typography ===== */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-color);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.highlight {
    color: var(--primary-color);
}

/* ===== Buttons ===== */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button i {
    font-size: 1.2rem;
}

.full-width {
    width: 100%;
}

/* ===== Header & Navigation ===== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    max-width: 200px;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    color: var(--dark-color);
    padding: 8px 0;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-cta {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-sm);
}

.nav-cta:hover {
    background-color: var(--primary-dark);
}

.header-contacts {
    display: flex;
    align-items: center;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.phone-link i {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 160px 0 100px;
    margin-top: 70px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.feature i {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

/* ===== Sections ===== */
.section {
    padding: var(--section-padding);
}

.section-dark {
    background-color: var(--dark-color);
    color: var(--white);
}

.section-gray {
    background-color: var(--light-gray);
}

.section-dark .section-title {
    color: var(--white);
}

/* ===== Services ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    border-top: 4px solid var(--primary-color);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.service-icon {
    background-color: var(--light-gray);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.service-card h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.service-list {
    margin-top: 1.5rem;
}

.service-list li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.service-list li::before {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ===== About ===== */
.about-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.about-header p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.stats {
    display: flex;
    gap: 40px;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

.certificates ul {
    margin-top: 1rem;
}

.certificates li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.certificates i {
    color: var(--accent-color);
}

.about-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ===== Portfolio ===== */
.portfolio-grid {
    display: grid;
    gap: 40px;
    margin-top: 3rem;
}

.portfolio-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.portfolio-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-image {
    height: 100%;
    min-height: 300px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.portfolio-content {
    padding: 2rem;
}

.portfolio-category {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.portfolio-details {
    display: flex;
    gap: 20px;
    margin-top: 1.5rem;
    color: var(--gray-color);
    flex-wrap: wrap;
}

.portfolio-details i {
    margin-right: 5px;
}

/* ===== Slider for Portfolio ===== */
.portfolio-slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    overflow: hidden;
}

.slider-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.slide {
    flex: 0 0 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.slider-prev:hover,
.slider-next:hover {
    background: rgba(0,0,0,0.8);
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

/* Скрываем кнопки и точки, если слайд один */
.portfolio-slider.single .slider-prev,
.portfolio-slider.single .slider-next,
.portfolio-slider.single .slider-dots {
    display: none;
}

/* ===== Advantages ===== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.advantage-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.advantage-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.advantage-icon i {
    font-size: 2rem;
    color: var(--white);
}

/* ===== Contacts ===== */
.contacts-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    text-align: center;
}

.contact-item {
    flex: 0 1 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.contact-icon i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-item p {
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-note {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
}

.footer-links h4,
.footer-contacts h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links a {
    display: block;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.footer-cta {
    display: inline-block;
    margin-top: 1rem;
    padding: 12px 24px;
    background-color: var(--secondary-color);
    color: var(--dark-color);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-cta:hover {
    background-color: var(--white);
    color: var(--dark-color);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--secondary-color);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .portfolio-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-contacts .phone-link span {
        display: none;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .contact-item {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 140px 0 80px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .service-card,
    .advantage-card {
        padding: 1.5rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .footer,
    .cta-button,
    .footer-cta {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    .container {
        max-width: 100%;
    }
}