/* ==========================================================================
   Stayner Community Hub — style.css
   Warm Brick & Cream  |  DM Sans + Inter
   ========================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
    --primary: #c0392b;
    --primary-dark: #922b21;
    --primary-light: #e74c3c;
    --accent: #27ae60;
    --accent-dark: #1e8449;
    --dark: #2c3e50;
    --light-bg: #fdf6ee;
    --cream: #faf3e8;
    --text: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --border: #e0d5c7;
    --shadow: 0 2px 12px rgba(44,62,80,0.08);
    --shadow-lg: 0 8px 30px rgba(44,62,80,0.12);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --font-heading: 'DM Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    line-height: 1.25;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.75rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }

p {
    margin-bottom: 1rem;
}

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-light {
    background: var(--white);
}

.section-cream {
    background: var(--cream);
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}

.section-dark h2,
.section-dark h3 {
    color: var(--white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 12px;
}

.section-header .label {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(192,57,43,0.3);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39,174,96,0.3);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    background: var(--cream);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.9rem;
}

/* ---------- Top Bar ---------- */
.top-bar {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: rgba(255,255,255,0.8);
}

.top-bar a:hover {
    color: var(--white);
}

/* ---------- Header / Nav ---------- */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    max-width: var(--container);
    margin: 0 auto;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--dark);
    font-size: 0.75rem;
    font-weight: 500;
    display: block;
    line-height: 1.2;
}

.logo:hover {
    color: var(--primary-dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-main a {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-main a:hover,
.nav-main a.active {
    color: var(--primary);
    background: rgba(192,57,43,0.06);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a::after {
    content: ' \25BE';
    font-size: 0.7em;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 8px 0;
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: var(--light-bg);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(44,62,80,0.7) 0%, rgba(192,57,43,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.2rem;
    margin-bottom: 16px;
    line-height: 1.15;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 28px;
    opacity: 0.95;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Page Hero (inner pages) */
.page-hero {
    position: relative;
    padding: 100px 0 60px;
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(44,62,80,0.75) 0%, rgba(146,43,33,0.5) 100%);
}

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

.page-hero h1 {
    color: var(--white);
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.page-hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.breadcrumb {
    margin-bottom: 16px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: var(--white);
    opacity: 0.8;
}

.breadcrumb a:hover {
    opacity: 1;
}

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

.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 220px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 24px;
}

.card-body h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.65;
}

.card-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(192,57,43,0.08);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.card-link:hover {
    gap: 10px;
}

/* ---------- Icon Cards ---------- */
.icon-card {
    text-align: center;
    padding: 36px 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.icon-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.icon-card .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(192,57,43,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
}

.icon-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.icon-card p {
    color: var(--text-light);
    font-size: 0.92rem;
}

/* ---------- Info Box / CTA ---------- */
.info-box {
    background: var(--cream);
    border-left: 4px solid var(--primary);
    padding: 24px 28px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 24px 0;
}

.info-box h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 40px 0;
}

.cta-banner h2 {
    color: var(--white);
    margin-bottom: 12px;
}

.cta-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 550px;
    margin: 0 auto 24px;
}

/* ---------- Content Page Layout ---------- */
.content-section {
    padding: 60px 0;
}

.content-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.content-wrap h2 {
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.content-wrap h3 {
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--primary);
}

.content-wrap ul,
.content-wrap ol {
    margin: 16px 0;
    padding-left: 24px;
}

.content-wrap ul {
    list-style: disc;
}

.content-wrap ol {
    list-style: decimal;
}

.content-wrap li {
    margin-bottom: 8px;
    line-height: 1.65;
}

.content-wrap img {
    border-radius: var(--radius-lg);
    margin: 28px 0;
    box-shadow: var(--shadow);
}

.content-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 96px;
}

.sidebar-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.sidebar-box h4 {
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.sidebar-box ul {
    list-style: none;
    padding: 0;
}

.sidebar-box li {
    margin-bottom: 8px;
}

.sidebar-box a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.92rem;
    color: var(--text);
}

.sidebar-box a:hover {
    background: var(--light-bg);
    color: var(--primary);
}

/* ---------- Feature / Split Sections ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.split-img img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.split-text h2 {
    margin-bottom: 16px;
}

.split-text p {
    color: var(--text-light);
    margin-bottom: 14px;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.check-list li {
    padding: 6px 0 6px 28px;
    position: relative;
    font-size: 0.95rem;
}

.check-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Stats ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
    padding: 40px 0;
}

.stat-item h3 {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ---------- Testimonial ---------- */
.testimonial {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    max-width: 650px;
    margin: 24px auto;
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
}

.testimonial cite {
    display: block;
    margin-top: 16px;
    font-style: normal;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

/* ---------- Directory / List ---------- */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.directory-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all var(--transition);
}

.directory-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.directory-item h4 {
    color: var(--dark);
    margin-bottom: 6px;
}

.directory-item .category {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.directory-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ---------- Events List ---------- */
.event-card {
    display: flex;
    gap: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: all var(--transition);
}

.event-card:hover {
    box-shadow: var(--shadow-lg);
}

.event-date {
    flex-shrink: 0;
    width: 72px;
    text-align: center;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    padding: 12px 8px;
    align-self: flex-start;
}

.event-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.event-date .day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
}

.event-info h3 {
    margin-bottom: 6px;
    font-size: 1.15rem;
}

.event-info p {
    color: var(--text-light);
    font-size: 0.92rem;
}

.event-info .location {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

/* ---------- Contact Form ---------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.92rem;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.75);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about h3 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 14px;
}

.footer-about h3 span {
    color: var(--primary-light);
}

.footer-about p {
    font-size: 0.92rem;
    line-height: 1.7;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.footer-col a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
    color: var(--white);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .content-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .section { padding: 48px 0; }

    .nav-toggle { display: flex; }

    .nav-main {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow-lg);
        gap: 0;
    }

    .nav-main.open {
        display: flex;
    }

    .nav-main a {
        padding: 12px 16px;
        width: 100%;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 16px;
    }

    .hero { min-height: 420px; }
    .hero-content h1 { font-size: 2.2rem; }

    .page-hero { padding: 70px 0 40px; }
    .page-hero h1 { font-size: 2rem; }

    .split {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .card-grid,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .event-card {
        flex-direction: column;
        gap: 16px;
    }

    .event-date {
        width: auto;
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .top-bar { display: none; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .card-body { padding: 18px; }
    .stats-row { grid-template-columns: 1fr; }
}
