/*
 * Ifatis — Inner pages redesign
 * Loaded on all non-home, non-LP pages alongside css/base.css.
 * Replaces the legacy style.css + dark.css for inner templates:
 * content/service pages, blog list, single post, 404, category.
 * Built entirely on the base.css design tokens.
 */

/* ============================================================
   0. Inner page canvas + shared content chrome
   ============================================================ */
body:not(.page-template-home) { background: var(--c-cream); }

.page-content,
#single_blog_post,
#all_blog_posts,
#blog_page { background: var(--c-cream); }

.inner-page-wrap { position: relative; }

/* Utility fallbacks still referenced by a few templates (404 / category) */
.mid-font { color: var(--c-ink); }
.dark-font { color: var(--c-plum-deep); }
.light-font, .white-font { color: #fff; }
.headers-font { font-weight: 800; }
.bolder { font-weight: 800; }
.fsz-70 { font-size: clamp(3.5rem, 12vw, 7rem); }
.fsz-42 { font-size: clamp(1.6rem, 5vw, 2.6rem); }
.fsz-22 { font-size: 1.2rem; }

/* ============================================================
   1. Content-page hero (service/About/blog/single)
   ============================================================ */
.content-page-hero.hero-container {
    position: relative;
    min-height: clamp(340px, 56vh, 540px);
    height: auto;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--c-plum-deep);
    isolation: isolate;
    padding: 0;
}
.content-page-hero .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.content-page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(0deg, rgba(43,34,48,0.92) 0%, rgba(43,34,48,0.25) 55%, rgba(43,34,48,0.3) 100%),
        linear-gradient(270deg, rgba(43,34,48,0.6) 0%, transparent 55%);
}
.content-page-hero .hero-row {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-block: clamp(2rem, 6vh, 4rem);
    margin: 0;
}
.content-page-hero .title-col { padding-inline: clamp(1.25rem, 5vw, 4rem); }
.content-page-hero h1.home-title {
    color: #fff;
    font-weight: 800;
    font-size: clamp(2.3rem, 5.5vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0;
    overflow-wrap: anywhere;
}
.content-page-hero h1.home-title::after {
    content: '';
    display: block;
    width: clamp(48px, 6vw, 84px);
    height: 5px;
    margin-top: 1.1rem;
    border-radius: var(--r-pill);
    background: var(--grad-rose);
}
.content-page-hero .sub-title {
    color: rgba(255,255,255,0.92);
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    line-height: 1.55;
    margin-top: 1.1rem;
    max-width: 62ch;
}
.content-page-hero .sub-title p { margin: 0; }

/* mobile: image band on top, title block on a plum panel below */
@media (max-width: 767px) {
    .content-page-hero.hero-container { display: block; min-height: 0; }
    .content-page-hero::after { display: none; }
    .content-page-hero .img-col img {
        display: block; width: 100%;
        height: clamp(220px, 52vw, 340px);
        object-fit: cover;
    }
    .content-page-hero .hero-row {
        background: var(--c-plum-deep);
        padding: clamp(1.5rem, 6vw, 2.25rem) 1.25rem clamp(1.75rem, 7vw, 2.5rem);
    }
    .content-page-hero h1.home-title { text-shadow: none; }
    .content-page-hero .sub-title { text-shadow: none; }
}

/* ============================================================
   2. Breadcrumbs
   ============================================================ */
.breadcrumbs-wrap { background: transparent; }
#breadcrumbs { margin: 0; font-size: 0.92rem; }
#breadcrumbs, #breadcrumbs * { color: var(--c-ink-soft); }
#breadcrumbs a { font-weight: 700; color: var(--c-plum); text-decoration: none !important; }
#breadcrumbs a:hover { text-decoration: underline !important; }

/* ============================================================
   3. Content typography (rich text)
   ============================================================ */
.page-content { padding-bottom: clamp(3rem, 7vw, 6rem); }
.page-content #section_0 { padding-top: clamp(1.5rem, 4vw, 3rem); }

.the-content-col,
#single_blog_post .the-content-col,
#all_blog_posts .container .col-12 {
    color: var(--c-ink);
    font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.18rem);
    line-height: 1.85;
}
/* readable measure for body copy */
.the-content-col { max-width: 100%; }

