/* /articles/ list, category pages and single articles (sanam_article). Brand: #662627 maroon, #e4aa58 gold, #fcf8f3 cream. */

.sanam-articles {
    background: #fcf8f3;
    color: #291f1e;
    font-family: var(--sanam-font-text);
    display: flow-root;
}

.sanam-articles a { text-decoration: none; }

/* ---------- Intro ---------- */
.sanam-articles-intro {
    padding: clamp(48px, 7vw, 96px) 0 clamp(22px, 3vw, 34px);
    text-align: center;
}

.sanam-articles-intro__eyebrow {
    display: inline-block;
    color: #662627;
    font: 600 15px/1.6 var(--sanam-font-accent);
}

.sanam-articles-intro h1 {
    margin: 6px 0 12px;
    color: #662627;
    font: 600 clamp(34px, 5vw, 60px)/1.3 var(--sanam-font-heading);
}

.sanam-articles-intro p {
    max-width: 640px;
    margin: 0 auto;
    color: #61524a;
    font-size: 17px;
    line-height: 1.9;
}

/* ---------- Category filter ---------- */
.sanam-articles-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding-bottom: clamp(26px, 3.6vw, 40px);
}

.sanam-articles-filter a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 20px;
    border: 1px solid #e3caab;
    border-radius: 30px;
    background: #fff;
    color: #662627;
    font: 600 15px/1.4 var(--sanam-font-ui);
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.sanam-articles-filter a:hover { border-color: #e4aa58; }

.sanam-articles-filter a.is-active {
    border-color: #275e4c;
    background: #275e4c;
    color: #fff;
}

.sanam-articles-filter a:focus-visible {
    outline: 3px solid #e4aa58;
    outline-offset: 3px;
}

/* ---------- Cards ---------- */
.sanam-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 26px);
    padding-bottom: clamp(40px, 6vw, 72px);
}

.sanam-article-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e3caab;
    border-radius: 22px;
    background: #fff;
    color: inherit;
    box-shadow: 0 10px 28px rgb(41 31 30 / .06);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.sanam-article-card:hover,
.sanam-article-card:focus-visible {
    border-color: #e4aa58;
    box-shadow: 0 18px 40px rgb(41 31 30 / .13);
    transform: translateY(-3px);
}

.sanam-article-card:focus-visible {
    outline: 3px solid #e4aa58;
    outline-offset: 3px;
}

.sanam-article-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #662627;
}

.sanam-article-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.sanam-article-card:hover .sanam-article-card__img,
.sanam-article-card:focus-visible .sanam-article-card__img { transform: scale(1.05); }

/* No cover: brand gradient with a soft pattern of the hero lines. */
.sanam-article-card__placeholder {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 100% 0%, rgb(228 170 88 / .35), transparent 60%),
        linear-gradient(135deg, #662627, #521e1f);
}

.sanam-article-card__cat {
    position: absolute;
    inset-block-start: 14px;
    inset-inline-start: 14px;
    padding: 5px 13px;
    border-radius: 30px;
    background: rgb(252 248 243 / .94);
    color: #275e4c;
    font: 600 13px/1.5 var(--sanam-font-ui);
    box-shadow: 0 4px 14px rgb(41 31 30 / .15);
}

.sanam-article-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: clamp(18px, 2.2vw, 26px);
}

.sanam-article-card__date {
    color: #86756a;
    font: 600 13.5px/1.5 var(--sanam-font-ui);
}

.sanam-article-card__title {
    color: #662627;
    font: 600 clamp(19px, 1.7vw, 22px)/1.5 var(--sanam-font-heading);
}

.sanam-article-card__text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #61524a;
    font-size: 15px;
    line-height: 1.85;
}

.sanam-article-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
    color: #275e4c;
    font: 600 15px/1.4 var(--sanam-font-ui);
}

/* ---------- Pagination ---------- */
.sanam-articles-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding-bottom: clamp(56px, 8vw, 100px);
}

.sanam-articles-pages .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 14px;
    border: 1px solid #e3caab;
    border-radius: 30px;
    background: #fff;
    color: #662627;
    font: 600 15px/1 var(--sanam-font-ui);
}

.sanam-articles-pages a.page-numbers:hover { border-color: #e4aa58; }
.sanam-articles-pages .page-numbers.current { border-color: #662627; background: #662627; color: #fff; }
.sanam-articles-pages .page-numbers.dots { border: 0; background: none; min-width: 0; }

/* ---------- Empty state ---------- */
.sanam-articles-empty {
    max-width: 620px;
    margin-bottom: clamp(56px, 8vw, 110px);
    padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 40px);
    border: 1px dashed #e7cba8;
    border-radius: 24px;
    background: #fff;
    text-align: center;
}

.sanam-articles-empty__icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #f2e7d9;
    color: #662627;
}

