/* ==========================================================================
   CLNJ Custom Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700;900&display=swap');

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* --------------------------------------------------------------------------
   Site Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 0 rgba(0,0,0,0.07);
    background: #ffffff;
}

/* Logo sizing */
.site-header .wp-block-site-logo a,
.site-header .wp-block-site-logo img {
    display: block;
    height: 60px;
    width: auto !important;
    max-width: none;
}

/* Navigation links */
.site-header .wp-block-navigation .wp-block-navigation-item__content {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #2c2c2c;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}

.site-header .wp-block-navigation .wp-block-navigation-item__content:hover {
    color: #2d6a2e;
    background: #e8f2e9;
}

/* Mobile hamburger button */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
    color: #2d6a2e !important;
}

/* Mobile overlay panel */
.wp-block-navigation__responsive-container.is-menu-open {
    z-index: 1000;
    background-color: #ffffff;
    display: flex !important;
    visibility: visible !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    color: #2c2c2c;
    font-size: 1.1rem;
    padding: 0.6rem 0;
}

/* --------------------------------------------------------------------------
   Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 4px solid #c4851a;
}

.site-footer a {
    color: #b8d4b9 !important;
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

.site-footer .footer-logo-img img {
    height: 70px;
    width: auto !important;
}

.footer-copyright {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 2rem;
    padding-top: 1.25rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.wp-element-button,
.wp-block-button__link {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    text-decoration: none !important;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Amber / accent button modifier */
.wp-block-button.is-style-amber .wp-block-button__link {
    background-color: #c4851a !important;
    color: #ffffff !important;
}

.wp-block-button.is-style-amber .wp-block-button__link:hover {
    background-color: #a06510 !important;
}

/* --------------------------------------------------------------------------
   Page Hero Banner (inner pages)
   -------------------------------------------------------------------------- */
.page-hero {
    background: linear-gradient(135deg, #2d6a2e 0%, #1e4a20 100%);
    padding: 4rem 2rem 3rem;
    text-align: center;
}

.page-hero h1 {
    color: #ffffff !important;
    margin-bottom: 0.75rem;
}

.page-hero .page-hero-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 1.15rem;
    max-width: 580px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   "I Am…" Cards (Homepage)
   -------------------------------------------------------------------------- */
.iam-section {
    background: #faf8f3;
}

.iam-card .wp-block-cover {
    border-radius: 10px !important;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.iam-card .wp-block-cover:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2) !important;
}

.iam-card .wp-block-cover__inner-container {
    padding: 1.25rem !important;
}

/* --------------------------------------------------------------------------
   Activities / Recent Events List
   -------------------------------------------------------------------------- */
.activities-section .wp-block-list {
    list-style: none;
    padding-left: 0;
}

.activities-section .wp-block-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    border-bottom: 1px solid #e8f2e9;
    font-size: 0.9375rem;
}

.activities-section .wp-block-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #c4851a;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Events Feed (Events page)
   -------------------------------------------------------------------------- */
.event-feed-item {
    background: #ffffff;
    border-left: 5px solid #2d6a2e;
    border-radius: 0 8px 8px 0;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.event-feed-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.event-feed-item.is-past {
    border-left-color: #6b4c32;
    opacity: 0.8;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b4c32;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.event-meta span::before {
    margin-right: 0.25rem;
}

/* --------------------------------------------------------------------------
   FAQ / Details Block
   -------------------------------------------------------------------------- */
.wp-block-details {
    border-bottom: 1px solid #e8f2e9;
    padding: 0.25rem 0;
}

.wp-block-details summary {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d6a2e;
    padding: 1rem 2rem 1rem 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.15s;
}

.wp-block-details summary::-webkit-details-marker { display: none; }

.wp-block-details summary::after {
    content: '+';
    font-size: 1.5rem;
    color: #c4851a;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s;
}

.wp-block-details[open] summary::after {
    content: '−';
}

.wp-block-details p {
    padding: 0.5rem 0 1.25rem;
    color: #2c2c2c;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Glossary
   -------------------------------------------------------------------------- */
.glossary-term {
    padding: 1.25rem 0;
    border-bottom: 1px solid #e8f2e9;
}

.glossary-term strong {
    color: #2d6a2e;
    font-family: 'Lora', Georgia, serif;
}

/* --------------------------------------------------------------------------
   Community Cards
   -------------------------------------------------------------------------- */
.community-card {
    background: #ffffff;
    border: 1px solid #e8f2e9;
    border-radius: 10px;
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.community-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.community-card h3 {
    margin-top: 0;
    font-size: 1.1rem !important;
    color: #2d6a2e !important;
}

.community-card .visit-info {
    font-size: 0.875rem;
    color: #6b4c32;
    background: #faf8f3;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   Team Member Cards
   -------------------------------------------------------------------------- */
.team-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8f2e9;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.team-card .team-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e8f2e9;
    margin-bottom: 1rem;
    display: block;
    background: #e8f2e9;
    flex-shrink: 0;
}

.team-card .team-name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: #2d6a2e;
    margin-bottom: 0.25rem;
}

.team-photo-placeholder {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f2e9 0%, #c8e0c9 100%);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #2d6a2e;
    border: 4px solid #e8f2e9;
}

/* --------------------------------------------------------------------------
   Resources / Link Lists
   -------------------------------------------------------------------------- */
.resources-section h3 {
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f2e9;
    margin-bottom: 1rem;
}

.resource-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0ede7;
    text-decoration: none;
}

.resource-link:hover {
    background: #faf8f3;
    border-radius: 4px;
    padding-left: 0.5rem;
}

/* --------------------------------------------------------------------------
   Newsletter Section
   -------------------------------------------------------------------------- */
.newsletter-section {
    background: linear-gradient(135deg, #2d6a2e 0%, #1e4a20 100%);
}

/* Mailchimp embed overrides */
.newsletter-section #mc_embed_signup {
    background: transparent !important;
}

.newsletter-section #mc_embed_signup input[type="email"] {
    border-radius: 4px;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-width: 280px;
    font-family: 'Inter', sans-serif;
}

.newsletter-section #mc_embed_signup input[type="submit"] {
    background: #c4851a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-section #mc_embed_signup input[type="submit"]:hover {
    background: #a06510;
}

