/* =====================================================================
   SITE POLISH (13 Oct 2026)
   Loaded after styles.css on every page. Each block is numbered to match
   _requests/2026-10-13-site-polish-CHANGES.md: delete a block to undo it,
   or remove the <link> to polish.css to undo them all.
   ===================================================================== */

/* P2 · Blog page: the four smaller posts sit in a balanced 2 × 2 grid
   instead of three in a row with one left on its own. */
@media (min-width: 769px) {
    .blog-card-grid.card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-card-grid .blog-card-image {
        height: 240px;
    }
}

/* P3 · About page: show the whole graduation photo instead of a crop that
   cut "CONGRATULATIONS" in half; line it up with the top of the text. */
.qualifications-grid {
    align-items: start !important;
}
.qualifications-img-wrap img {
    height: auto !important;
    aspect-ratio: 3 / 4;
    object-position: center top;
}
@media (min-width: 901px) {
    .qualifications-img-wrap {
        position: sticky;
        top: 110px;
    }
}

/* P4 · About page "In Action" photos fill their cards edge to edge
   instead of sitting small inside thick white padding. */
.gallery-grid .card {
    padding: 0;
}
.gallery-grid .card img {
    border-radius: 0 !important;
    height: 360px !important;
    display: block;
}

/* P5 · Contact page: the logo lines up with "Let's Talk" and the text
   under it, instead of floating in the middle of the column. */
.contact-logo {
    justify-content: flex-start;
}

/* P6 · Testimonials on phones: the arrows move under the quote, either
   side of the dots, so they no longer cover the text or push the page
   sideways. */
@media (max-width: 768px) {
    .testimonial-nav,
    .testimonial-nav:hover {
        top: auto;
        bottom: -18px;
        transform: none;
    }
    .testimonial-prev {
        left: calc(50% - 100px);
    }
    .testimonial-next {
        right: calc(50% - 100px);
    }
    .testimonial-dots {
        margin-top: 2.5rem;
        min-height: 10px;
    }
}

/* P8 · Phones: the four "How I Support Runners" (home) and "What Runners
   Achieve" (testimonials) cards become compact rows, icon on the left,
   so they take half the scrolling. */
@media (max-width: 768px) {
    .compact-cards {
        grid-template-columns: 1fr !important;
        gap: 0.9rem !important;
    }
    .compact-cards .card {
        display: grid;
        grid-template-columns: 52px 1fr;
        column-gap: 1rem;
        align-items: start;
        text-align: left;
        padding: 1.25rem 1.25rem;
    }
    .compact-cards .card-icon {
        grid-row: span 2;
        width: 52px;
        height: 52px;
        margin: 0;
        border-radius: 14px;
    }
    .compact-cards .card-icon i {
        font-size: 1.3rem;
    }
    .compact-cards .card h3 {
        margin: 0 0 0.25rem;
        font-size: 1.08rem;
    }
    .compact-cards .card p {
        margin: 0;
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* P9 · Services page: the opening "How We Can Work Together" heading and
   intro are centred, like every other section header on the site. */
#one-to-one .section-intro {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 1rem;
}
#one-to-one .section-intro .section-title {
    text-align: center !important;
}
#one-to-one .section-intro p {
    margin-left: auto;
    margin-right: auto;
}

/* P10 · Long reading text (About "My Story") is kept to a comfortable
   line length. */
.reading-width {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* P1 · Guide page: the blurry, cut-off picture of the gels table is
   replaced by a sharp sample page from the guide. P15 (13 Oct, round 2):
   it now looks like a real page lifted out of the PDF (tilted the
   opposite way to the cover, floating gently, rows revealing in turn) to
   match the cover mock-up. */
.guide-sample-wrap {
    position: relative;
    isolation: isolate;
    padding: 1.25rem 1rem 1.5rem;
}
.guide-sample-wrap::before {
    content: "";
    position: absolute;
    inset: 4% 2% 2% 8%;
    z-index: -1;
    border-radius: 22px;
    background: linear-gradient(150deg, var(--teal-subtle), rgba(91, 154, 160, 0.35));
    transform: rotate(-4deg);
}
.guide-sample {
    margin: 0;
    padding: 1.1rem 1.25rem 0.4rem;
    border-radius: 6px 14px 14px 6px;
    background: var(--white);
    box-shadow:
        inset 4px 0 0 rgba(0, 0, 0, 0.05),
        0 26px 50px rgba(4, 30, 38, 0.22),
        0 6px 14px rgba(4, 30, 38, 0.12);
    transform: rotate(2.5deg);
    transition: transform 0.6s var(--ease-out-quart);
}
.guide-sample-wrap {
    animation: guide-sample-float 7s ease-in-out infinite;
}
.guide-sample-wrap:hover .guide-sample {
    transform: rotate(0.5deg) translateY(-4px);
}
@keyframes guide-sample-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.guide-sample-page-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--gray-mid);
    padding-bottom: 0.55rem;
    margin-bottom: 0.9rem;
    border-bottom: 2px solid #7a2a2a;
}
.guide-sample figcaption {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--teal-dark);
    background: var(--teal-subtle);
}
.guide-sample table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}
.guide-sample thead th {
    background: #6f2da8;
    color: var(--white);
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.3;
    text-align: left;
    padding: 0.6rem 0.75rem;
}
.guide-sample thead th + th,
.guide-sample td {
    text-align: right;
    width: 1%;
}
.guide-sample td {
    white-space: nowrap;
}
.guide-sample tbody th,
.guide-sample td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--gray-light);
    color: var(--text-dark);
}
.guide-sample tbody th {
    text-align: left;
    font-weight: 600;
}
.guide-sample tbody th span {
    display: block;
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--gray-dark);
}
.guide-sample td strong {
    color: #6f2da8;
}
.guide-sample-more {
    margin: 0;
    padding: 0.8rem 0.25rem 0.6rem;
    font-size: 0.82rem;
    color: var(--gray-dark);
}
/* Rows slide in one after another when the section scrolls into view. */
.guide-extra.fade-in .guide-sample tbody tr {
    opacity: 0;
    transform: translateX(14px);
}
.guide-extra.visible .guide-sample tbody tr {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s ease, transform 0.6s var(--ease-out-quart);
}
.guide-extra.visible .guide-sample tbody tr:nth-child(1) { transition-delay: 0.35s; }
.guide-extra.visible .guide-sample tbody tr:nth-child(2) { transition-delay: 0.5s; }
.guide-extra.visible .guide-sample tbody tr:nth-child(3) { transition-delay: 0.65s; }
@media (max-width: 480px) {
    .guide-sample-wrap { padding: 0.75rem 0.4rem 1rem; }
    .guide-sample-wrap::before { inset: 6% 3% 3% 6%; transform: rotate(-3deg); }
    .guide-sample { transform: rotate(1.5deg); }
    .guide-sample table { font-size: 0.9rem; }
    .guide-sample thead th,
    .guide-sample tbody th,
    .guide-sample td { padding: 0.65rem 0.6rem; }
    /* Two columns on small phones so product names don't squash. */
    .guide-sample thead th:nth-child(2),
    .guide-sample tbody td:nth-of-type(1) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .guide-sample-wrap { animation: none; }
    .guide-extra.fade-in .guide-sample tbody tr { opacity: 1; transform: none; }
}