.sanam-articles-empty__icon svg { width: 30px; height: 30px; }

.sanam-articles-empty h2 {
    margin: 0 0 8px;
    color: #662627;
    font: 600 24px/1.5 var(--sanam-font-heading);
}

.sanam-articles-empty p {
    margin: 0 auto 20px;
    color: #61524a;
    line-height: 1.9;
}

.sanam-articles-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 26px;
    border-radius: 36px;
    background: #662627;
    color: #fff;
    font: 600 16px/1.4 var(--sanam-font-ui);
}

.sanam-articles .sanam-articles-button:hover { background: #521e1f; color: #fff; }

/* ---------- Single article: hero ---------- */
.sanam-article-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #662627;
    color: #fff;
}

/* With a cover image: the image fills the hero behind the title, darkened for legibility. */
.sanam-article-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sanam-article-hero.has-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, rgb(41 31 30 / .92) 0%, rgb(41 31 30 / .6) 45%, rgb(41 31 30 / .35) 100%);
}

.sanam-article-hero.has-cover {
    display: flex;
    align-items: flex-end;
    min-height: 30vh;
}

.sanam-article-hero.has-cover .sanam-article-hero__inner {
    width: min(920px, calc(100% - 36px));
    padding-block: clamp(36px, 5vw, 60px) clamp(28px, 4vw, 44px);
    text-shadow: 0 2px 18px rgb(0 0 0 / .35);
}

.sanam-article-hero__inner {
    max-width: 920px;
    padding-block: clamp(44px, 6.5vw, 84px) clamp(34px, 5vw, 56px);
    text-align: center;
}

.sanam-article-hero .sanam-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    color: rgb(255 248 239 / .75);
    font: 600 14px/1.6 var(--sanam-font-ui);
}

.sanam-article-hero .sanam-breadcrumb a { color: #e4aa58; }
.sanam-article-hero .sanam-breadcrumb a:hover { text-decoration: underline; }

.sanam-article-hero h1 {
    margin: 0 0 14px;
    font: 600 clamp(28px, 4.4vw, 50px)/1.4 var(--sanam-font-heading);
    text-wrap: balance;
}

.sanam-article-hero__lead {
    max-width: 700px;
    margin: 0 auto 18px;
    color: rgb(255 248 239 / .9);
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.9;
}

.sanam-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    color: rgb(255 248 239 / .8);
    font: 600 14px/1.6 var(--sanam-font-ui);
}

.sanam-article-chip {
    padding: 4px 13px;
    border: 1px solid rgb(228 170 88 / .4);
    border-radius: 30px;
    background: rgb(255 248 235 / .1);
    color: #fcf8f3;
}