/* --------------------------------------------------------------------------
   Values / Principles Grid
   -------------------------------------------------------------------------- */
.values-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
}

.value-tag {
    background: #e8f2e9;
    color: #1e4a20;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid #b8d4b9;
}

/* --------------------------------------------------------------------------
   Separator overrides
   -------------------------------------------------------------------------- */
.wp-block-separator {
    border-color: #e8f2e9 !important;
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 781px) {
    /* Reduce section padding on mobile */
    .wp-block-group[style*="padding-top:5rem"] {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Stack navigation */
    .site-header .wp-block-group {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .page-hero {
        padding: 3rem 1.25rem 2rem;
    }
}

@media (max-width: 480px) {
    .event-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* --------------------------------------------------------------------------
   Event Cards (image + content layout, book club variant)
   -------------------------------------------------------------------------- */
.event-card-inner {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.event-card-content {
    flex: 1;
    min-width: 0;
}

.event-poster {
    width: 160px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    display: block;
}

.event-feed-item[data-href] {
    cursor: pointer;
}

.event-feed-item.is-book-club {
    border-left-color: #8a5a10;
    background-color: #e8d5b0;
}

.event-feed-item.is-community-visit {
    border-left-color: #2d6a2e;
    background-color: #e8f2e9;
}

.event-feed-item.is-outing {
    border-left-color: #2a6a8a;
    background-color: #e3f0f7;
}

.event-feed-item.is-guest-speaker {
    border-left-color: #a0406a;
    background-color: #faeaf0;
}

.event-feed-item.is-info-session {
    border-left-color: #a08a00;
    background-color: #fdfae8;
}

@media (max-width: 600px) {
    .event-poster { width: 110px; }
}

@media (max-width: 400px) {
    .event-card-inner { flex-direction: column-reverse; }
    .event-poster { width: 100%; aspect-ratio: 3 / 1; }
}

/* --------------------------------------------------------------------------
   Mailing List / Mailchimp Signup Form
   -------------------------------------------------------------------------- */
.clnj-signup-form {
    max-width: 640px;
    margin: 0 auto;
}

.clnj-form-intro {
    color: #6b4c32;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e8f2e9;
}

.clnj-required-star {
    color: #c4851a;
    font-weight: 600;
}

.clnj-field-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.clnj-field-group label,
.clnj-field-group strong {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c2c2c;
}

.clnj-field-group input[type="text"],
.clnj-field-group input[type="email"],
.clnj-field-group input[type="number"],
.clnj-field-group select {
    border: 1px solid #c8d8c9;
    border-radius: 4px;
    padding: 0.6rem 0.875rem;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    color: #2c2c2c;
    background: #ffffff;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.clnj-field-group input:focus,
.clnj-field-group select:focus {
    outline: none;
    border-color: #2d6a2e;
    box-shadow: 0 0 0 3px rgba(45,106,46,0.12);
}

.clnj-field-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.clnj-field-row .clnj-field-group {
    flex: 1;
    min-width: 180px;
}

.clnj-radio-group,
.clnj-checkbox-group {
    background: #faf8f3;
    border: 1px solid #e8f2e9;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

.clnj-radio-group strong,
.clnj-checkbox-group strong {
    display: block;
    margin-bottom: 0.75rem;
    color: #1e4a20;
}

.clnj-radio-group ul,
.clnj-checkbox-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.clnj-radio-group ul li label,
.clnj-checkbox-group ul li label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: #2c2c2c;
    cursor: pointer;
    line-height: 1.4;
}

.clnj-radio-group input[type="radio"],
.clnj-checkbox-group input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: #2d6a2e;
    width: 1rem;
    height: 1rem;
}

.clnj-submit-row {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e8f2e9;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.clnj-submit-btn {
    background: #c4851a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.02em;
}

.clnj-submit-btn:hover {
    background: #a06510;
    transform: translateY(-1px);
}

.clnj-submit-note {
    font-size: 0.8125rem;
    color: #6b4c32;
    margin: 0;
}

/* Mailchimp validation messages */
#mce-error-response,
#mce-success-response {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

#mce-error-response { background: #fde8e8; color: #8b2121; }
#mce-success-response { background: #e8f2e9; color: #1e4a20; }

/* --------------------------------------------------------------------------
   Home Page — Compact Upcoming Events List (hero section)
   -------------------------------------------------------------------------- */
.clnj-home-events {
    margin-top: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.18);
    padding-top: 1.25rem;
    text-align: center;
}

.clnj-home-events__label {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c4851a;
    margin: 0 0 0.75rem;
}

.clnj-home-events__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.35rem;
}

.clnj-home-events__item {
    display: table-row;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
}

.clnj-home-events__item > * {
    display: table-cell;
    vertical-align: top;
    padding: 0.2rem 0.5rem;
}

.clnj-home-events__item > *:first-child { padding-left: 0; }
.clnj-home-events__item > *:last-child  { padding-right: 0; }

.clnj-home-events__date {
    color: rgba(196,133,26,0.9);
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
    width: 1%;
}

.clnj-home-events__title {
    color: rgba(255,255,255,0.92);
    font-weight: 500;
    word-break: break-word;
    text-align: left;
}

.clnj-home-events__location {
    color: rgba(212,232,213,0.55);
    font-weight: 400;
    font-size: 0.8rem;
}

.clnj-home-events__rsvp {
    color: #c4851a;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
    width: 1%;
    transition: color 0.15s;
}

.clnj-home-events__rsvp:hover {
    color: #e09a2a;
    text-decoration: underline;
}

.clnj-home-events__more {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: rgba(212,232,213,0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.clnj-home-events__more:hover {
    color: #ffffff;
}

.clnj-home-events__none {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: rgba(212,232,213,0.7);
    margin: 0;
}

.clnj-home-events__none a {
    color: #c4851a;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .clnj-home-events__list { display: block; }
    .clnj-home-events__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; margin-bottom: 0.5rem; }
    .clnj-home-events__item > * { display: inline; padding: 0; width: auto !important; }
    .clnj-home-events__date::after { content: ' ·'; color: rgba(255,255,255,0.35); margin-right: 0.2rem; }
}

/* --------------------------------------------------------------------------
   Contact Form
   -------------------------------------------------------------------------- */

.clnj-contact-form {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 480px;
}

/* wpautop injects an empty <p> after the nonce hidden fields */
.clnj-contact-form > p:empty {
    display: none;
}

/* wpautop wraps the submit button in <p>…<br></p> */
.clnj-contact-form > p:has(> .clnj-contact-submit) {
    display: contents; /* button becomes a direct flex item */
}

.clnj-contact-form > p:has(> .clnj-contact-submit) > br {
    display: none;
}


.clnj-contact-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.clnj-contact-field label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2c2c2c;
}

.clnj-contact-field input[type="email"],
.clnj-contact-field textarea {
    border: 1px solid #c8d8c9;
    border-radius: 4px;
    padding: 0.6rem 0.875rem;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    color: #2c2c2c;
    background: #ffffff;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
    resize: vertical;
}

.clnj-contact-field input[type="email"]:focus,
.clnj-contact-field textarea:focus {
    outline: none;
    border-color: #2d6a2e;
    box-shadow: 0 0 0 3px rgba(45,106,46,0.12);
}

.clnj-contact-submit {
    align-self: flex-start;
    background: #2d6a2e;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.clnj-contact-submit:hover {
    background: #1e4a20;
    transform: translateY(-1px);
}

.clnj-contact-error {
    color: #8b2121;
    background: #fde8e8;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    margin: 0;
}

.clnj-contact-success {
    background: #e8f2e9;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    color: #1e4a20;
    font-size: 0.9375rem;
    margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
    .site-header,
    .site-footer,
    .wp-block-navigation { display: none; }
}
