/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.1);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2196F3;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fallback logo text (if image fails to load) */
.logo-mock {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2196F3;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: none; /* Hidden when logo image is present */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #2196F3;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #0d2b52 0%, #1565C0 55%, #1E88E5 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #bbdefb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.92);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: #1565C0;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.hero-image-mock {
    font-size: 8rem;
    text-align: center;
    opacity: 0.7;
}

/* Hero app icons composition */
.hero-icons {
    position: relative;
    height: 320px;
}

.hero-icon {
    position: absolute;
    border-radius: 22%;
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
    background: #fff;
    object-fit: cover;
    animation: hero-float 6s ease-in-out infinite;
}

.hero-icon-1 {
    width: 120px;
    height: 120px;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-icon-2 {
    width: 84px;
    height: 84px;
    top: 20px;
    left: 18%;
    animation-delay: -2s;
}

.hero-icon-3 {
    width: 84px;
    height: 84px;
    bottom: 20px;
    right: 16%;
    animation-delay: -4s;
}

@keyframes hero-float {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -14px; }
}

/* About Section */
.about {
    padding: 80px 0;
    background: #fff;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

/* Accent underline for section headings */
.about h2::after,
.apps h2::after,
.contact h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 0.75rem auto 0;
    border-radius: 2px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.about-intro {
    max-width: 720px;
    margin: 0 auto 3rem;
    text-align: center;
}

.about-intro p {
    font-size: 1.15rem;
    color: #666;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #f8f9fa;
    border-radius: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.feature h3 {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.feature p {
    color: #666;
    font-size: 0.95rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 760px;
    margin: 0 auto;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e3f2fd;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.08);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #2196F3, #1565C0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

/* Apps Section */
.apps {
    padding: 80px 0;
    background: #f8f9fa;
}

.apps h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.app-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.app-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.app-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-icon-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.app-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.app-card p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Store link styling updates - иконки как кнопки */
.app-stores {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center; /* Центрируем кнопки */
    margin-bottom: 1.5rem; /* Отступ перед ссылкой на политику */
}

.store-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    height: 65px; /* Фиксированная высота */
    width: 200px; /* ФИКСИРОВАННАЯ ШИРИНА для одинакового размера */
    position: relative;
}

/* Иконки сторов - заполняют ВСЮ кнопку */
.store-icon-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* COVER вместо CONTAIN - заполняет всю площадь */
    display: block;
    transition: transform 0.3s ease;
}

/* Цветовые схемы кнопок - применяются к самой ссылке */
.google-play {
    background: #f1f3f4;
    border: 1px solid #e8f0fe;
}

.google-play:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
}

.google-play:hover .store-icon-img {
    transform: scale(1.05);
}

.rustore {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
}

.rustore:hover {
    background: #ffe0b2;
    border-color: #f57c00;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.2);
}

.rustore:hover .store-icon-img {
    transform: scale(1.05);
}

.app-store {
    background: #f3f3f3;
    border: 1px solid #e0e0e0;
}

.app-store:hover {
    background: #e0e0e0;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(51, 51, 51, 0.2);
}

.app-store:hover .store-icon-img {
    transform: scale(1.05);
}

/* Стили для ссылок на политики конфиденциальности */
.app-privacy {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.privacy-link {
    display: inline-block;
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.privacy-link:hover {
    color: #2196F3;
    background: #e8f4f8;
    border-color: #2196F3;
    text-decoration: none;
}

.privacy-link:before {
    content: "🔒";
    margin-right: 0.5rem;
}

.privacy-placeholder {
    display: inline-block;
    color: #999;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .store-link {
        height: 55px;
        width: 180px; /* Фиксированная ширина на планшетах */
    }
    
    .app-stores {
        gap: 0.8rem;
        margin-bottom: 1.2rem;
    }
    
    .privacy-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .store-link {
        height: 50px;
        width: 160px; /* Фиксированная ширина на мобильных */
        border-radius: 6px;
    }
    
    .app-stores {
        gap: 0.7rem;
        margin-bottom: 1rem;
    }
    
    .privacy-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
    }
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #fff;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 960px;
    margin: 0 auto;
    background: linear-gradient(135deg, #0d2b52 0%, #1565C0 100%);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(13, 43, 82, 0.35);
    padding: 3.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.contact-content::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.contact-info {
    text-align: left;
    position: relative;
    z-index: 1;
}

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.contact-channel {
    display: block;
    padding: 0.85rem 1.25rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s, transform 0.3s;
}

.contact-channel:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(4px);
}

.contact-email {
    color: rgba(255,255,255,0.8);
}

.contact-email a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}

.contact-form {
    position: relative;
    z-index: 1;
}

.form-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    text-align: center;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.contact-info p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    transition: box-shadow 0.3s;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.35);
}

.submit-btn {
    width: 100%;
    background: #fff;
    color: #1565C0;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: transform 0.3s, box-shadow 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0d2b52 0%, #123a6b 100%);
    color: white;
    padding: 40px 0;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo-img {
    height: 24px;
    width: 24px;
    object-fit: contain;
    border-radius: 4px;
    opacity: 0.9;
}

.footer-logo-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .logo-img {
        height: 28px;
        width: 28px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .footer-logo-img {
        height: 20px;
        width: 20px;
    }
    
    .footer-logo-text {
        font-size: 1rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-icons {
        height: 200px;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-icon-1 {
        width: 92px;
        height: 92px;
        top: 54px;
    }

    .hero-icon-2,
    .hero-icon-3 {
        width: 64px;
        height: 64px;
    }

    .about-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-stats {
        gap: 1rem;
    }

    .stat {
        flex: 1;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem 1.5rem;
    }

    .app-icon {
        height: 70px;
    }
    
    .app-icon-img {
        width: 56px;
        height: 56px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-links {
        gap: 0.3rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll reveal (classes are added by main.js; without JS everything stays visible) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-icon {
        animation: none;
    }
}

/* Mobile burger menu */
.nav {
    position: relative;
}

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
    opacity: 0;
}

.nav-burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-burger {
        display: flex;
    }

    .nav-menu.open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.97);
        padding: 1.25rem 20px;
        box-shadow: 0 12px 24px rgba(0,0,0,0.12);
        border-top: 1px solid #eee;
    }
}

/* Additional mobile styles for very small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .about {
        padding: 60px 0;
    }
    
    .about h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .about-intro p {
        font-size: 1rem;
    }

    .stat {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .app-icon {
        height: 60px;
    }
    
    .app-icon-img {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-link {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
    padding: 4px 8px;
    border-radius: 4px;
}

.lang-link:hover {
    color: #2196F3;
    background: #f0f7ff;
}

.lang-link.active {
    color: #2196F3;
    font-weight: 700;
    pointer-events: none;
}

.lang-divider {
    color: #ccc;
    user-select: none;
}

/* Update nav to accommodate language switcher */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Responsive - hide nav menu on mobile but keep lang switcher */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-right {
        gap: 0; /* Only lang switcher visible on mobile */
    }
    
    .lang-switcher {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .lang-switcher {
        font-size: 0.8rem;
        gap: 0.4rem;
    }
    
    .lang-link {
        padding: 3px 6px;
    }
}

/* Logo error handling - show text fallback if image fails */
.logo-img[src=""] + .logo-mock,
.logo-img:not([src]) + .logo-mock {
    display: block;
}

/* Hide logo text when image is loaded */
.logo-img:not([src=""]) ~ .logo-mock {
    display: none;
}