/* ============================================================
   Dalebrook Capital - Shared page components

   Palette sampled from dalebrookcapital.co.za:
     section tint  #f2f3f9      accent / buttons  #5b7e96
     white         #ffffff      footer            #454649
     headings      #1f2d3d      footer bottom     #171717
   ============================================================ */

:root {
    --dbc-tint: #f2f3f9;
    --dbc-white: #ffffff;
    --dbc-accent: #5b7e96;
    --dbc-accent-dark: #4a6a80;
    --dbc-navy: #1f2d3d;
    --dbc-body: #4a4a4a;
    --dbc-muted: #6f7b85;
    --dbc-rule: rgba(31, 45, 61, 0.12);
    --dbc-footer: #454649;
    --dbc-footer-bottom: #171717;
}

/* ============================================================
   PAGE HERO  (every page uses the same ocean background)
   ============================================================ */
.page-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #08101a;
    background-image: url('/Shared/assets/images/Dalebrook/MainOcean.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(8, 16, 26, 0.62) 0%,
        rgba(8, 16, 26, 0.22) 26%,
        rgba(8, 16, 26, 0.28) 64%,
        rgba(8, 16, 26, 0.50) 100%);
    z-index: 1;
}

.page-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    padding: 140px 30px 120px;
    text-align: center;
}

