/*
Theme Name: RDN Child
Template: astra
Description: Child theme of Astra for фонд-рдн.рф — «тихая» типографика,
воздушная вёрстка, mobile-first. No gold lines: navy buttons with gold
hover accent only.
Version: 4.1
*/

/* Logo sizing (site-wide) */
.custom-logo {
    max-height: 150px;
    width: auto;
}

:root {
    --rdn-navy: #1B2A4A;
    --rdn-gold: #A87C2A;
    --rdn-ink: #16233D;
    --rdn-line: #EDEBE4;
    --rdn-muted: #7A828E;
    --rdn-paper: #FAFAF7;
}

body {
    background: #FFFFFF !important;
}

/* serif quiet headings — must beat Astra's inline styles */
h1, h2, h3, h4, .entry-title {
    font-family: Georgia, 'Times New Roman', serif !important;
    font-weight: 400 !important;
    color: var(--rdn-ink) !important;
}

/* links */
a { color: var(--rdn-navy); }
a:hover, a:focus { color: var(--rdn-gold); }

/* navy buttons, gold hover only — no underlines, no gold lines */
.wp-block-button__link, .ast-button, .ast-custom-button,
.otzyvy-card .btn, .ast-read-more-container a, .rdn-more, .rdn-btn {
    background: var(--rdn-navy) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 12px 26px !important;
    font-size: 16px !important;
    text-decoration: none !important;
    transition: background .2s ease !important;
}
.wp-block-button__link:hover, .ast-button:hover, .ast-custom-button:hover,
.otzyvy-card .btn:hover, .ast-read-more-container a:hover,
.rdn-more:hover, .rdn-btn:hover {
    background: var(--rdn-gold) !important;
    color: #FFFFFF !important;
}
/* outline (white) buttons on dark covers keep their style */
.wp-block-cover .is-style-outline .wp-block-button__link {
    background: transparent !important;
    color: #FFFFFF !important;
    border: 2px solid #FFFFFF !important;
    border-radius: 6px !important;
}
.wp-block-cover .is-style-outline .wp-block-button__link:hover {
    background: #FFFFFF !important;
    color: var(--rdn-navy) !important;
}

/* read-more as a compact button */
.ast-read-more-container a {
    display: inline-block;
    padding: 10px 22px !important;
    font-size: 15px !important;
}

/* mobile: full-width tap targets */
@media (max-width: 899px) {
    .wp-block-button__link, .ast-button, .ast-custom-button,
    .otzyvy-card .btn, .ast-read-more-container a, .rdn-more, .rdn-btn {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* airy cards */
.ast-article-post, .otzyvy-card, .rdn-card {
    background: #FFFFFF !important;
    border: 1px solid var(--rdn-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 20px rgba(27, 42, 74, .05) !important;
    overflow: hidden;
}

/* muted card body text */
.ast-excerpt-container p, .rdn-cap p {
    color: var(--rdn-muted) !important;
    font-size: 15px;
}

/* rounded photos — uniform everywhere, including full-width covers */
.ast-single-post-featured-section img,
.page .entry-content img,
.entry-content img,
.wp-block-image img {
    border-radius: 14px;
}
.wp-block-cover {
    border-radius: 14px !important;
    overflow: hidden !important;
}

/* footer: light, quiet */
.site-footer {
    background: var(--rdn-paper) !important;
    border-top: 1px solid #F0EFEB;
    color: var(--rdn-muted) !important;
}
.site-footer a {
    color: var(--rdn-navy) !important;
}
.site-footer a:hover {
    color: var(--rdn-gold) !important;
}

/* hover polish only on devices that actually hover */
@media (hover: hover) {
    .ast-article-post, .otzyvy-card, .rdn-card {
        transition: transform .2s ease, box-shadow .2s ease;
    }
    .ast-article-post:hover, .otzyvy-card:hover, .rdn-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 32px rgba(27, 42, 74, .10) !important;
    }
}

/* mobile hero: not too tall */
@media (max-width: 899px) {
    .wp-block-cover {
        min-height: 340px !important;
    }
}

/* preview page showcase chrome (mobile-first grid) */
.rdn-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 20px 0;
}
.rdn-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.rdn-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
.rdn-cap {
    padding: 14px 16px 18px;
}
.rdn-cap h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}
.rdn-cap p {
    margin: 0 0 14px;
}
.rdn-foot {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 8px;
    font-size: 14px;
    background: var(--rdn-paper);
    border: 1px solid #F0EFEB;
    color: var(--rdn-muted);
}
@media (min-width: 900px) {
    .rdn-grid { gap: 24px; margin: 24px 0; }
    .rdn-card { width: calc(50% - 12px); min-width: 280px; }
}
