/* =========================================
   Finapulse — Основные стили
   ========================================= */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #004eb3;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #004eb3;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #ff8562;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

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

.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: #004eb3;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #ff8562;
    margin: 12px auto 0;
}

/* --- Header --- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e9f4fd;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Text Logo */
.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #004eb3;
    letter-spacing: -0.5px;
}

.logo-tagline {
    font-size: 0.7rem;
    color: #2390a8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Навигация */
.main-nav .nav-menu {
    display: flex;
    gap: 32px;
}

.main-nav .nav-menu a {
    font-weight: 500;
    font-size: 1rem;
    color: #004eb3;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.main-nav .nav-menu a:hover,
.main-nav .nav-menu .current-menu-item a {
    color: #ff8562;
    border-bottom-color: #ff8562;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #004eb3;
    border-radius: 2px;
    transition: 0.3s;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 14px 32px;
    border: 2px solid #004eb3;
    border-radius: 6px;
    background: transparent;
    color: #004eb3;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}

.btn-primary {
    background: #004eb3;
    color: #ffffff;
    border-color: #004eb3;
}

.btn-primary:hover {
    background: #ff8562;
    border-color: #ff8562;
    color: #ffffff;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, #e9f4fd 0%, #ffffff 100%);
    padding: 120px 0 100px;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #004eb3;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #2390a8;
    max-width: 660px;
    margin: 0 auto 36px;
}

/* --- Services --- */
.services {
    background: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.service-card {
    background: #e9f4fd;
    border-radius: 12px;
    padding: 36px 28px;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 78, 179, 0.1);
}

.service-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
    line-height: 1;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #004eb3;
}

.service-card p {
    font-size: 0.95rem;
    color: #004eb3;
    opacity: 0.85;
    line-height: 1.5;
}

/* --- Blog Preview --- */
.blog-preview {
    background: #e9f4fd;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px 28px;
    border: 1px solid rgba(0, 78, 179, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}

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

.post-card .post-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.post-card .post-title a {
    color: #004eb3;
}

.post-card .post-title a:hover {
    color: #ff8562;
}

.post-date {
    display: block;
    font-size: 0.85rem;
    color: #2390a8;
    margin-bottom: 12px;
}

.post-excerpt {
    font-size: 0.95rem;
    color: #004eb3;
    opacity: 0.8;
    margin-bottom: 16px;
}

.read-more {
    font-weight: 600;
    color: #ff8562;
    font-size: 0.9rem;
}

.read-more:hover {
    color: #004eb3;
}

.no-posts {
    text-align: center;
    color: #2390a8;
    font-size: 1.1rem;
}

/* --- Contacts --- */
.contacts {
    background: #ffffff;
}

.contacts-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-weight: 600;
    color: #2390a8;
    font-size: 0.95rem;
}

.contact-item a {
    font-size: 1.1rem;
    color: #004eb3;
    font-weight: 500;
}

.contact-item a:hover {
    color: #ff8562;
}

/* Contact form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #004eb3;
}

.contact-form input,
.contact-form textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 16px;
    border: 1px solid #d0dce8;
    border-radius: 6px;
    background: #ffffff;
    color: #004eb3;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #ff8562;
    box-shadow: 0 0 0 3px rgba(255, 133, 98, 0.15);
}

.contact-form .btn {
    align-self: flex-start;
}

/* --- Footer --- */
.site-footer {
    background: #004eb3;
    color: #ffffff;
    padding: 60px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.site-footer h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #ffffff;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.site-footer a:hover {
    color: #ff8562;
}

.site-footer ul li {
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Page Content (generic) --- */
.page-content {
    max-width: 800px;
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 24px;
    color: #004eb3;
}

.entry-content p {
    margin-bottom: 1.2em;
}

/* --- Single Post --- */
.single-post {
    max-width: 800px;
}

.single-post .post-title {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.single-post .post-date {
    margin-bottom: 24px;
}

.single-post .post-thumbnail {
    margin-bottom: 32px;
}

.single-post .entry-content p {
    margin-bottom: 1.2em;
}

/* --- Blog Archive --- */
.archive-page .page-title {
    margin-bottom: 40px;
}

.pagination {
    margin-top: 48px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid #e9f4fd;
    border-radius: 6px;
    color: #004eb3;
}

.pagination .current {
    background: #004eb3;
    color: #ffffff;
    border-color: #004eb3;
}

.pagination a:hover {
    background: #e9f4fd;
}

/* --- 404 --- */
.error-404 h1 {
    font-size: 6rem;
    color: #ff8562;
    margin-bottom: 16px;
}

.error-404 p {
    font-size: 1.3rem;
    margin-bottom: 32px;
}

/* --- Widgets --- */
.widget {
    margin-bottom: 32px;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #004eb3;
    border-bottom: 2px solid #e9f4fd;
    padding-bottom: 8px;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.4rem;
    }

    .services-grid,
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 56px 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 36px;
    }

    .hero {
        padding: 80px 0 64px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .services-grid,
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contacts-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Mobile menu */
    .menu-toggle {
        display: flex;
    }

    .main-nav .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 20px;
        gap: 0;
        border-bottom: 1px solid #e9f4fd;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
    }

    .main-nav .nav-menu.active {
        display: flex;
    }

    .main-nav .nav-menu a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid #e9f4fd;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .service-card {
        padding: 28px 20px;
    }

    .post-card {
        padding: 24px 20px;
    }
}

/* Mobile nav JS toggle */
.main-nav .nav-menu.active {
    display: flex;
}