.sanam-articles a.sanam-article-chip:hover { border-color: #e4aa58; color: #fff; }

/* ---------- Single article: content ---------- */
.sanam-article-body {
    max-width: 820px;
    padding-block: clamp(30px, 4.5vw, 54px) clamp(40px, 6vw, 72px);
}

.sanam-article-content {
    font-size: clamp(16.5px, 1.4vw, 18px);
    line-height: 2;
    overflow-wrap: anywhere;
}

.sanam-article-content > * { margin-block: 0 1.15em; }

.sanam-article-content :is(h2, h3, h4) {
    margin-block: 1.6em .6em;
    color: #662627;
    font-family: var(--sanam-font-heading);
    font-weight: 600;
    line-height: 1.55;
}

.sanam-article-content h2 { font-size: clamp(23px, 2.3vw, 29px); }
.sanam-article-content h3 { font-size: clamp(20px, 1.9vw, 24px); }
.sanam-article-content h4 { font-size: 19px; }

.sanam-article-content a {
    color: #275e4c;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.sanam-article-content a:hover { color: #662627; }

.sanam-article-content :is(ul, ol) { padding-inline-start: 1.3em; }
.sanam-article-content li { margin-bottom: .45em; }
.sanam-article-content li::marker { color: #662627; }

.sanam-article-content img,
.sanam-article-content video,
.sanam-article-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.sanam-article-content iframe { width: 100%; aspect-ratio: 16 / 9; }
.sanam-article-content figure { margin-inline: 0; }
.sanam-article-content figcaption { margin-top: 8px; color: #61524a; font-size: 14px; text-align: center; }

.sanam-article-content blockquote {
    margin-inline: 0;
    padding: 18px 24px;
    border-inline-start: 4px solid #e4aa58;
    border-radius: 0 16px 16px 0;
    background: #f8f1e8;
    color: #662627;
    font-family: var(--sanam-font-heading);
    font-size: 1.05em;
}

[dir="rtl"] .sanam-article-content blockquote { border-radius: 16px 0 0 16px; }
.sanam-article-content blockquote p:last-child { margin-bottom: 0; }

.sanam-article-content hr {
    height: 1px;
    margin-block: 2em;
    border: 0;
    background: #e3caab;
}

/* Tables (tidied by inc/rich-content.php). */
.sanam-article-content .sanam-table {
    margin: 10px 0 28px;
    overflow-x: auto;
    border: 1px solid #e3caab;
    border-radius: 18px;
    background: #fff;
}
.sanam-article-content table { width: 100%; margin: 0; border-collapse: collapse; font-size: 16px; line-height: 1.8; }
.sanam-article-content :is(th, td) { padding: 12px 16px; border: 0; border-bottom: 1px solid #f2e7d9; text-align: start; vertical-align: top; }
.sanam-article-content thead th { background: #662627; color: #fff; font-family: var(--sanam-font-heading); font-weight: 600; white-space: nowrap; }
.sanam-article-content tbody tr:nth-child(even) { background: #fcf8f3; }
.sanam-article-content tbody tr:last-child > * { border-bottom: 0; }
.sanam-article-content > table { display: block; overflow-x: auto; border: 1px solid #e3caab; border-radius: 18px; }

/* ---------- Share ---------- */
.sanam-article-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: clamp(28px, 4vw, 44px);
    padding-top: 22px;
    border-top: 1px solid #e3caab;
}

.sanam-article-share__label {
    color: #662627;
    font: 600 16px/1.5 var(--sanam-font-heading);
}

.sanam-article-share__buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.sanam-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #e3caab;
    border-radius: 50%;
    background: #fff;
    color: #662627;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.sanam-share svg { width: 20px; height: 20px; }

.sanam-share:hover,
.sanam-share:focus-visible {
    border-color: #662627;
    background: #662627;
    color: #fff;
}

.sanam-share:focus-visible { outline: 3px solid #e4aa58; outline-offset: 2px; }
.sanam-share.is-done { border-color: #275e4c; background: #275e4c; color: #fff; }

.sanam-article-share__status {
    color: #275e4c;
    font: 600 14px/1.5 var(--sanam-font-ui);
}

/* ---------- Read next ---------- */
.sanam-article-related {
    padding-top: clamp(40px, 5.5vw, 64px);
    border-top: 1px solid #e3caab;
    background: #fcf8f3;
}

.sanam-article-related__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 20px;
    margin-bottom: clamp(18px, 2.6vw, 28px);
}

.sanam-article-related h2 {
    margin: 0;
    color: #662627;
    font: 600 clamp(24px, 2.8vw, 34px)/1.4 var(--sanam-font-heading);
}

.sanam-article-related__head a {
    color: #662627;
    font: 600 15px/1.4 var(--sanam-font-ui);
}

.sanam-article-related__head a:hover { color: #662627; }
.sanam-articles-grid--related { padding-bottom: clamp(56px, 8vw, 100px); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .sanam-articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .sanam-articles-grid { grid-template-columns: 1fr; }
    .sanam-articles-filter {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .sanam-articles-filter::-webkit-scrollbar { display: none; }
    .sanam-articles-filter a { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
    .sanam-article-card,
    .sanam-article-card__img { transition: none; }
    .sanam-article-card:hover { transform: none; }
}

/* Pictures inside the text keep their own proportions, whatever size the editor stored
   (a stored height or aspect ratio squashed pictures added by link into a thin strip).
   Only pictures placed directly in the text: the services' photo carousel keeps its own sizing. */
.sanam-article-content > figure.wp-block-image,
.sanam-article-content > figure.wp-block-image img,
.sanam-article-content > p img {
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
}
.sanam-article-content > figure.wp-block-image img { display: block; width: auto; max-width: 100% !important; margin-inline: auto; }

/* Card pictures show whole (no crop): the picture keeps its own shape. Cards without a picture keep
   the 16:10 brand placeholder. */
.sanam-article-card__media { aspect-ratio: auto; }
.sanam-article-card__media:has(.sanam-article-card__placeholder) { aspect-ratio: 16 / 10; }
.sanam-article-card__img { height: auto; object-fit: contain; }
