/**
 * Generic Page Template — Modernised layout
 *
 * Dark hero banner, clean single-column typography, responsive.
 * Ported from blog-single.css with uksr-page-* namespace.
 * Single-column layout (no sidebar), max-width 900px centered.
 *
 * @version 1.2.0
 */

/* ── Hero Banner ─────────────────────────────────────────────── */

.uksr-page-hero {
    background-color: var(--uksr-dark-blue);
    padding: 56px 24px;
    text-align: center;
}

.uksr-page-hero__inner {
    max-width: var(--uksr-container-max);
    margin: 0 auto;
}

.uksr-page-hero__title {
    font-size: 42px;
    font-weight: var(--uksr-font-weight-bold);
    color: var(--uksr-white);
    margin: 0;
    line-height: var(--uksr-line-height-tight);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Page Layout ─────────────────────────────────────────────── */

.uksr-page-layout {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 24px;
}

.uksr-page-article {
    min-width: 0;
}

/* ── Content Typography ──────────────────────────────────────── */

/* Global letter-spacing reset — parent additional.css sets 1-4px
   on .form-heading, .grey-heading, .sec-heading, .white-heading h3s.
   Strip it everywhere inside modernised page content. */
.uksr-page-content h1,
.uksr-page-content h2,
.uksr-page-content h3,
.uksr-page-content h4,
.uksr-page-content h5,
.uksr-page-content h6 {
    letter-spacing: normal !important;
    text-transform: none !important;
}

.uksr-page-content {
    margin-bottom: 40px;
}

.uksr-page-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--uksr-grey-700);
    margin-bottom: 1.5em;
}

.uksr-page-content h2 {
    font-size: 28px;
    font-weight: var(--uksr-font-weight-bold);
    color: var(--uksr-dark-blue);
    margin: 2em 0 0.75em;
    padding-bottom: 12px;
    line-height: var(--uksr-line-height-tight);
    position: relative;
}

.uksr-page-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--uksr-magenta);
    border-radius: 2px;
}

.uksr-page-content h3 {
    font-size: 22px;
    font-weight: var(--uksr-font-weight-bold);
    color: var(--uksr-dark-blue);
    margin: 1.75em 0 0.5em;
    padding-bottom: 10px;
    line-height: var(--uksr-line-height-tight);
    position: relative;
    text-transform: none;
}

.uksr-page-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 3px;
    background: var(--uksr-magenta);
    border-radius: 2px;
}

.uksr-page-content h4 {
    font-size: 18px;
    font-weight: var(--uksr-font-weight-semibold);
    color: var(--uksr-dark-blue);
    margin: 1.5em 0 0.5em;
    line-height: var(--uksr-line-height-normal);
}

.uksr-page-content ul,
.uksr-page-content ol {
    font-size: 16px;
    line-height: 1.7;
    color: var(--uksr-grey-700);
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

.uksr-page-content li {
    margin-bottom: 0.5em;
}

.uksr-page-content blockquote {
    border-left: 4px solid var(--uksr-green);
    margin: 1.5em 0;
    padding: 16px 24px;
    background: var(--uksr-grey-50);
    border-radius: 0 var(--uksr-radius-md) var(--uksr-radius-md) 0;
    font-style: italic;
    color: var(--uksr-grey-700);
}

.uksr-page-content blockquote p {
    margin-bottom: 0;
}

.uksr-page-content a {
    color: var(--uksr-green);
    text-decoration: none;
    transition: color var(--uksr-transition-fast);
}

.uksr-page-content a:hover {
    color: var(--uksr-green-dark);
    text-decoration: underline;
}

/* ── WordPress Image Alignment ───────────────────────────────── */

.uksr-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--uksr-radius-md);
}

.uksr-page-content .alignright {
    float: right;
    margin: 0.25em 0 1em 1.5em;
    max-width: 40%;
}

.uksr-page-content .alignleft {
    float: left;
    margin: 0.25em 1.5em 1em 0;
    max-width: 40%;
}

.uksr-page-content .aligncenter {
    display: block;
    margin: 1.5em auto;
}

/* Clear floats after paragraphs that follow floated images */
.uksr-page-content p::after {
    content: '';
    display: table;
    clear: both;
}

.uksr-page-content figure {
    margin: 1.5em 0;
}

.uksr-page-content figcaption {
    font-size: var(--uksr-font-size-sm);
    color: #6B7A94;
    text-align: center;
    margin-top: 8px;
}

/* ── Section Heading — Reusable Pattern ─────────────────────── */
/* Parent theme wraps h3s in wrapper divs (.grey-heading, .form-heading.purple,
   .white-heading) with varying backgrounds and borders.
   Reset all to a clean, consistent style: dark-blue text, 8px padding below,
   thin magenta border-bottom, 24px gap before content.
   Per-page CSS can override for card contexts (location-guide, how-to-book). */

.uksr-page-content .grey-heading,
.uksr-page-content .form-heading.purple,
.uksr-page-content .white-heading {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    clear: both;
    margin-top: 32px !important;
    margin-bottom: 24px !important;
}