.the-content-col h2,
#single_blog_post .the-content-col h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: var(--c-plum); font-weight: 800; margin: 2.2rem 0 1rem; line-height: 1.2; }
.the-content-col h3 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); color: var(--c-plum-deep); font-weight: 800; margin: 1.8rem 0 0.8rem; }
.the-content-col h4 { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--c-plum-deep); font-weight: 700; margin: 1.5rem 0 0.6rem; }
.the-content-col p { margin: 0 0 1.15rem; }
.the-content-col strong, .the-content-col b { color: var(--c-plum-deep); }
.the-content-col a:not(.btn-ifatis) { color: var(--c-plum); font-weight: 600; text-decoration: underline !important; text-underline-offset: 2px; }
.the-content-col a:not(.btn-ifatis):hover { color: var(--c-plum-deep); }
.the-content-col ul, .the-content-col ol { margin: 0 0 1.3rem; padding-inline-start: 1.5rem; }
.the-content-col li { margin-bottom: 0.5rem; }
.the-content-col ul { list-style: none; padding-inline-start: 0; }
.the-content-col ul li { position: relative; padding-inline-start: 1.6rem; }
.the-content-col ul li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0.6em;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--grad-rose);
}
.the-content-col img { display: block; max-width: 100%; height: auto; border-radius: var(--r-lg); margin: 1.5rem 0; box-shadow: none; }
.the-content-col blockquote {
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem;
    border-inline-start: 4px solid var(--c-rose);
    background: #fff;
    border-radius: var(--r-md);
    font-style: italic;
    color: var(--c-plum-deep);
    box-shadow: var(--sh-sm);
}
.the-content-col blockquote p:last-child { margin-bottom: 0; }
.the-content-col iframe, .the-content-col video { max-width: 100%; border-radius: var(--r-lg); }

/* page.php / dynamic default header */
#all_blog_posts .page-header,
.page-header {
    text-align: center;
    color: var(--c-plum);
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.4rem);
    padding: clamp(2.5rem, 6vw, 4.5rem) 1rem clamp(1rem, 3vw, 2rem);
    margin: 0;
}

/* ============================================================
   4. page_cta shortcode
   ============================================================ */
.page-cta-section {
    background: var(--grad-blush) !important;
    border: none !important;
    border-radius: var(--r-lg);
    padding: clamp(2rem, 5vw, 3.25rem) clamp(1.25rem, 4vw, 2.5rem) !important;
    margin: clamp(2rem, 5vw, 3rem) 0 !important;
    text-align: center;
}
.page-cta-section h2 { color: var(--c-plum-deep); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 0.6rem; }
.page-cta-section p { color: var(--c-plum); font-size: clamp(1rem, 1.6vw, 1.15rem); margin: 0 auto 1.4rem; max-width: 52ch; }

/* ============================================================
   5. FAQ accordion
   ============================================================ */
.faq-wrapper { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.faq-wrapper .section-title { color: var(--c-plum); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.8rem); text-align: center; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }

/* clean, minimal list — thin dividers, no cards */
.faq-wrapper .faq-elem {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(97,73,95,0.14);
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

.faq-wrapper .faq-elem .question {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    padding: clamp(1.1rem, 2.5vw, 1.5rem) 0.25rem;
    border: none;
    background: transparent;
    text-align: right;
    color: var(--c-plum);
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.25s var(--ease);
}
.faq-wrapper .faq-elem .question:hover,
.faq-wrapper .faq-elem.opened .question { color: var(--c-plum-deep); }
/* no focus border at all (per request) — covers mouse :focus + keyboard :focus-visible */
.faq-wrapper .faq-elem .question:focus,
.faq-wrapper .faq-elem .question:focus-visible,
.faq-wrapper .faq-elem .question:active {
    outline: none;
    box-shadow: none;
    text-decoration: none;
}
/* thin chevron that rotates smoothly */
.faq-wrapper .faq-elem .question::after {
    content: '';
    flex: 0 0 auto;
    width: 11px; height: 11px;
    border-inline-end: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.4s var(--ease);
    opacity: 0.65;
}
/* open state: caret points straight down (chevron ⌄) */
.faq-wrapper .faq-elem.opened .question::after { transform: translateY(-2px) rotate(-45deg); }

/* smooth open/close via grid-template-rows (animates true content height) */
.faq-wrapper .faq-elem .answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s var(--ease);
}
.faq-wrapper .faq-elem.opened .answer { grid-template-rows: 1fr; }
.faq-wrapper .faq-elem .answer > * { min-height: 0; overflow: hidden; }
.faq-wrapper .faq-elem .answer-inner {
    color: #4d4048;
    font-size: 1.02rem;
    line-height: 1.85;
    padding: 0;                      /* zero padding so the row collapses fully when closed */
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s var(--ease) 0.06s, transform 0.4s var(--ease) 0.06s;
}
.faq-wrapper .faq-elem.opened .answer-inner { opacity: 1; transform: none; }
/* open-state spacing comes from the (collapsing) content margins, not padding */
.faq-wrapper .faq-elem .answer-inner > * { margin-top: 0; }
.faq-wrapper .faq-elem .answer-inner p { margin: 0 0 0.9rem; }
.faq-wrapper .faq-elem .answer-inner > :last-child,
.faq-wrapper .faq-elem .answer-inner p:last-child { margin-bottom: clamp(1.1rem, 2.5vw, 1.5rem); }
/* links inside answers should read as links (base.css resets all links to no-underline) */
.faq-wrapper .faq-elem .answer-inner a { text-decoration: underline !important; }

/* ============================================================
   6. Blog list (page-blog-tpl)
   ============================================================ */
.page-blog { background: var(--c-cream); }
/* only vertical padding — leave Bootstrap's horizontal container padding so the
   row's negative gutters stay balanced (zeroing it overflowed the cards) */
.page-blog .posts-wrap { padding-block: clamp(2.5rem, 6vw, 5rem); }
/* Bootstrap gutter (col padding) becomes the visible gap between cards */
.page-blog .posts-wrap .row,
.related-articles .row { --bs-gutter-x: clamp(1.5rem, 3vw, 2.75rem); row-gap: clamp(1.75rem, 3.5vw, 2.75rem); }
/* the column just holds the card; the card carries the styling so the image
   sits edge-to-edge and the gutter shows as spacing between cards */
.page-blog .single-post,
.related-articles .single-post { display: flex; }
.page-blog .post-card,
.related-articles .post-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-md);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.page-blog .post-card:hover,
.related-articles .post-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
.page-blog .post-card .img-wrap,
.related-articles .post-card .img-wrap { display: block; overflow: hidden; }
.page-blog .post-card .img-wrap img,
.related-articles .post-card .img-wrap img {
    display: block; width: 100%;
    height: clamp(200px, 22vw, 240px);
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.7s var(--ease);
}
.page-blog .post-card:hover .img-wrap img,
.related-articles .post-card:hover .img-wrap img { transform: scale(1.06); }
.page-blog .post-card .content,
.related-articles .post-card .content { padding: clamp(1.25rem, 2vw, 1.6rem) clamp(1.25rem, 2vw, 1.6rem) 0; flex: 1 1 auto; }
.page-blog .post-card .title,
.related-articles .post-card .title { color: var(--c-plum); font-size: 1.35rem; font-weight: 800; line-height: 1.25; margin: 0 0 0.6rem; }
.page-blog .post-card a:hover .title,
.related-articles .post-card a:hover .title { color: var(--c-plum-deep); }
.page-blog .post-card .excerpt,
.page-blog .post-card .excerpt *,
.related-articles .post-card .excerpt,
.related-articles .post-card .excerpt * { color: var(--c-ink-soft); font-size: 0.98rem; line-height: 1.65; display: block; }
.page-blog .post-card .btn-ifatis,
.related-articles .post-card .btn-ifatis { margin: 1.25rem clamp(1.25rem, 2vw, 1.6rem) clamp(1.25rem, 2vw, 1.6rem); align-self: flex-start; }

