/*
 Theme Name:   GeneratePress Child
 Template:     generatepress
*/

:root {
    --fin-blue: #0f172a;
    --fin-accent: #10b981;
    --fin-text-gray: #94a3b8;
}

/* --- 1. ШАПКА И НАВИГАЦИЯ (ГЛОБАЛЬНО) --- */
.site-header {
    position: absolute !important;
    top: 0; left: 0; width: 100%;
    z-index: 10000;
    background: transparent !important;
    border: none !important;
}

.site-header .main-title a,
.site-header .main-navigation .main-nav ul li a,
.site-header .menu-toggle {
    color: #ffffff !important;
}

.main-navigation, .main-navigation ul ul, .site-header .inside-header {
    background: transparent !important;
}

/* Убираем дубликаты меню темы */
.navigation-stick, .navigation-clone, .main-navigation.navigation-stick {
    display: none !important;
}

/* Логотип с микроскопом */
.site-branding .main-title a::before {
    content: '🔬' !important;
    margin-right: 10px;
}

/* --- 2. ЛИПКАЯ ШАПКА (STICKY) --- */
#masthead.sticky-nav, .site-header.sticky-nav {
    position: fixed !important;
    background-color: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3) !important;
    animation: slideDownNav 0.4s ease-out !important;
}

@keyframes slideDownNav {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* --- 3. HERO-СЕКЦИЯ (СИНИЙ БЛОК) --- */
.site-content { padding: 0 !important; }

.finora-hero {
    background: linear-gradient(135deg, var(--fin-blue) 0%, #1e293b 100%) !important;
    color: #ffffff !important;
    padding: 180px 20px 80px !important;
    width: 100vw;
    position: relative;
    left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw;
    text-align: center;
}

.finora-hero h1 {
    font-size: clamp(28px, 5vw, 42px) !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin-bottom: 20px !important;
}

/* --- 4. ГЛАВНАЯ СТРАНИЦА: КАРТОЧКИ-СЕЛЕКТОРЫ --- */
.hero-selector {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px auto 0 !important;
    max-width: 1200px;
}

.selector-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 30px !important;
    border-radius: 20px !important;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    text-decoration: none !important;
    transition: 0.3s ease;
}

.selector-card:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--fin-accent) !important;
    transform: translateY(-5px);
}

/* --- 5. ВИТРИНА ОФФЕРОВ (ДЕСКТОПНАЯ ПЛИТКА 3 В РЯД) --- */
body:not(.home) .site-content .content-area {
    width: 100% !important;
    max-width: 1200px;
    margin: 40px auto !important;
}

.sidebar, .widget-area { display: none !important; }

.offers-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 колонки на ПК */
    gap: 25px !important;
    margin: 20px 0 !important;
}

/* Вертикальная карточка */
.offer-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px 20px;
    display: flex !important;
    flex-direction: column !important;
    text-align: center;
    transition: 0.3s ease;
    height: 100%;
}

.offer-card:hover {
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
    border-color: var(--fin-accent);
}

/* Компоненты внутри карточки */
.offer-logo { margin: 0 auto 20px !important; min-height: 80px; display: flex; align-items: center; justify-content: center; }
.offer-logo img { max-width: 140px; height: auto; }
.offer-title { font-size: 20px !important; color: var(--fin-blue); margin-bottom: 20px !important; min-height: 50px; }

/* Сетка параметров (Сумма, Ставка и др.) */
.offer-params-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 15px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: left;
}

.param-label { font-size: 10px; color: var(--fin-text-gray); text-transform: uppercase; letter-spacing: 0.5px; }
.param-value { font-weight: 700; color: var(--fin-blue); font-size: 14px; }

/* ПСК и Особенности */
.offer-psk-box {
    background: #fff1f2; padding: 8px; border-radius: 8px; border: 1px solid #fecdd3;
    font-size: 11px; margin-bottom: 20px;
}
.psk-label { color: #9f1239; font-weight: 700; margin-right: 5px; }
.psk-value { color: #be123c; }

.offer-features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.feature-tag { background: #f1f5f9; border: 1px solid #e2e8f0; padding: 4px 10px; border-radius: 6px; font-size: 11px; color: #475569; }

.offer-score-badge { font-size: 12px; background: #f1f5f9; padding: 6px 12px; border-radius: 30px; margin-bottom: 15px; display: inline-block; }

.offer-action { margin-top: auto; }
.offer-button { width: 100% !important; padding: 14px !important; border-radius: 12px !important; margin-bottom: 10px; display: block; }
.offer-details { font-size: 12px; color: var(--fin-text-gray); text-decoration: underline; }

.offer-license { font-size: 10px; color: #cbd5e1; margin-top: 15px; font-style: italic; }

/* --- 6. СТРАНИЦА ЗАЙМА (single-loans.php) --- */
.single-loan-page { padding: 40px 20px; }
.product-full-card { background: #ffffff; padding: 40px; border-radius: 24px; border: 1px solid #e2e8f0; max-width: 900px; margin: 0 auto; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.product-card-header { text-align: center; margin-bottom: 40px; border-bottom: 1px solid #f1f5f9; padding-bottom: 30px; }
.product-logo-big img { max-width: 180px; margin-bottom: 20px; }
.product-main-name { font-size: 32px; font-weight: 800; color: var(--fin-blue); margin-bottom: 15px; }

.product-specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 40px; }
.spec-block { background: #f8fafc; padding: 20px; border-radius: 16px; text-align: center; border: 1px solid #f1f5f9; }
.spec-label { display: block; color: var(--fin-text-gray); font-size: 11px; text-transform: uppercase; margin-bottom: 5px; }
.spec-value { font-size: 18px; color: var(--fin-blue); font-weight: 800; }

.product-footer-action { position: sticky; bottom: 20px; z-index: 100; }
.cta-button { display: block; text-align: center; background: var(--fin-accent) !important; color: #fff !important; padding: 20px; border-radius: 16px; font-size: 18px; font-weight: 800; box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2); }

/* --- 7. ФУТЕР (ТЕМНЫЙ) --- */
.site-footer, .site-footer .footer-widgets, .site-footer .inside-footer-widgets, .site-footer .site-info {
    background-color: var(--fin-blue) !important;
    color: var(--fin-text-gray) !important;
    border: none !important;
}
.site-footer { padding: 60px 0 40px !important; }
.footer-widgets { display: grid !important; grid-template-columns: 1.5fr 1fr 1fr !important; gap: 40px; max-width: 1200px; margin: 0 auto !important; }
.footer-col h4 { color: #ffffff !important; font-size: 18px !important; margin-bottom: 20px !important; }
.footer-col a { color: var(--fin-text-gray) !important; text-decoration: none !important; }
.footer-col a:hover { color: var(--fin-accent) !important; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 40px; max-width: 1200px; margin: 40px auto 0 !important; font-size: 12px; }

/* --- 8. АДАПТИВНОСТЬ (МОБИЛЬНЫЕ) --- */
@media (max-width: 1024px) {
    .offers-grid { grid-template-columns: repeat(2, 1fr) !important; } /* 2 в ряд на планшетах */
}

@media (max-width: 768px) {
    .offers-grid { grid-template-columns: 1fr !important; } /* 1 в ряд на мобильных */
    .offer-card { padding: 20px !important; }
    .offer-title { font-size: 18px !important; }
    .footer-widgets { grid-template-columns: 1fr !important; text-align: center; }
    .finora-hero { padding: 140px 20px 40px !important; }
    .product-specs-grid { grid-template-columns: 1fr 1fr; }
}