* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --primary-light: #6BA3E8;
    --text-dark: #2c3e50;
    --text-gray: #666;
    --bg-light: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Предотвращение нежелательного скролла на мобильных */
@media (max-width: 768px) {
    html {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    body {
        position: relative;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Предотвращение bounce-эффекта на iOS */
    body.fixed {
        position: fixed;
        width: 100%;
        overflow: hidden;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Header */
.top-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: visible;
    z-index: 100;
}

.top-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

.top-header-name {
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.top-header-right {
    display: flex;
    gap: 15px;
}

.top-link {
    color: white;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: inline-block;
    z-index: 10;
    pointer-events: auto;
}

.top-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.top-link:hover::before {
    width: 300px;
    height: 300px;
}

.top-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.top-link:active {
    transform: translateY(0);
}

/* Main Navigation */
.main-nav {
    background-color: white;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 99;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
}

.main-nav.scrolled {
    padding: 15px 0;
    box-shadow: var(--shadow-md);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    color: #4A90E2;
}

.logo-text h1 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.logo-text p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 25px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all var(--transition-normal);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: translateX(-50%);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

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

.nav-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #4A90E2;
}

.phone-number {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

/* Hero Section - Slideshow */
.hero {
    background: linear-gradient(to right, #f5f5f5, #ffffff);
    padding: 60px 0;
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.slideshow-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    perspective: 1200px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: rotateY(90deg);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.slide.active {
    opacity: 1;
    transform: rotateY(0deg);
    z-index: 2;
}

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

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #4A90E2;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.slideshow-nav:hover {
    background-color: #4A90E2;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.slideshow-nav.prev {
    left: 20px;
}

.slideshow-nav.next {
    right: 20px;
}

.slideshow-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 25px;
}

.slideshow-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.slideshow-dots .dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.slideshow-dots .dot.active {
    background-color: #4A90E2;
    width: 14px;
    height: 14px;
    border-color: white;
}

/* Main Content */
.main-content {
    padding: 60px 0;
    background: linear-gradient(to bottom, #ffffff, var(--bg-light));
    min-height: 60vh;
}

/* Fade-in animation for content */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.welcome-section {
    flex: 1;
    min-width: 300px;
}

.welcome-section h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    animation: slideInLeft 0.6s ease;
}

.welcome-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.welcome-section p {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    transition: all var(--transition-normal);
}

.welcome-section p:hover {
    color: var(--text-dark);
    padding-left: 5px;
}

.welcome-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
    display: inline-block;
}

.welcome-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.welcome-section a:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

.welcome-section a:hover::after {
    width: 100%;
}

.procedures-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.procedure-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.procedure-icon {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.face-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.procedure-card h3 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.procedure-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

.procedure-card a {
    color: #4A90E2;
    text-decoration: none;
}

.procedure-card a:hover {
    text-decoration: underline;
}

/* ====================== МОБИЛЬНОЕ МЕНЮ ====================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    transition: color 0.3s;
}

.mobile-menu-toggle:hover {
    color: var(--primary-color);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(180deg, #4A90E2 0%, #357ABD 100%);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-header {
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-header h3 {
    color: white;
    font-size: 1.3rem;
    margin: 0;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.mobile-nav-links a {
    color: white;
    text-decoration: none;
    padding: 16px 25px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
    padding-left: 30px;
}

.mobile-nav-links a i {
    width: 24px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Мобильное меню */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
    }

    .main-nav {
        padding: 15px 0;
    }

    .nav-content {
        justify-content: space-between;
    }

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

    /* Top header */
    .top-header {
        padding: 8px 0;
    }

    .top-header-content {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .top-header-name {
        font-size: 16px;
    }

    .top-header-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        z-index: 100;
        position: relative;
    }

    .top-link {
        padding: 8px 14px;
        font-size: 13px;
        z-index: 101;
        position: relative;
        pointer-events: auto;
        touch-action: manipulation;
    }

    /* Hero section */
    .slideshow-wrapper {
        height: 250px;
    }

    .slideshow-nav {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .slideshow-nav.prev {
        left: 5px;
    }

    .slideshow-nav.next {
        right: 5px;
    }

    .slideshow-dots {
        bottom: 10px;
        padding: 6px 12px;
        gap: 8px;
    }

    .slideshow-dots .dot {
        width: 8px;
        height: 8px;
    }

    .slideshow-dots .dot.active {
        width: 10px;
        height: 10px;
    }

    /* Content */
    .main-content {
        padding: 30px 0;
    }

    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .welcome-section {
        min-width: 100%;
    }

    .welcome-section h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .welcome-section p {
        font-size: 15px;
    }

    /* Cards */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modern-card,
    .article-card,
    .service-card {
        padding: 20px;
        margin-bottom: 15px;
    }

    .article-card h3 {
        font-size: 20px;
    }

    .service-card-icon {
        font-size: 40px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    /* Contact cards */
    .contact-card {
        padding: 25px;
    }

    .contact-info {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Table - преобразование в карточки на мобильных */
    .modern-table-container .modern-table,
    .admin-table-container .admin-table {
        display: none;
    }

    /* Таблицы без контейнера */
    table.modern-table:not(:has(+ .table-mobile-view)) {
        display: none;
    }

    .table-mobile-view {
        display: block;
    }

    /* Показываем мобильную версию вместо таблицы */
    .modern-table-container .table-mobile-view,
    .table-mobile-view {
        display: block !important;
    }

    .table-mobile-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .table-mobile-card-header {
        font-weight: 600;
        color: var(--primary-color);
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #e9ecef;
        font-size: 18px;
    }

    .table-mobile-row {
        display: flex;
        justify-content: space-between;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-mobile-row:last-child {
        border-bottom: none;
    }

    .table-mobile-label {
        font-weight: 600;
        color: #666;
        font-size: 14px;
        flex: 0 0 40%;
    }

    .table-mobile-value {
        color: #2c3e50;
        font-size: 14px;
        flex: 1;
        text-align: right;
        word-break: break-word;
    }

    /* Scroll to top */
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }

    /* Container */
    .container {
        padding: 0 15px;
    }

    /* Модальные окна */
    .modal-content {
        width: 95%;
        padding: 25px;
        margin: 20px;
    }

    /* Кнопки */
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Формы */
    input, textarea, select {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 360px) {
    .welcome-section h2 {
        font-size: 20px;
    }

    .modern-card,
    .article-card,
    .service-card {
        padding: 15px;
    }

    .top-header-name {
        font-size: 12px;
    }

    .nav-logo img {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .top-header-name {
        font-size: 14px;
    }

    .welcome-section h2 {
        font-size: 22px;
    }

    .modern-card,
    .article-card,
    .service-card {
        padding: 15px;
    }

    .slideshow-wrapper {
        height: 200px;
    }

    .admin-page-title {
        font-size: 1.4rem;
    }
}

/* Button Styles - унифицированные стили кнопок */
button, .btn {
    background-color: #4A90E2;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.3s;
    font-family: inherit;
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
    background-color: #357ABD;
}

button:disabled, .btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary {
    background-color: #4A90E2;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #357ABD;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #218838;
}

/* Modern Card Styles */
.modern-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.05), transparent);
    transition: left 0.5s;
}

.modern-card:hover::before {
    left: 100%;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--primary-color);
}

.article-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.article-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.1));
    transition: right 0.4s;
    pointer-events: none;
}