.uksr-page-content .grey-heading:first-child,
.uksr-page-content .form-heading.purple:first-child,
.uksr-page-content .white-heading:first-child {
    margin-top: 0 !important;
}

.uksr-page-content .grey-heading h3,
.uksr-page-content .form-heading.purple h3,
.uksr-page-content .white-heading h3 {
    color: var(--uksr-dark-blue) !important;
    font-size: 22px !important;
    font-weight: var(--uksr-font-weight-bold) !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid rgba(230, 0, 126, 0.3) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    position: relative;
    text-transform: none !important;
    background: none !important;
}

/* Hide any legacy ::after underlines — border-bottom handles it now */
.uksr-page-content .grey-heading h3::after,
.uksr-page-content .form-heading.purple h3::after,
.uksr-page-content .white-heading h3::after {
    display: none;
}

/* ── Tables (T&Cs, supplementary products, etc.) ─────────────── */

.uksr-page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 15px;
}

.uksr-page-content th,
.uksr-page-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--uksr-grey-200);
    color: var(--uksr-grey-700);
}

.uksr-page-content th {
    font-weight: var(--uksr-font-weight-semibold);
    color: var(--uksr-dark-blue);
    background: var(--uksr-grey-50);
}

.uksr-page-content tr:hover td {
    background: var(--uksr-grey-50);
}

/* ── Parent Override Resets ───────────────────────────────────── */

/* Neutralise parent page.php layout remnants */
.uksr-page-article .article-header,
.uksr-page-article .entry-content,
.uksr-page-article .article-footer {
    all: unset;
    display: block;
}

/* Hide parent .home_title that may bleed through */
.uksr-page-layout .home_title {
    display: none;
}

/* Kill parent #content / .wrap padding that may bleed through */
.uksr-page-hero + .wrap,
.uksr-page-hero + #content {
    display: none;
}

/* ── Testimonials Section ────────────────────────────────────── */
/* Matches residence page center-stacked design (residence-single.css §15) */

.uksr-page-testimonials {
    max-width: var(--uksr-container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.uksr-page-testimonials .owl-carousel .item {
    text-align: center;
    padding: 32px 24px;
}

/* Author image — 80px circle, centered */
.uksr-page-testimonials .author_image {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
}

.uksr-page-testimonials .author_image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover;
    border-radius: 50%;
}

/* Testimonial content — centered, dark navy text */
.uksr-page-testimonials .testimonial_cont {
    max-width: 700px;
    margin: 0 auto;
    color: var(--uksr-grey-700);
    line-height: 1.7;
    font-size: 16px;
    float: none !important;
    width: auto !important;
    text-align: center;
}

.uksr-page-testimonials .testimonial_cont p {
    color: var(--uksr-grey-700);
    margin-bottom: 0;
}

/* Author name — bold, dark navy */
.uksr-page-testimonials .testimonial_cont span {
    display: block;
    margin-top: 12px;
    font-weight: 700;
    color: var(--uksr-dark-blue);
    font-size: 14px;
}

/* Clear div inside testimonial content */
.uksr-page-testimonials .testimonial_cont .clear {
    display: none;
}

/* Owl nav arrows */
.uksr-page-testimonials .owl-theme .owl-nav [class*="owl-"] {
    color: var(--uksr-dark-blue);
    background: none;
    font-size: 24px;
}

/* Owl dots — magenta active / grey inactive */
.uksr-page-testimonials .owl-theme .owl-dots .owl-dot span {
    background: var(--uksr-dark-blue);
    opacity: 0.2;
    width: 10px;
    height: 10px;
}

.uksr-page-testimonials .owl-theme .owl-dots .owl-dot.active span {
    background: var(--uksr-magenta);
    opacity: 1;
}

/* (White-heading, form-heading, grey-heading resets are now unified
   in the "Section Heading — Reusable Pattern" block above.) */

/* ── Responsive — Tablet (≤960px) ────────────────────────────── */

@media (max-width: 960px) {
    .uksr-page-hero__title {
        font-size: 34px;
    }
}

/* ── Responsive — Mobile (≤768px) ────────────────────────────── */

@media (max-width: 768px) {
    .uksr-page-hero {
        padding: 36px 16px;
    }

    .uksr-page-hero__title {
        font-size: 28px;
    }

    .uksr-page-layout {
        padding: 0 16px;
        margin: 24px auto;
    }

    .uksr-page-content h2 {
        font-size: 22px;
    }

    .uksr-page-content h3 {
        font-size: 18px;
    }

    /* Stack floated images on mobile */
    .uksr-page-content .alignright,
    .uksr-page-content .alignleft {
        float: none;
        display: block;
        max-width: 100%;
        margin: 1em 0;
    }

    .uksr-page-content table {
        font-size: 13px;
    }

    .uksr-page-content th,
    .uksr-page-content td {
        padding: 8px 10px;
    }
}
