/* -- VARIABLES -- */
:root {
    /* Vintage Maine Palette inspired by Logo */
    --color-bg: #fcfbf9;
    /* Cream/Off-white */
    --color-bg-alt: #f0ebe1;
    /* Warmer sand */
    --color-text: #3e2723;
    /* Deep Dark Espresso */
    --color-text-light: #5c4033;
    --color-primary: #7c8f7d;
    /* Soft Sage Green */
    --color-secondary: #d8c3a5;
    /* Sand/Wood */
    --color-accent: #8b5a2b;
    /* Vintage Brown/Rust */
    --color-glass: rgba(252, 251, 249, 0.7);
    --color-glass-border: rgba(62, 39, 35, 0.1);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --shadow-soft: 0 8px 30px rgba(62, 39, 35, 0.08);
    --shadow-hover: 0 15px 40px rgba(62, 39, 35, 0.15);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* -- RESET & BASE -- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* -- LAYOUT -- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.divider {
    height: 2px;
    width: 60px;
    background-color: var(--color-accent);
    margin: 1.5rem auto 0;
}

.bg-light {
    background-color: var(--color-bg-alt);
}

.bg-dark {
    background-color: var(--color-text);
    color: var(--color-bg);
}

.bg-dark h2,
.bg-dark p {
    color: var(--color-bg);
}

/* -- COMPONENTS -- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    font-family: var(--font-body);
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-text);
    color: var(--color-bg);
    border: 1px border var(--color-text);
}

.btn-primary:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-bg);
    border: 1px solid var(--color-bg);
}

.btn-secondary:hover {
    background-color: var(--color-bg);
    color: var(--color-text);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-bg);
    border: 1px solid var(--color-accent);
}

.btn-accent:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.w-100 {
    width: 100%;
}

/* -- NAVBAR -- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-glass-border);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    /* Adjust size as needed */
    width: auto;
    object-fit: contain;
}

.blend-logo {
    mix-blend-mode: multiply;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center the subtitle below the title */
    margin-left: 0.5rem;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
    color: var(--color-text);
    /* Ensure explicit color */
}

.logo-subtitle {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    /* Reduced size again based on feedback */
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 3px;
    /* Ensure balance with the smaller font size */
    text-transform: uppercase;
    margin-top: 4px;
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

/* -- HERO -- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(62, 39, 35, 0.4), rgba(62, 39, 35, 0.7));
}

.hero-content {
    max-width: 800px;
    color: var(--color-bg);
}

.hero-content h1,
.hero-content p {
    color: var(--color-bg);
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* -- SERVICES -- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #fff;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid var(--color-glass-border);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.service-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

/* -- ABOUT SECTION -- */
#about {
    padding: 4.5rem 0;
    /* Reduced from 6rem to make it less tall */
}

#about .container-split {
    align-items: flex-start;
    /* Changed to flex-start to align photo to the top */
    grid-template-columns: 5fr 7fr;
    /* Give text more width to reduce height */
}

.about-left {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.about-logo-wrapper {
    width: 80%;
    max-width: 300px;
    opacity: 0.85;
    /* Make the logo slightly subtle */
}

#about .split-image {
    aspect-ratio: 1 / 1;
}

#about .split-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center 20%;
    /* Keep face visible if cropped */
}

.about-lead {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 1.5rem;
}

.about-list {
    margin-bottom: 1.5rem;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.about-list i {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.about-list span {
    font-weight: 600;
    color: var(--color-text);
    display: block;
    margin-bottom: 0.25rem;
}

.about-mission {
    padding-left: 1.5rem;
    border-left: 3px solid var(--color-secondary);
    margin-top: 2rem;
}

.about-mission p {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0;
}

/* -- SPLIT SECTION -- */
.container-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.split-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.split-image img {
    transition: transform 0.8s ease;
    width: 100%;
}

#impact .split-image {
    max-width: 450px;
    margin: 0 auto;
}

.split-image:hover img {
    transform: scale(1.05);
}

.image-accent {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 100px;
    height: 100px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    z-index: -1;
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-primary);
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
}

/* -- DYNAMIC EVENTS GRID -- */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.event-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.event-card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-glass-border);
}

.event-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-meta i {
    color: var(--color-primary);
    font-size: 1.2rem;
}

.event-desc {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.event-actions {
    margin-top: auto;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--color-text-light);
}

.loading-state i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* -- CONTACT & FORMS -- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--color-bg-alt);
}

.glass-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-bg);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-bg);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Modal form adjustments */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* -- FOOTER -- */
footer {
    background: var(--color-bg-alt);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(62, 39, 35, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-brand p {
    max-width: 300px;
    margin-top: 1rem;
}

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(62, 39, 35, 0.1);
    font-size: 0.9rem;
}

/* Removed modal styles as they are no longer needed */

/* -- ANIMATIONS -- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -- RESPONSIVE -- */
@media (max-width: 900px) {

    .container-split,
    #about .container-split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        order: 1;
        /* Keep the info on top */
    }

    .contact-form-container {
        order: 2;
        width: 100%;
        max-width: 100%;
        /* Ensure it doesn't overflow */
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }

    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(252, 251, 249, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--color-glass-border);
        box-shadow: var(--shadow-soft);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 2rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
}