/* P7 · Phones: decorative shapes and the hidden testimonial slides were
   poking past the right edge (Testimonials and Services pages could be
   dragged sideways). Anything wider than the screen is now clipped. */
html,
body {
    overflow-x: clip;
}

/* P11 · Services page: the Pyllon Coaching banner photo is framed from
   the top so its name isn't cut off. */
img[src="images/services-how-we-work-1.png"] {
    object-position: center top;
}

/* P12 · Testimonials on phones: less padding and slightly smaller quote
   text, so long reviews read in a comfortable column, not a thin strip. */
@media (max-width: 768px) {
    .testimonial-card {
        padding: 1.75rem 1.4rem;
    }
    .testimonial-card blockquote {
        font-size: 1rem;
        line-height: 1.75;
    }
}

/* P13 · Testimonials: the large decorative quote mark no longer sits on
   top of the first words of each review. */
.testimonial-card blockquote {
    padding-top: 1.6rem;
}

/* P14 · Services page, "How We Can Work Together" cards: no more two
   half-empty cards next to a full one. Initial Assessment (the most
   detailed service) becomes a large featured card; Athlete Reviews and
   Club & Team Nutrition stack beside it, with their Book buttons sitting
   under their own text instead of floating at the bottom. */
.card-grid-3.service-cards .card {
    min-height: 0;
}
.card-grid-3.service-cards .card .service-book-btn {
    width: auto;
    max-width: none;
    margin: auto 0 0;
    align-self: flex-start;
    padding: 0.8rem 1.75rem;
}
@media (min-width: 901px) {
    .card-grid-3.service-cards {
        grid-template-columns: 1.2fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 1.75rem;
    }
    #service-initial {
        grid-row: 1 / span 2;
    }
}
#service-initial {
    background: linear-gradient(155deg, var(--blue-deep) 0%, var(--blue-mid) 55%, var(--teal-mid) 100%);
    color: var(--white);
    padding: 2.75rem 2.5rem;
}
#service-initial::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: -140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127, 184, 189, 0.35), transparent 70%);
    pointer-events: none;
}
#service-initial h3 {
    color: var(--white);
    font-size: 1.6rem;
}
#service-initial p {
    color: rgba(255, 255, 255, 0.86) !important;
    font-size: 1.02rem !important;
}
#service-initial .card-icon {
    background: rgba(255, 255, 255, 0.14);
}
#service-initial .card-icon i {
    background: none;
    -webkit-text-fill-color: var(--white);
    color: var(--white);
}
#service-initial .service-book-btn {
    background: var(--white);
    border-color: var(--white);
    color: var(--teal-dark);
    position: relative;
    z-index: 1;
}
#service-initial .service-book-btn:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
}
#service-review,
#service-club {
    display: grid;
    grid-template-columns: 64px 1fr;
    column-gap: 1.4rem;
    align-content: start;
    padding: 2.25rem 2.25rem;
}
#service-review .card-icon,
#service-club .card-icon {
    grid-row: 1 / span 3;
    width: 64px;
    height: 64px;
    margin: 0;
}
#service-review h3,
#service-club h3 {
    margin-top: 0.35rem;
}
#service-review .service-book-btn,
#service-club .service-book-btn {
    justify-self: start;
    margin-top: 0.25rem;
}
@media (max-width: 768px) {
    #service-initial,
    #service-review,
    #service-club,
    #service-initial h3,
    #service-review h3,
    #service-club h3 {
        text-align: left !important;
        align-items: flex-start;
    }
    #service-initial .card-icon,
    #service-review .card-icon,
    #service-club .card-icon {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
@media (max-width: 600px) {
    #service-initial {
        padding: 2.25rem 1.6rem;
    }
    #service-review,
    #service-club {
        grid-template-columns: 1fr;
        padding: 2rem 1.6rem;
    }
    #service-review .card-icon,
    #service-club .card-icon {
        grid-row: auto;
        margin-bottom: 1.25rem;
    }
}

/* P14b · Services on phones: an old layout rule in services.html was
   moving Initial Assessment to the bottom of the list (live site too).
   The three services now stay in their proper order. */
#one-to-one .service-cards > .card {
    order: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
