/*
   RealEstate CRM - Public CMS page sections.
   Styles for the page-builder section partials (Views/Shared/Sections/*).
   Reuses the "Verdant Estate" tokens from public.css (--pub-*). Only the extra
   pieces the section partials need live here.
*/

/* Background modifiers applied to a .pub-section wrapper. */
.pub-section--muted { background: var(--pub-bg-alt); }
.pub-section--primary { background: var(--pub-primary); }
.pub-section--dark { background: var(--pub-dark); }

/* On coloured bands the copy has to flip to light. */
.pub-section--primary, .pub-section--dark { color: #fff; }
.pub-section--primary .pub-section-head h2,
.pub-section--dark .pub-section-head h2 { color: #fff; }
.pub-section--primary .pub-section-head p,
.pub-section--dark .pub-section-head p { color: rgba(255, 255, 255, 0.85); }
.pub-section--primary .pub-eyebrow,
.pub-section--dark .pub-eyebrow { color: #e9dcbc; }

/* Hero section (CMS) - optional full-bleed background image + aligned copy. */
.pub-cms-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--pub-hero-1), var(--pub-hero-2), var(--pub-primary));
    background-size: cover;
    background-position: center;
    color: #fff;
}
.pub-cms-hero.has-img { background-color: var(--pub-primary); }
.pub-cms-hero-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.38) 45%, rgba(0,0,0,0.14) 100%);
}
.pub-cms-hero-inner { position: relative; z-index: 2; max-width: 720px; }
.pub-cms-hero h1 { font-family: var(--pub-font-head); font-size: 2.6rem; font-weight: 800; margin: 0 0 1rem; line-height: 1.15; }
.pub-cms-hero p { font-size: 1.15rem; opacity: 0.94; margin: 0 0 1.75rem; }
.pub-cms-hero .pub-hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.pub-cms-hero.align-center .pub-cms-hero-inner { margin-inline: auto; text-align: center; }
.pub-cms-hero.align-center .pub-hero-actions { justify-content: center; }
.pub-cms-hero.align-right .pub-cms-hero-inner { margin-left: auto; text-align: right; }
.pub-cms-hero.align-right .pub-hero-actions { justify-content: flex-end; }

/* CTA band - centred call to action, honours the Background modifier. */
.pub-cta { text-align: center; }
.pub-cta h2 { font-family: var(--pub-font-head); font-size: 2rem; font-weight: 800; color: var(--pub-primary); margin: 0.4rem 0 0.6rem; }
.pub-cta p { color: var(--pub-muted); max-width: 620px; margin: 0 auto 1.75rem; }
.pub-section--primary .pub-cta h2, .pub-section--dark .pub-cta h2 { color: #fff; }
.pub-section--primary .pub-cta p, .pub-section--dark .pub-cta p { color: rgba(255, 255, 255, 0.88); }

/* Features - icon grid. */
.pub-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.pub-feature {
    background: var(--pub-surface); border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius); padding: 1.5rem; box-shadow: var(--pub-shadow);
}
.pub-feature-icon { font-size: 2rem; color: var(--pub-accent); line-height: 1; }
.pub-feature h3 { font-family: var(--pub-font-head); font-size: 1.15rem; font-weight: 700; color: var(--pub-primary); margin: 0.7rem 0 0.4rem; }
.pub-feature p { color: var(--pub-muted); margin: 0; font-size: 0.95rem; }

/* Image gallery - responsive grid. */
.pub-cms-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.pub-cms-gallery figure {
    margin: 0; border-radius: var(--pub-radius); overflow: hidden;
    background: var(--pub-bg-alt); border: 1px solid var(--pub-border);
    aspect-ratio: 4 / 3;
}
.pub-cms-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(.2,.7,.2,1); }
.pub-cms-gallery figure:hover img { transform: scale(1.05); }

/* FAQ - details/summary accordion (no JS needed). */
.pub-faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.pub-faq-item {
    background: var(--pub-surface); border: 1px solid var(--pub-border);
    border-radius: 10px; overflow: hidden;
}
.pub-faq-item > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    cursor: pointer; list-style: none; padding: 1rem 1.2rem;
    font-weight: 600; color: var(--pub-primary);
}
.pub-faq-item > summary::-webkit-details-marker { display: none; }
.pub-faq-item > summary::after {
    content: "\F282"; font-family: "bootstrap-icons"; font-weight: normal;
    color: var(--pub-accent); transition: transform 0.2s ease;
}
.pub-faq-item[open] > summary::after { transform: rotate(180deg); }
.pub-faq-answer { padding: 0 1.2rem 1.1rem; color: var(--pub-text); }
.pub-faq-answer p { margin: 0; }

/* Embed - keep iframes/videos responsive inside the container. */
.pub-embed iframe, .pub-embed video, .pub-embed embed, .pub-embed object {
    max-width: 100%;
}

@media (max-width: 560px) {
    .pub-cms-hero h1 { font-size: 1.9rem; }
    .pub-cta h2 { font-size: 1.6rem; }
}
