/* RockWalls finish layer: breadcrumbs, article cards, links in texts, entrance animations. */

/* ---------- Breadcrumbs: one look on content pages and in the catalogue ---------- */
/* Only the type and colours: each page keeps its own crumb position (centred column on content pages). */
body:not(.wp-admin) :is(.rwc-content-breadcrumbs,.woocommerce-breadcrumb){border:0!important;background:none!important;font:400 14px/1.4 Roboto,Arial,sans-serif!important;color:#64728d!important}
/* Above a .rwc-page the crumbs take the page's own column so they line up with its heading. */
body:not(.wp-admin) .rwc-content-breadcrumbs:has(+.rwc-page){box-sizing:border-box;max-width:1240px!important;padding-left:24px!important;padding-right:24px!important}
body:not(.wp-admin) .rwc-content-breadcrumbs ol{display:flex;flex-wrap:wrap;align-items:center;gap:4px 0;margin:0!important;padding:0!important;list-style:none!important}
body:not(.wp-admin) .rwc-content-breadcrumbs li{display:inline-flex;align-items:center;margin:0!important;padding:0!important;font:inherit!important;color:inherit!important}
body:not(.wp-admin) .rwc-content-breadcrumbs li::marker{content:none}
body:not(.wp-admin) .rwc-content-breadcrumbs li+li::before,body:not(.wp-admin) .woocommerce-breadcrumb .rwc-crumb-sep{content:"›";display:inline-block;margin:0 10px;color:#a8b2c4;font-size:16px;line-height:1}
body:not(.wp-admin) :is(.rwc-content-breadcrumbs,.woocommerce-breadcrumb) a{color:var(--wp--preset--color--rockwalls-blue,#3f5da3)!important;text-decoration:none!important;border-radius:4px;transition:color .18s ease}
body:not(.wp-admin) :is(.rwc-content-breadcrumbs,.woocommerce-breadcrumb) a:hover{color:var(--wp--preset--color--rockwalls-ink,#263453)!important;text-decoration:underline!important;text-underline-offset:3px}
body:not(.wp-admin) .rwc-content-breadcrumbs [aria-current]{color:#2e2f38;font-weight:500}
body:not(.wp-admin) .woocommerce-breadcrumb{display:flex;flex-wrap:wrap;align-items:center}
body:not(.wp-admin) .woocommerce-breadcrumb>*:last-child{font-weight:500}

/* ---------- Links inside running text ---------- */
body:not(.wp-admin) :is(.wp-block-post-content,.rwc-page) p a:not([class]){color:var(--wp--preset--color--rockwalls-blue,#3f5da3)!important;text-decoration:underline!important;text-decoration-thickness:1px!important;text-underline-offset:3px;text-decoration-color:#9fb1d8!important;transition:text-decoration-color .18s ease,color .18s ease}
body:not(.wp-admin) :is(.wp-block-post-content,.rwc-page) p a:not([class]):hover{color:var(--wp--preset--color--rockwalls-ink,#263453)!important;text-decoration-color:currentColor!important}

/* ---------- Article cards (blog page and the home page section) ---------- */
.rwc-post-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:28px 0 64px}
body:not(.wp-admin) .rwc-post-card{display:flex!important;flex-direction:column;min-width:0;padding:0!important;overflow:hidden;background:#fff!important;border:1px solid #e2e8f1!important;border-radius:16px!important;color:#202630!important;text-decoration:none!important;transition:transform .3s cubic-bezier(.22,.68,0,1),box-shadow .3s ease,border-color .3s ease}
body:not(.wp-admin) .rwc-post-card figure{position:relative;margin:0!important;aspect-ratio:16/10;overflow:hidden;background:#e9edf5}
body:not(.wp-admin) .rwc-post-card figure img{display:block;width:100%!important;height:100%!important;object-fit:cover;transition:transform .7s cubic-bezier(.22,.68,0,1)}
body:not(.wp-admin) .rwc-post-card figure::after{content:"";position:absolute;inset:auto 0 0;height:40%;background:linear-gradient(0deg,rgba(18,26,46,.22),transparent);pointer-events:none}
.rwc-post-card-body{display:flex;flex:1;flex-direction:column;gap:10px;padding:22px 24px 24px}
body:not(.wp-admin) .rwc-post-card-meta{font:500 12px/1 Roboto,Arial,sans-serif!important;letter-spacing:.08em;text-transform:uppercase;color:var(--wp--preset--color--rockwalls-blue,#3f5da3)!important}
body:not(.wp-admin) .rwc-post-card :is(h2,h3){margin:0!important;font:700 19px/1.3 Roboto,Arial,sans-serif!important;color:#202630!important;text-decoration:none!important;text-wrap:balance}
body:not(.wp-admin) .rwc-post-card p{margin:0!important;font-size:15px!important;line-height:1.55!important;color:var(--wp--preset--color--rockwalls-muted,#626b7c)!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
body:not(.wp-admin) .rwc-post-card-more{display:inline-flex!important;align-items:center;gap:8px;margin-top:auto!important;padding-top:6px;font:500 15px/1 Roboto,Arial,sans-serif!important;color:var(--wp--preset--color--rockwalls-blue,#3f5da3)!important;border:0!important;background:none!important}
.rwc-post-card-more svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .25s ease}
@media(hover:hover){
 body:not(.wp-admin) .rwc-post-card:hover{transform:translateY(-4px);border-color:#c9d3e6!important;box-shadow:0 16px 34px rgba(38,52,83,.1)}
 body:not(.wp-admin) .rwc-post-card:hover figure img{transform:scale(1.05)}
 .rwc-post-card:hover .rwc-post-card-more svg{transform:translateX(4px)}
}
body:not(.wp-admin) .rwc-post-card:focus-visible{outline:3px solid #849ed7;outline-offset:3px}
/* The home section keeps its four columns; the cards inside it are the same as on the blog. */
body:not(.wp-admin) .rwc-journal-grid .rwc-post-card :is(h2,h3){font-size:17px!important}
body:not(.wp-admin) .rwc-journal-grid .rwc-post-card-body{padding:18px 20px 20px}
@media(max-width:1000px){.rwc-post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.rwc-post-grid{grid-template-columns:minmax(0,1fr);gap:16px}.rwc-post-card-body{padding:18px 18px 20px}}

/* ---------- «О компании»: photos of finished houses and icons on the info cards ---------- */
.rwc-about-photos{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;margin:28px 0 36px}
.rwc-about-photos figure{margin:0!important;overflow:hidden;border-radius:14px;aspect-ratio:4/3;background:#e9edf5}
.rwc-about-photos figure:first-child{aspect-ratio:auto;grid-row:span 1}
.rwc-about-photos img{display:block;width:100%!important;height:100%!important;object-fit:cover;transition:transform .7s cubic-bezier(.22,.68,0,1)}
@media(hover:hover){.rwc-about-photos figure:hover img{transform:scale(1.04)}}
body:not(.wp-admin) .rwc-about-photos-link{grid-column:1/-1;justify-self:end;display:inline-flex;align-items:center;gap:8px;font:500 15px/1 Roboto,Arial,sans-serif!important;color:var(--wp--preset--color--rockwalls-blue,#3f5da3)!important;text-decoration:none!important}
body:not(.wp-admin) .rwc-about-photos-link:hover{color:var(--wp--preset--color--rockwalls-ink,#263453)!important}
.rwc-info-icon{display:inline-grid;place-items:center;width:46px;height:46px;margin-bottom:16px;border-radius:12px;background:#eef2fa;color:var(--wp--preset--color--rockwalls-blue,#3f5da3);transition:background-color .25s ease,color .25s ease,transform .25s ease}
.rwc-info-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body:not(.wp-admin) .rwc-info-grid section{transition:border-color .25s ease,box-shadow .25s ease,transform .25s ease}
@media(hover:hover){
 body:not(.wp-admin) .rwc-info-grid section:hover{border-color:#c9d3e6!important;box-shadow:0 14px 30px rgba(38,52,83,.08);transform:translateY(-3px)}
 .rwc-info-grid section:hover .rwc-info-icon{background:var(--wp--preset--color--rockwalls-blue,#3f5da3);color:#fff}
}
@media(max-width:700px){.rwc-about-photos{grid-template-columns:1fr 1fr;gap:10px}.rwc-about-photos figure:first-child{grid-column:1/-1;aspect-ratio:16/10}}

/* ---------- Entrance animation: only for blocks below the first screen, see ui.js ---------- */
@keyframes rwc-rise{from{opacity:0;transform:translate3d(0,22px,0)}}
html.rwc-motion .rwc-reveal:not(.rwc-revealed){opacity:0}
html.rwc-motion .rwc-reveal.rwc-revealed{animation:rwc-rise .75s cubic-bezier(.2,.8,.2,1) backwards;animation-delay:var(--rwc-delay,0ms)}
@media(prefers-reduced-motion:reduce){
 html.rwc-motion .rwc-reveal:not(.rwc-revealed){opacity:1}
 html.rwc-motion .rwc-reveal.rwc-revealed{animation:none}
 body:not(.wp-admin) .rwc-post-card,body:not(.wp-admin) .rwc-post-card figure img,.rwc-post-card-more svg{transition:none!important;transform:none!important}
}

/* ---------- Pages turned into blocks (theme «RockWalls» 2.0): the project gallery as a gallery block, loose labels. Here as well as in the theme, so they look right with any theme. ---------- */
/* Loose text next to blocks (a label, a lone link) keeps the size and spacing it had as inline text. */
.rwsite-inline{margin:0}
/* On the site the wrapper paragraph takes no room of its own: a lone button or label sits exactly where it was. In the editor it stays a normal paragraph to type in. */
body:not(.editor-styles-wrapper) .rwsite-inline{display:contents}

/* Project gallery as a WordPress gallery block: the same cards as before — photo 4:3, caption below. */
.wp-block-gallery.rwc-page-gallery.has-nested-images{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px!important;margin:35px 0 70px;align-items:start}
.wp-block-gallery.rwc-page-gallery.has-nested-images figure.wp-block-image{width:auto!important;margin:0!important;display:flex;flex-direction:column;justify-content:flex-start;background:#fff;border:1px solid #e2e8f1;border-radius:14px;overflow:hidden}
.wp-block-gallery.rwc-page-gallery.has-nested-images figure.wp-block-image::before{content:none;display:none}
.wp-block-gallery.rwc-page-gallery.has-nested-images figure.wp-block-image img{width:100%!important;height:auto!important;aspect-ratio:4/3;object-fit:cover;flex:none;cursor:zoom-in;transition:transform .38s cubic-bezier(.2,.65,.3,1)}
.wp-block-gallery.rwc-page-gallery.has-nested-images figure.wp-block-image:hover img{transform:scale(1.025)}
.wp-block-gallery.rwc-page-gallery.has-nested-images figure.wp-block-image figcaption{position:static;max-height:none;overflow:visible;margin:0;padding:18px 20px;background:none;color:var(--wp--preset--color--rockwalls-muted,#626b7c);text-align:left;font-size:14px;line-height:1.6;text-shadow:none;scrollbar-width:auto;flex:none}
.wp-block-gallery.rwc-page-gallery.has-nested-images figure.wp-block-image figcaption strong{display:block;margin-bottom:6px;color:#202630;font-size:19px;line-height:1.4}
.wp-block-gallery.rwc-page-gallery.has-nested-images figure.wp-block-image figcaption a{color:var(--wp--preset--color--rockwalls-blue,#3f5da3);font-weight:600;text-decoration:none}
@media(max-width:900px){.wp-block-gallery.rwc-page-gallery.has-nested-images{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.wp-block-gallery.rwc-page-gallery.has-nested-images{grid-template-columns:minmax(0,1fr);gap:18px!important}}
@media(prefers-reduced-motion:reduce){.wp-block-gallery.rwc-page-gallery.has-nested-images figure.wp-block-image img{transition:none}}
