/* ===== ROOT VARIABLES ===== */
:root {
    --primary-bg: #F5F8FF;
    --primary-text: #123A66;
    --accent-blue: #00A1C6;
    --accent-yellow: #FFC857;
    --secondary-text: #2E4057;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --shadow-light: rgba(18, 58, 102, 0.08);
    --shadow-medium: rgba(18, 58, 102, 0.16);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--secondary-text);
    background-color: var(--primary-bg);
    font-weight: 400;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-text);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--secondary-text);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-text);
}

/* ===== LAYOUT UTILITIES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-yellow));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--dark-gray);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #0085a3);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 161, 198, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 161, 198, 0.4);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-text);
    border: 2px solid var(--accent-blue);
    box-shadow: 0 2px 10px var(--shadow-light);
}

.btn-secondary:hover {
    background: var(--accent-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.btn-outline:hover {
    background: var(--accent-blue);
    color: var(--white);
}

/* ===== HEADER STYLES ===== */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--medium-gray);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.brand-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-text);
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary-text);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.nav-active {
    color: var(--accent-blue);
    background: rgba(0, 161, 198, 0.1);
}

.mobile-toggle {
    display: none; /* Скрыто на desktop */
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10000;
    position: relative;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-text);
    margin: 3px 0;
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== PAGE HEADER STYLES ===== */
.page-header {
    position: relative;
    padding: 8rem 0 5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.page-header-animated {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.page-header-geometric {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--white);
}

.page-header-gradient {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: var(--white);
}

.page-header-nature {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: var(--white);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-header-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.page-header-animated .page-header-content h1,
.page-header-geometric .page-header-content h1,
.page-header-gradient .page-header-content h1,
.page-header-nature .page-header-content h1 {
    color: var(--white);
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.page-header-content p {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.95;
}

.page-header-animated .page-header-content p,
.page-header-geometric .page-header-content p,
.page-header-gradient .page-header-content p,
.page-header-nature .page-header-content p {
    color: rgba(255,255,255,0.95);
}

.page-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: pulse 3s ease-in-out infinite;
}

.page-header-icon img {
    width: 50px;
    height: 50px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255,255,255,0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(255,255,255,0);
    }
}

.page-header-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(0, 161, 198, 0.1) 100%);
    z-index: -2;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 200, 87, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-background::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 161, 198, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 6rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--accent-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--medium-gray);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== GRID LAYOUTS ===== */
.features-grid,
.routes-grid,
.articles-grid {
    display: grid;
    gap: 2rem;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.routes-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ===== CARD STYLES ===== */
.feature-card,
.route-card,
.article-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before,
.route-card::before,
.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-yellow));
}

.feature-card:hover,
.route-card:hover,
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3,
.route-card h3,
.article-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-text);
}

/* ===== SECTION STYLING ===== */
.features-section,
.popular-routes,
.articles-preview,
.newsletter-section {
    padding: 5rem 0;
}

.features-section {
    background: var(--white);
}

.popular-routes {
    background: var(--light-gray);
}

/* ===== ROUTE CARD SPECIFIC ===== */
.route-image {
    height: 400px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-yellow));
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.route-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--white);
    color: var(--primary-text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.route-details {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.route-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-blue);
    font-weight: 500;
    margin-top: 1rem;
}

.route-link:hover {
    color: var(--primary-text);
}

/* ===== ARTICLE CARD SPECIFIC ===== */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.category {
    background: var(--accent-yellow);
    color: var(--primary-text);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
}

.article-link {
    color: var(--accent-blue);
    font-weight: 500;
    margin-top: 1rem;
    display: inline-block;
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-text), var(--accent-blue));
    color: var(--white);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.newsletter-text h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.newsletter-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

.newsletter-form .form-group {
    display: flex;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
}

/* ===== FOOTER STYLES ===== */
.main-footer {
    background: var(--primary-text);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-yellow);
}

.contact-info p {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--accent-yellow);
}

.work-hours {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.work-hours p {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ===== COOKIE POPUP ===== */
.cookie-popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    left: auto;
    max-width: 400px;
    background: var(--white);
    border-radius: 12px;
    border: 3px solid var(--accent-blue);
    box-shadow: 0 10px 40px var(--shadow-medium);
    padding: 1.5rem;
    z-index: 10000;
    transform: translateY(150px);
    opacity: 0;
    transition: var(--transition);
}

.cookie-popup.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-text h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-text);
    font-size: 1.125rem;
}

.cookie-text p {
    color: var(--secondary-text);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.cookie-link {
    color: var(--accent-blue);
    font-size: 0.875rem;
    white-space: nowrap;
    text-decoration: none;
}

.cookie-link:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cookie-popup {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-actions .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-wrapper {
        position: relative;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 1rem);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border-radius: 12px;
        gap: 0.5rem;
        z-index: 9999;
        margin: 0 1rem;
    }

    .nav-links li {
        margin: 0;
    }
    
    .nav-links li:not(:last-child) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links a {
        padding: 1rem 1.25rem;
        border-radius: 8px;
        width: 100%;
        display: block;
        text-align: left;
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover,
    .nav-links a.nav-active {
        background: var(--accent-blue);
        color: var(--white);
        transform: translateX(5px);
    }
    
    .nav-links.show {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-toggle {
        display: flex; /* Показать на mobile */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .features-grid,
    .routes-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 6rem 0 4rem;
    }
    
    .page-header-content h1 {
        font-size: 2.5rem;
    }
    
    .page-header-content p {
        font-size: 1.1rem;
    }
    
    .page-header-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .page-header-icon {
        width: 80px;
        height: 80px;
    }
    
    .page-header-icon img {
        width: 40px;
        height: 40px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-content {
        padding: 4rem 0;
    }
    
    .page-header {
        padding: 5rem 0 3rem;
    }
    
    .page-header-content h1 {
        font-size: 2rem;
    }
    
    .page-header-content p {
        font-size: 1rem;
    }
    
    .page-header-stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .features-section,
    .popular-routes,
    .articles-preview,
    .newsletter-section {
        padding: 3rem 0;
    }
    
    .feature-card,
    .route-card,
    .article-card {
        padding: 1.5rem;
    }
    
    .cookie-popup {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 1.5rem;
        max-width: none;
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-actions .btn {
        width: 100%;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}