@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap');

:root {
    --primary-color: #00A8FF; /* Bright Blue */
    --secondary-color: #0077B6;
    --background-color: #0A192F; /* Deep Navy */
    --card-color: #172A45;
    --text-color: #CCD6F6;
    --text-light: #8892B0;
    --white-color: #E6F1FF;
    --hover-glow: 0px 0px 15px rgba(0, 168, 255, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 0;
}
img {
    max-width: 100%;
}
/* Header */
#main-header {
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: top 0.3s;
}

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

.logo {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--white-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    box-shadow: var(--hover-glow);
}

.btn-secondary {
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-primary.large, .btn-secondary.large {
    padding: 14px 30px;
    font-size: 1.1rem;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 10;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--white-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero */
.hero {
    background:
            linear-gradient(rgba(10,20,40,0.75), rgba(10,20,40,0.85)),
            url('/image/hero.png') center/cover no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(23, 42, 69, 0.8) 0%, var(--background-color) 70%);
    z-index: -1;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 800;
    color: var(--white-color);
    margin-bottom: 0.5rem;
}

.hero h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero .subtitle {
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--white-color);
    margin-bottom: 0.5rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-color);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid #1D3557;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--white-color);
    margin-bottom: 1rem;
}

.portal-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    margin-top: 1.5rem;
    display: inline-block;
}

/* Download Section */
.download-section {
    background: var(--card-color);
    text-align: center;
    padding: 80px 20px;
}

.download-section h2 { font-size: 2.5rem; color: var(--white-color); }
.download-section p { max-width: 500px; margin: 1rem auto 2.5rem; }

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.app-button {
    background: #0A192F;
    color: var(--white-color);
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #1D3557;
}
.app-button:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-glow);
    border-color: var(--primary-color);
}
.app-button .app-icon { font-size: 2rem; margin-right: 1rem; }
.app-button strong { font-size: 1.2rem; display: block; }
.google-play-icon { width: 24px; height: 24px; fill: currentColor; margin-right: 1rem; }


/* Login Portals */
.portal-login-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.portal-box {
    background: var(--card-color);
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid #1D3557;
    transition: all 0.3s;
}
.portal-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--hover-glow);
}
.portal-box h3 { color: var(--white-color); font-size: 1.8rem; }

/* CTA */
.cta {
    background:
            linear-gradient(rgba(10,20,40,0.75), rgba(10,20,40,0.85)),
            url('/image/1.png') center/cover no-repeat;
    text-align: center;
    padding: 80px 20px;
}
.cta h2 { font-size: 2.8rem; color: var(--white-color); }
.cta p { margin: 1rem auto 2.5rem; max-width: 500px; color: var(--white-color); opacity: 0.9; }
.cta .btn-primary { background: var(--white-color); color: var(--secondary-color); border-color: var(--white-color); }
.cta .btn-primary:hover { background: transparent; color: var(--white-color); }

/* Footer */
footer {
    background-color: #05101F;
    padding: 2rem 5%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/*********************************/
/* ----- BLOG STYLES ----- */
/*********************************/

/* Заголовок страницы (для категорий и постов) */
.page-title-section {
    padding: 140px 20px 60px;
    text-align: center;
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)), url('https://images.unsplash.com/photo-1484653692349-354e2a774699?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxfDB8MXxyYW5kb218MHx8Y29ja3BpdHx8fHx8fDE2MjkxMDY3OTY&ixlib=rb-1.2.1&q=80&utm_campaign=api-credit&utm_medium=referral&utm_source=unsplash_source&w=1080') no-repeat center center/cover;
}

.page-title-section h1 {
    font-size: 3.5rem;
    color: var(--white-color);
}

.page-title-section p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0.5rem auto 0;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Сетка категорий */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
    gap: 2rem;
    justify-content: center;
}

.category-card {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.95), transparent);
}

.category-card h3 {
    color: var(--white-color);
    font-size: 1.8rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 320px));
    gap: 10px;
    margin-top: 50px;
    justify-content: center;
}

.gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

/* Сетка постов */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--card-color);
    border: 1px solid #1D3557;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-glow);
    border-color: var(--primary-color);
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
}

.post-card h3 {
    color: var(--white-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.post-excerpt {
    color: var(--text-light);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.post-date {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: auto;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 16px;
    background: #111;
}

/* Скелетон */
.skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            90deg,
            #1f1f1f 25%,
            #2a2a2a 37%,
            #1f1f1f 63%
    );
    background-size: 400% 100%;
    animation: shimmer 1.4s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Картинка */
.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Когда загрузилась */
.image-wrapper img.loaded {
    opacity: 1;
}


/* Адаптив для блога */
@media screen and (max-width: 480px) {
    .page-title-section h1 {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 900px) {
    .nav-links {
        position: fixed;
        right: 0px;
        top: 0px;
        height: 100vh;
        background-color: var(--card-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }
    .nav-links.nav-active {
        transform: translateX(0%);
    }
    .hamburger {
        display: block;
    }
    .actions {
        display: none;
    }
    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin-top: 2rem;
    }
    .hero h1 {
        font-size: 3.5rem;
    }
    .hero h2 {
        font-size: 1.5rem;
    }
    .portal-login-options {
        grid-template-columns: 1fr;
    }
}


/* --- MOBILE PHONES --- */
@media screen and (max-width: 480px) {
    .container {
        padding: 60px 0;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
    .hero h2 {
        font-size: 1.3rem;
    }
    .section-title h2 {
        font-size: 2.2rem;
    }
    .cta h2 {
        font-size: 2.2rem;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        margin-top: 1rem;
    }
    .footer-links a {
        margin: 0 0.5rem;
    }
}

/* Animation for Hamburger Icon */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.toggle .line2 {
    opacity: 0;
}
.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (min-width: 901px) and (max-width: 991px) {
    .btn-primary, .btn-secondary {
        padding: 2px 6px;
    }
}


@media (max-width: 767px) {
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    footer .container {
        padding: 30px 0;
    }
}
