/*
Theme Name: Gatehouse Swim
Theme URI: https://gatehouseswim.example
Author: Gatehouse Community Swim & Water Safety Centre
Author URI: https://gatehouseswim.example
Description: A purpose-built WordPress theme for the Gatehouse Community Swim & Water Safety Centre — a rural, low-carbon learn-to-swim facility proposed for Gatehouse of Fleet, Dumfries & Galloway. Designed as a funding and community landing page, with sections for mission, facility, sustainability, funding needs and contact.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gatehouse-swim
Tags: one-page, community, charity, education, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.65;
    color: #1e2a38;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #0b6fa4; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.6em;
    color: #0d2a44;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #e5ecf2;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.site-branding a {
    color: #0d2a44;
    font-weight: 800;
    font-size: 1.05rem;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-branding .tagline {
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: #5a6b7c;
    margin-top: 2px;
}

.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.primary-nav a {
    color: #0d2a44;
    font-weight: 500;
    font-size: 0.95rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.35rem;
    background: #0b6fa4;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.btn:hover, .btn:focus {
    background: #08587f;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #0b6fa4;
    border: 2px solid #0b6fa4;
    padding: 0.65rem 1.25rem;
}

.btn-secondary:hover { background: #0b6fa4; color: #fff; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 5.5rem 0 5rem;
    background:
        linear-gradient(180deg, rgba(11,111,164,0.08) 0%, rgba(11,111,164,0) 60%),
        linear-gradient(135deg, #e8f3fa 0%, #f4faff 60%, #ffffff 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 80px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'><path d='M0,40 C200,80 400,0 600,40 C800,80 1000,0 1200,40 L1200,80 L0,80 Z' fill='%23ffffff'/></svg>") bottom/cover no-repeat;
}

.hero .container { position: relative; z-index: 1; }

.hero-eyebrow {
    display: inline-block;
    background: #0b6fa4;
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.hero h1 {
    max-width: 820px;
    margin-bottom: 1rem;
}

.hero .lead {
    max-width: 720px;
    font-size: 1.15rem;
    color: #37475a;
    margin-bottom: 2rem;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ---------- Sections ---------- */
.section {
    padding: 4.5rem 0;
    border-bottom: 1px solid #f0f4f8;
}

.section-alt {
    background: #f6fafd;
}

.section h2 {
    margin-bottom: 0.5rem;
}

.section-intro {
    max-width: 760px;
    color: #465567;
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

/* ---------- Cards grid ---------- */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: #fff;
    border: 1px solid #e5ecf2;
    border-radius: 12px;
    padding: 1.6rem;
    box-shadow: 0 1px 2px rgba(10, 31, 68, 0.04);
    transition: box-shadow .2s ease, transform .2s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(10, 31, 68, 0.08);
    transform: translateY(-2px);
}

.card .icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: #e8f3fa;
    color: #0b6fa4;
    border-radius: 10px;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.card h3 {
    margin-bottom: 0.4rem;
    color: #0d2a44;
}

.card p {
    color: #4a5a6e;
    margin: 0;
    font-size: 0.97rem;
}

/* ---------- Facility split ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; }
}

.split ul {
    padding-left: 1.2rem;
    margin: 0.5rem 0 0;
}

.split ul li {
    margin-bottom: 0.45rem;
}

.visual-box {
    background: linear-gradient(135deg, #0b6fa4 0%, #0d4d74 100%);
    color: #fff;
    border-radius: 16px;
    padding: 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(11, 111, 164, 0.25);
}

.visual-box::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    top: -80px;
    right: -80px;
    border-radius: 50%;
}

.visual-box h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.visual-box .stat {
    font-size: 2.4rem;
    font-weight: 800;
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.visual-box .stat-label {
    display: block;
    opacity: 0.85;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ---------- Stats strip ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    padding: 2.5rem;
    background: #0d2a44;
    color: #fff;
    border-radius: 16px;
    margin-top: 2rem;
}

.stats .stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: #6fc3ec;
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stats .stat-lab {
    font-size: 0.92rem;
    opacity: 0.85;
}

/* ---------- Funding list ---------- */
.funders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.funder {
    background: #fff;
    border: 1px solid #e5ecf2;
    border-left: 4px solid #0b6fa4;
    border-radius: 8px;
    padding: 1rem 1.2rem;
}

.funder strong { display: block; color: #0d2a44; }
.funder span { color: #5a6b7c; font-size: 0.9rem; }

/* ---------- Contact / CTA ---------- */
.cta {
    text-align: center;
    padding: 5rem 1rem;
    background: linear-gradient(135deg, #0b6fa4 0%, #0d4d74 100%);
    color: #fff;
    border-radius: 0;
}

.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,0.9); font-size: 1.1rem; max-width: 640px; margin: 0 auto 1.75rem; }

.cta .btn {
    background: #fff;
    color: #0b6fa4;
}

.cta .btn:hover { background: #e8f3fa; }

.contact-form {
    max-width: 560px;
    margin: 0 auto;
    text-align: left;
    background: #fff;
    color: #1e2a38;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-top: 2rem;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #0d2a44;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.contact-form textarea { min-height: 120px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer {
    background: #0a1f33;
    color: #cbd6e2;
    padding: 3rem 0 1.5rem;
    font-size: 0.95rem;
}

.site-footer a { color: #9ecfe8; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.site-footer h4 { color: #fff; margin-bottom: 0.85rem; font-size: 1rem; }

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li { margin-bottom: 0.4rem; }

.footer-bottom {
    border-top: 1px solid #1e3a56;
    padding-top: 1.25rem;
    text-align: center;
    color: #8aa0b6;
    font-size: 0.85rem;
}

/* ---------- Utility ---------- */
.visually-hidden {
    clip: rect(1px,1px,1px,1px);
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
}

/* ---------- WP standard content styles (for posts/pages) ---------- */
.entry-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}
.entry-content h1 { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.35rem; }
.entry-content blockquote {
    border-left: 4px solid #0b6fa4;
    padding: 0.5rem 1rem;
    color: #4a5a6e;
    background: #f6fafd;
    margin: 1.5rem 0;
}
.entry-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