.article-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--primary-color);
}

.article-card:hover::after {
    right: 0;
}

.article-card h3 {
    color: var(--text-dark);
    font-size: 22px;
    margin-bottom: 12px;
    transition: color var(--transition-normal);
}

.article-card:hover h3 {
    color: var(--primary-color);
}

.article-card a {
    color: inherit;
    text-decoration: none;
    display: block;
    position: relative;
    z-index: 1;
}

/* Service Card Styles */
.service-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.service-card:hover::before {
    opacity: 1;
}

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

.service-card-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: all var(--transition-normal);
}

.service-card:hover .service-card-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-dark);
}

/* Modern Table Styles */
.modern-table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.modern-table-container:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    margin-top: 0;
}

.modern-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.modern-table th {
    padding: 18px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color var(--transition-fast);
}

.modern-table tbody tr {
    transition: all var(--transition-fast);
}

.modern-table tbody tr:hover {
    background-color: rgba(74, 144, 226, 0.05);
    transform: scale(1.01);
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* Contact Card Styles */
.contact-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.contact-card:hover::before {
    transform: scaleY(1);
}

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

.contact-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.contact-card:hover .contact-icon {
    transform: rotate(360deg) scale(1.1);
}

/* Grid Layouts */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

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

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    z-index: 1000;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}

.scroll-to-top.visible {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Stagger animation for cards */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading overlay with hourglass */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    pointer-events: auto;
}

.loading-overlay.active {
    display: flex;
}

/* Затемнение контента страницы при активном overlay */
body.loading-active {
    filter: brightness(0.7);
    pointer-events: none;
    overflow: hidden;
    transition: filter 0.3s ease;
}

body.loading-active * {
    pointer-events: none !important;
}

.loading-overlay-content {
    background: white;
    border-radius: 16px;
    padding: 40px 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
    position: relative;
    z-index: 10001;
}

.loading-hourglass {
    font-size: 64px;
    color: var(--primary-color);
    animation: hourglassRotate 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes hourglassRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(90deg);
    }
    50% {
        transform: rotate(180deg);
    }
    75% {
        transform: rotate(270deg);
    }
}

.loading-overlay-message {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 500;
    text-align: center;
    margin: 0;
}