/* related articles block on single posts */
.related-articles { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid rgba(97,73,95,0.12); margin-top: clamp(2rem, 5vw, 3.5rem); }
.related-articles .section-title { color: var(--c-plum); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.4rem); text-align: center; margin: 0 0 clamp(1.75rem, 4vw, 2.75rem); }

/* ============================================================
   7. Single post
   ============================================================ */
#single_blog_post { background: var(--c-cream); }
#single_blog_post .content-container { padding-bottom: clamp(3rem, 7vw, 6rem); }
#single_blog_post .the-content-col { color: var(--c-ink); }
#single_blog_post .the-content-col img { width: 100%; height: auto; }

/* ============================================================
   8. 404
   ============================================================ */
#page_404 {
    height: auto !important;
    min-height: 72vh;
    background: var(--grad-plum) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(3rem, 8vw, 6rem) 1.25rem;
}
#page_404 h1 { color: #fff !important; font-weight: 800; font-size: clamp(4.5rem, 16vw, 9rem); line-height: 1; margin: 0; letter-spacing: -0.02em; }
#page_404 h2 { color: var(--c-blush) !important; font-weight: 700; font-size: clamp(1.4rem, 4vw, 2.2rem); margin: 0.5rem 0 2rem; }
#page_404 .go-back-url {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--c-plum) !important;
    background: #fff;
    padding: 0.75rem 2rem;
    border-radius: var(--r-pill);
    font-weight: 800;
    box-shadow: var(--sh-md);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
#page_404 .go-back-url:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }

/* ============================================================
   9. Category archive
   ============================================================ */
#blog_page.grey-blue-bg { background: var(--c-cream); }
#blog_page > .hero-container {
    position: relative;
    min-height: clamp(240px, 40vh, 380px);
    display: flex; align-items: center; justify-content: center;
    isolation: isolate;
    background-position: center !important;
    background-size: cover !important;
}
#blog_page > .hero-container::after {
    content: '';
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(43,34,48,0.55), rgba(43,34,48,0.7));
}
#blog_page > .hero-container .page-main-title {
    position: relative; z-index: 2;
    color: #fff; font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.6rem);
    text-align: center;
}
#blog_page .content-container { padding-bottom: clamp(3rem, 7vw, 6rem); }
#blog_page .all-blog-posts { --bs-gutter-x: clamp(1rem, 2vw, 2rem); row-gap: clamp(1.5rem, 3vw, 2.5rem); }
#blog_page .single-blog-post .inner-wrapper {
    height: 100%;
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-md);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
#blog_page .single-blog-post .inner-wrapper:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
#blog_page .single-blog-post .post-img { display: block; overflow: hidden; }
#blog_page .single-blog-post .post-img img { display: block; width: 100%; height: clamp(190px, 20vw, 230px); object-fit: cover; transition: transform 0.7s var(--ease); }
#blog_page .single-blog-post .inner-wrapper:hover .post-img img { transform: scale(1.06); }
#blog_page .single-blog-post .post-categories { position: absolute; margin: 0.9rem; z-index: 2; }
#blog_page .single-blog-post .post-categories a { background: rgba(255,255,255,0.92); color: var(--c-plum); font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
#blog_page .single-blog-post .post-img { position: relative; }
#blog_page .single-blog-post .inner { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1 1 auto; }
#blog_page .single-blog-post .post-date { color: var(--c-ink-soft); font-size: 0.82rem; margin-bottom: 0.4rem; }
#blog_page .single-blog-post .post-title { color: var(--c-plum); font-weight: 800; font-size: 1.3rem; line-height: 1.25; margin-bottom: 0.6rem; }
#blog_page .single-blog-post .post-title:hover { color: var(--c-plum-deep); }
#blog_page .single-blog-post .post-desc { color: var(--c-ink-soft); font-size: 0.95rem; line-height: 1.6; }
