/* 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: #fff;
    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, #f5f7fa 0%, #c3cfe2 100%);
}

.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, #2196F3, #1976D2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: #2196F3;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #1976D2;
}

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

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

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

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #666;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2196F3;
}

.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: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

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

.contact-info p {
    color: #666;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
}

.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;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
}

.submit-btn {
    background: #2196F3;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #1976D2;
}

/* Footer */
.footer {
    background: #333;
    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;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        flex-direction: row;
        justify-content: space-around;
        gap: 1rem;
    }
    
    .stat {
        flex: 1;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .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;
}

/* 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-content {
        gap: 2rem;
    }
    
    .about-text 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;
    }
}

/* 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;
}