:root {
    --color-primary: #1a365d;
    --color-secondary: #c9a96e;
    --color-accent: #2d3748;
    --color-light: #f7fafc;
    --color-white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-accent);
    background-color: var(--color-white);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-secondary);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #b8975a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
}

.btn-outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* Header */
header {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.logo span {
    color: var(--color-secondary);
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav li {
    margin-left: 2rem;
}

nav a {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

nav a:hover {
    color: var(--color-secondary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
}

.social-icons a {
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-secondary);
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.9) 0%, rgba(26, 54, 93, 0.8) 100%), url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') no-repeat center center/cover;
    color: var(--color-white);
    padding: 8rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

.hero-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-align: left;
    display: inline-block;
}

.hero-list li {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    padding: 0.5rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.hero-list li i {
    color: var(--color-secondary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background-color: var(--color-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--color-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--color-white);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Карусель с правильной структурой */
.articles-carousel {
    padding: 5rem 0;
    background: var(--color-light);
    position: relative;
}

.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.carousel-header {
    text-align: center;
    margin-bottom: 3rem;
}

.carousel-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.carousel-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--color-secondary);
}

.carousel-subtitle {
    font-size: 1.1rem;
    color: var(--color-accent);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

.carousel-wrapper {
    position: relative;
    margin: 0 60px;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: 16px;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    flex: 0 0 33.333%;
    min-width: 0;
    padding: 0 15px;
    box-sizing: border-box;
}

.carousel-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 2rem;
    height: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(201, 169, 110, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.carousel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-secondary), #b8975a);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.carousel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.carousel-card:hover::before {
    transform: scaleX(1);
}

.card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.card-date i {
    font-size: 1rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-primary);
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 0 0 auto;
    min-height: 2.8em;
    max-height: 2.8em;
}

.card-excerpt {
    color: var(--color-accent);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 4.8em;
    max-height: 4.8em;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-secondary);
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: auto;
    background: transparent;
}

.card-link:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    transform: translateX(5px);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-nav:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(201, 169, 110, 0.3);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.carousel-nav:disabled:hover {
    background: var(--color-white);
    color: var(--color-secondary);
    transform: translateY(-50%);
}

.carousel-prev {
    left: -55px;
}

.carousel-next {
    right: -55px;
}

.carousel-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    width: 100%;
}

.carousel-empty i {
    font-size: 4rem;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.carousel-empty h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.carousel-empty p {
    color: var(--color-accent);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    width: 100%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--color-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.view-all {
    text-align: center;
    margin-top: 3rem;
}

/* About Preview Section */
.about-preview {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-white) 100%);
    text-align: center;
}

.about-preview-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-preview-text h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.preview-description {
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--color-accent);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Page Header (shared between services and blog pages) */
.page-header {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 50%, #1a365d 100%);
    color: var(--color-white);
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(201,169,110,0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 50%, rgba(201,169,110,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
}

.page-header h1 {
    color: var(--color-white);
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
}

.page-header p {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* Active nav link */
nav a.active {
    color: var(--color-secondary);
}

/* Contacts Section */
.contacts {
    padding: 5rem 0;
    background: var(--color-white);
    text-align: center;
}

.contacts-content {
    max-width: 600px;
    margin: 0 auto;
}

.contacts-content p {
    font-size: 1.2rem;
    color: var(--color-accent);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.contacts-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
}

.telegram-btn {
    background-color: #0088cc;
}

.telegram-btn:hover {
    background-color: #006da3;
}

.whatsapp-btn {
    background-color: #25d366;
}

.whatsapp-btn:hover {
    background-color: #1da851;
}

.vk-btn {
    background-color: #0077ff;
}

.vk-btn:hover {
    background-color: #0066dd;
}

.footer-legal {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-top: 1rem;
    line-height: 1.6;
}

.footer-legal a {
    color: rgba(255,255,255,0.6);
}

.footer-legal a:hover {
    color: var(--color-secondary);
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }

    .contacts-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Footer - оригинальная версия */
footer {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    color: var(--color-white);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-secondary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-column a:hover {
    opacity: 1;
    color: var(--color-secondary);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.contact-info a {
    color: inherit;
}

.contact-info i {
    margin-right: 10px;
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Адаптивность — мобильное меню и общие стили */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    nav ul.active {
        display: flex;
    }

    nav li {
        margin: 0;
        text-align: center;
        padding: 0.5rem 0;
    }

    nav a {
        display: block;
        padding: 0.8rem 1rem;
    }

    .social-icons {
        margin-left: 0;
        justify-content: center;
        padding: 1rem 0;
    }

    .hero {
        padding: 5rem 0;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

/* Адаптивность — карусель */
@media (max-width: 1024px) {
    .carousel-slide {
        flex: 0 0 50%;
    }
    
    .carousel-wrapper {
        margin: 0 50px;
    }
    
    .carousel-card {
        height: 300px;
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.2rem;
        min-height: 2.6em;
        max-height: 2.6em;
    }
    
    .card-excerpt {
        min-height: 4.5em;
        max-height: 4.5em;
    }
    .carousel-prev {
        left: -20px;
    }
    .carousel-next {
        right: -20px;
    }
}

@media (max-width: 768px) {
    .carousel-wrapper {
        margin: 0 40px;
    }
    
    .carousel-slide {
        flex: 0 0 100%;
    }
    
    .carousel-card {
        height: 280px;
        padding: 1.5rem;
    }
    
    .carousel-nav {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .carousel-title {
        font-size: 2rem;
    }
    
    .about-preview-text h2 {
        font-size: 2rem;
    }
    
    .card-title {
        font-size: 1.1rem;
        min-height: 2.4em;
        max-height: 2.4em;
    }
    
    .card-excerpt {
        min-height: 4.2em;
        max-height: 4.2em;
        font-size: 0.9rem;
    }
    
    .card-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .carousel-prev {
        left: -15px;
    }
    .carousel-next {
        right: -15px;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        margin: 0 30px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .carousel-card {
        height: 260px;
        padding: 1.25rem;
    }
    
    .carousel-title {
        font-size: 1.8rem;
    }
    
    .carousel-subtitle {
        font-size: 1rem;
    }
    
    .about-preview-text h2 {
        font-size: 1.8rem;
    }
    
    .preview-description {
        font-size: 1rem;
    }
    .carousel-prev {
        left: -10px;
    }
    .carousel-next {
        right: -10px;
    }
}
/* Дополнительные стили для улучшения отображения контента */
.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.article-content {
    line-height: 1.7;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin: 2rem 0 1rem 0;
    color: var(--color-primary);
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--color-secondary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--color-accent);
}

/* Стили для страницы статьи */
.article-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
}

.article-body {
    line-height: 1.8;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

/* Утилитарные классы */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Стили для уведомлений */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}