/*
Theme Name: Shelter Harbor
Theme URI: https://shelterharborlife.com
Description: Custom theme for Shelter Harbor community site.
Version: 1.0.0
Author: Shelter Harbor
Text Domain: shelter-harbor
*/

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&display=swap');

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
    --color-green:      #32564d;
    --color-link:       #009b77;
    --color-text:       #2b2c28;
    --color-white:      #ffffff;
    --color-light-gray: #f5f5f3;
    --color-border:     #e0e0db;

    --font-serif: 'Fraunces', Georgia, serif;
    --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

    --nav-height: 72px;
    --max-width:  1200px;
    --gutter:     48px;
}

/* ── Reset / base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--color-link);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--color-green);
    font-weight: 600;
    line-height: 1.15;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

/* ── Layout helpers ───────────────────────────────────────────────────────── */
.sh-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.sh-content {
    padding: 56px var(--gutter);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ── WP alignment helpers ─────────────────────────────────────────────────── */
.alignleft, img.alignleft {
    display: inline;
    float: left;
    margin-right: 1.5em;
    margin-bottom: 0.5em;
}
.alignright, img.alignright {
    display: inline;
    float: right;
    margin-left: 1.5em;
    margin-bottom: 0.5em;
}
.aligncenter, img.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
p { clear: both; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.sh-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.sh-header-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sh-logo img {
    height: 48px;
    width: auto;
}

/* ── Desktop nav ──────────────────────────────────────────────────────────── */
.sh-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.sh-nav > li {
    position: relative;
}

.sh-nav > li > a,
.sh-nav > li > button {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}
.sh-nav > li > a:hover,
.sh-nav > li > button:hover { color: var(--color-green); }

/* Dropdown caret */
.sh-nav-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-top: 1px;
    transition: transform 0.2s;
}
.sh-nav > li.open .sh-nav-caret { transform: rotate(180deg); }

/* Dropdown panel */
.sh-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: 220px;
    list-style: none;
    padding: 8px 0;
    z-index: 200;
}
.sh-nav > li.open .sh-dropdown { display: block; }

.sh-dropdown li a {
    display: block;
    padding: 10px 24px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.1s, color 0.1s;
}
.sh-dropdown li a:hover {
    background: var(--color-light-gray);
    color: var(--color-green);
}

/* Login button */
.sh-login-btn {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-white);
    background: var(--color-green);
    border: none;
    padding: 8px 20px;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}
.sh-login-btn:hover { opacity: 0.85; text-decoration: none; }

/* ── Mobile hamburger ─────────────────────────────────────────────────────── */
.sh-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.sh-hamburger span {
    display: block;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.2s;
}

/* ── Mobile drawer ────────────────────────────────────────────────────────── */
.sh-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
}
.sh-drawer.open { display: block; }

.sh-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.sh-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 85vw);
    background: var(--color-white);
    overflow-y: auto;
    padding: 32px 24px 48px;
}

.sh-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
    line-height: 1;
    z-index: 1;
}

.sh-drawer-nav {
    list-style: none;
    margin-top: 16px;
}

.sh-drawer-nav > li > a,
.sh-drawer-nav > li > button {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-green);
    background: none;
    border: none;
    padding: 14px 0;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
}

/* Drawer submenu */
.sh-drawer-sub {
    list-style: none;
    display: none;
    padding-left: 16px;
}
.sh-drawer-sub.open { display: block; }

.sh-drawer-sub li a {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text);
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
}
.sh-drawer-sub li a:hover { color: var(--color-green); }

/* ── Hero: full-width (home page) ─────────────────────────────────────────── */
.sh-hero-full {
    position: relative;
    width: 100%;
    height: clamp(320px, 50vw, 520px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sh-hero-full-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.sh-hero-full-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
}

.sh-hero-full-text {
    position: relative;
    z-index: 1;
    color: var(--color-white);
    padding: 0 24px;
}

.sh-hero-full-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 12px;
    opacity: 0.9;
}

.sh-hero-full-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 400;
    color: var(--color-white);
    line-height: 1.05;
}

/* ── Hero: split (interior pages) ────────────────────────────────────────── */
.sh-hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: clamp(280px, 40vw, 480px);
}

.sh-hero-split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px, 6vw, 80px) clamp(32px, 5vw, 72px);
}

.sh-hero-split-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--color-green);
    line-height: 1.1;
    margin-bottom: 16px;
}

.sh-hero-split-subtitle {
    font-size: 1rem;
    color: var(--color-text);
    opacity: 0.75;
    max-width: 38ch;
    line-height: 1.6;
}

.sh-hero-split-image {
    background-size: cover;
    background-position: center;
    min-height: 280px;
}

/* ── Page content area ────────────────────────────────────────────────────── */
.sh-page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 56px var(--gutter) 80px;
}

.sh-page-content h2 { margin-bottom: 16px; }
.sh-page-content h3 { margin: 32px 0 12px; }
.sh-page-content p  { margin-bottom: 1.2em; }

.sh-page-content ul,
.sh-page-content ol {
    margin: 0 0 1.2em 1.5em;
    line-height: 1.7;
}

/* Two-column content layout (board page etc.) */
.sh-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.sh-footer {
    background: var(--color-green);
    color: var(--color-white);
    padding: 64px var(--gutter);
}

.sh-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 64px;
    align-items: start;
}

.sh-footer-about h3 {
    font-family: var(--font-serif);
    color: var(--color-white);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.2;
}

.sh-footer-about p {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.7;
    max-width: 32ch;
}

.sh-footer-nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-white);
    opacity: 0.6;
    margin-bottom: 20px;
}

.sh-footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    list-style: none;
}

.sh-footer-links li a {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-white);
    opacity: 0.8;
    padding: 8px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    transition: opacity 0.15s;
}
.sh-footer-links li a:hover { opacity: 1; text-decoration: none; }

.sh-footer-copy {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.75rem;
    opacity: 0.5;
    text-align: center;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media ( max-width: 900px ) {
    :root { --gutter: 24px; }

    .sh-nav     { display: none; }
    .sh-hamburger { display: flex; }

    .sh-hero-split {
        grid-template-columns: 1fr;
    }
    .sh-hero-split-image {
        order: -1;
        min-height: 220px;
    }

    .sh-two-col { grid-template-columns: 1fr; gap: 32px; }

    .sh-footer-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media ( max-width: 480px ) {
    .sh-footer-links { grid-template-columns: 1fr; }
    .sh-hero-full { height: 260px; }
}