.page-hero-title {
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 4.25rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    line-height: 1.25;
    margin: 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.page-hero-title strong {
    font-weight: 600;
}

.page-hero-subtitle {
    font-size: clamp(0.9rem, 1.5vw, 1.25rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 1.6rem auto 0;
    max-width: 780px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-scroll-arrow {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation: dbcFadeIn 1s ease-in-out 1.2s forwards;
    transition: color 0.3s ease;
}

.hero-scroll-arrow:hover {
    color: #ffffff;
}

.hero-scroll-arrow svg {
    animation: dbcBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

@keyframes dbcFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes dbcBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--dbc-accent);
    border-radius: 4px;
    background: var(--dbc-accent);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background: var(--dbc-accent-dark);
    border-color: var(--dbc-accent-dark);
    color: #ffffff;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: 90px 0;
    background: var(--dbc-tint);
    color: var(--dbc-body);
}

.section-tint { background: var(--dbc-tint); }

.section-white { background: var(--dbc-white); }

.section-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-inner-narrow {
    max-width: 880px;
}

.section-title {
    color: var(--dbc-navy);
    font-size: clamp(1.5rem, 2.6vw, 2.3rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.4;
    margin: 0 0 1.6rem;
    text-align: center;
}

.section-title strong {
    font-weight: 700;
}

.section-title-sm {
    color: var(--dbc-navy);
    font-size: clamp(1.3rem, 2vw, 1.85rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0 0 2.2rem;
    text-align: center;
}

.section-lead {
    font-size: clamp(0.88rem, 1.05vw, 1rem);
    font-weight: 400;
    line-height: 1.9;
    color: var(--dbc-body);
    margin: 0 auto;
    max-width: 820px;
    text-align: center;
}

/* ============================================================
   PROSE
   ============================================================ */
.prose {
    font-size: clamp(0.88rem, 1.02vw, 0.98rem);
    font-weight: 400;
    line-height: 1.9;
    color: var(--dbc-body);
}

.prose p { margin: 0 0 1.4rem; }

.prose p:last-child { margin-bottom: 0; }

.prose a {
    color: var(--dbc-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose a:hover { color: var(--dbc-accent-dark); }

.prose h2,
.prose h3 {
    color: var(--dbc-navy);
    font-weight: 500;
    letter-spacing: 0.01em;
    margin: 2.4rem 0 1.1rem;
}

.prose h2 { font-size: clamp(1.05rem, 1.5vw, 1.3rem); }

.prose h3 { font-size: clamp(0.98rem, 1.25vw, 1.1rem); }

.prose ul { margin: 0 0 1.5rem; padding-left: 1.3rem; }

.prose li { margin-bottom: 0.7rem; line-height: 1.85; }

/* ============================================================
   FUND CARDS  (factsheets index + fund pages)
   ============================================================ */
.fund-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 38px 22px 34px;
    background: var(--dbc-white);
    border: 1px solid var(--dbc-rule);
    text-decoration: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.fund-card:hover {
    border-color: var(--dbc-accent);
    box-shadow: 0 14px 30px rgba(31, 45, 61, 0.10);
    transform: translateY(-4px);
}

.fund-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--dbc-accent);
    color: var(--dbc-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
}

.fund-card-title {
    color: var(--dbc-navy);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0;
}

.fund-card-note {
    font-size: 0.74rem;
    color: var(--dbc-muted);
    margin: 0;
}

.fund-card-single {
    max-width: 320px;
    margin: 0 auto;
}

/* The grids the /Manage publish step emits, and the one Factsheets.html has
   always used. These were in Factsheets.css, which is loaded by the index page
   only — so the five fund pages, which now publish a grid of their own when a
   fund has more than one document, had no rule for it. One definition, in the
   stylesheet every page loads. */
.card-grid   { display: grid; gap: 24px; }
.card-grid-5 { grid-template-columns: repeat(5, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   NEWS ARTICLES  (generated by /Manage into the two News pages)

   Every class here is emitted by dbc_news_render_article() in
   Manage/Backend_Secure/Functions/Content/news.php. Renaming one
   here without renaming it there leaves the next publish
   producing unstyled markup, so keep the two together.
   ============================================================ */
.news-item {
    background: var(--dbc-white);
    border: 1px solid var(--dbc-rule);
    padding: 34px 38px;
    margin: 0 auto 24px;
    max-width: 820px;
    text-align: left;
}

.news-item:last-child { margin-bottom: 0; }

.news-date {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dbc-accent);
    margin: 0 0 10px;
}

.news-headline {
    color: var(--dbc-navy);
    font-size: clamp(1.02rem, 1.5vw, 1.25rem);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 14px;
}

.news-summary {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.8;
    color: var(--dbc-navy);
    margin: 0 0 14px;
}

.news-item p {
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--dbc-body);
    margin: 0 0 12px;
}

.news-item p:last-of-type { margin-bottom: 0; }

.news-link {
    display: inline-block;
    margin-top: 18px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dbc-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.news-link:hover { border-bottom-color: var(--dbc-accent); }

/* ============================================================
   EMBEDS
   ============================================================ */
.embed-frame {
    width: 100%;
    border: 0;
    display: block;
}

.contact-form .form-status {
    font-size: 0.85rem;
    line-height: 1.7;
    margin: 0;
    color: var(--dbc-body);
}

.contact-form .form-status[data-status="success"] { color: #2f7d55; }

.contact-form .form-status[data-status="error"] { color: #b3453f; }

/* ============================================================
   PASSWORD GATE  (news pages)
   ============================================================ */
.gate {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

.gate-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 2rem;
}

.gate-form input {
    flex: 1 1 240px;
    background: var(--dbc-white);
    border: 1px solid var(--dbc-rule);
    border-radius: 3px;
    padding: 12px 16px;
    color: var(--dbc-navy);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    outline: none;
}

.gate-form input:focus { border-color: var(--dbc-accent); }

.gate-note {
    font-size: 0.78rem;
    line-height: 1.85;
    color: var(--dbc-muted);
    margin: 2rem 0 0;
}

.section-cta {
    margin-top: 2.8rem;
    text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .card-grid-5     { grid-template-columns: repeat(3, 1fr); }
    .doc-list        { grid-template-columns: repeat(2, 1fr); }
    .capability-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
.section { padding: 62px 0; }
.section-inner { padding: 0 30px; }
.card-grid-5 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(2, 1fr); }
.news-item { padding: 28px 26px; }
}

@media (max-width: 600px) {
.section { padding: 48px 0; }
.section-inner { padding: 0 25px; }
.card-grid-5 { grid-template-columns: 1fr; }
.card-grid-3 { grid-template-columns: 1fr; }
.page-hero-inner { padding: 120px 25px 100px; }
.embed-market, .embed-map { height: 380px; }
}
