/* Greenfield Family Constitution - Styles */

:root {
    --forest-green: #0B6623;
    --hunter-green: #659267;
    --azure: #F0FFFF;
    --winter-green: #4F9E81;
    --cream: #FDF8F3;
    --dark: #1a1a1a;
    --text: #333;
    --text-light: #666;
    --border: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.7;
}

/* Password Protection Overlay */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--hunter-green) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.password-overlay.hidden {
    display: none;
}

.password-box {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.password-logo {
    width: 100px;
    height: auto;
    margin-bottom: 1.5rem;
}

.password-box h2 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 0.5rem;
}

.password-box p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.password-box input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s;
}

.password-box input:focus {
    outline: none;
    border-color: var(--forest-green);
}

.password-box button {
    width: 100%;
    padding: 1rem;
    background: var(--forest-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.password-box button:hover {
    background: var(--hunter-green);
}

.password-error {
    color: #d32f2f;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--forest-green);
    color: white;
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    border-radius: 50%;
}

.nav-search {
    flex: 1;
    max-width: 400px;
}

.nav-search input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    color: white;
}

.nav-search input::placeholder {
    color: rgba(255,255,255,0.7);
}

.nav-search input:focus {
    outline: none;
    background: rgba(255,255,255,0.3);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 260px;
    height: calc(100vh - 60px);
    background: white;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 900;
}

.sidebar-content {
    padding: 2rem 1.5rem;
}

.sidebar h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--forest-green);
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: var(--forest-green);
    color: white;
}

/* Main Content */
.main {
    margin-left: 260px;
    padding-top: 60px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--forest-green), var(--hunter-green));
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.hero .year {
    font-size: 1rem;
    opacity: 0.7;
}

.hero-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background: white;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    opacity: 0.9;
}

/* Sections */
.section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    border-bottom: 1px solid var(--border);
}

.section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--forest-green);
    margin-bottom: 1.5rem;
}

.section-intro {
    color: var(--text-light);
    margin-bottom: 2rem;
}

blockquote {
    font-style: italic;
    color: var(--text-light);
    border-left: 3px solid var(--hunter-green);
    padding-left: 1.5rem;
    margin: 1.5rem 0 2rem;
}

/* Family Grid */
.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.family-member {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--forest-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.family-member h3 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 1rem;
}

.family-member p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.family-portrait {
    width: 180px;
    height: 180px;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem auto;
}

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

.value-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.value-number {
    display: inline-block;
    background: var(--forest-green);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.value-card h3 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 0.5rem;
}

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

/* Crest Images */
.crest-images {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.crest-img {
    max-width: 300px;
    height: auto;
    border-radius: 12px;
}

.crest-img-3d {
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Crest Description */
.crest-description {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.crest-description h3, .crest-description h4 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin: 1.5rem 0 1rem;
}

.crest-description h3:first-child {
    margin-top: 0;
}

.crest-description ul {
    padding-left: 1.5rem;
}

.crest-description li {
    margin-bottom: 0.5rem;
}

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

.tradition-block {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
}

.tradition-block h3 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 1rem;
}

.tradition-block h4 {
    color: var(--hunter-green);
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
}

.tradition-block ul {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.tradition-block li {
    margin-bottom: 0.3rem;
}

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

.holiday-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
}

.holiday-card h3 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 1rem;
}

.holiday-card ul {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.holiday-card li {
    margin-bottom: 0.4rem;
}

/* Mission Statement */
.mission-statement {
    background: linear-gradient(135deg, var(--forest-green), var(--hunter-green));
    color: white;
    padding: 3rem;
    border-radius: 16px;
}

.mission-lead {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.mission-statement p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--hunter-green);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -50px;
    width: 40px;
    height: 40px;
    background: var(--forest-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
}

.timeline-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 0.5rem;
}

/* Office Grid */
.office-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.office-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border-top: 3px solid var(--forest-green);
}

.office-card h4 {
    color: var(--forest-green);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.office-card p {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

/* Trust Section */
.trust-purpose {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.trust-purpose h3 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 1rem;
}

.funds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.fund-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
}

.fund-card h4 {
    color: var(--forest-green);
    margin-bottom: 0.75rem;
}

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

/* Accordion */
.memento-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--forest-green);
    text-align: left;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s;
}

.accordion-content {
    display: none;
    padding: 0 1.5rem 1.5rem;
}

.accordion-content.active {
    display: block;
}

.accordion-content h4 {
    color: var(--forest-green);
    margin: 1rem 0 0.5rem;
}

.accordion-content ul {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.accordion-content li {
    margin-bottom: 0.3rem;
}

/* Lifebook Links */
.lifebook-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.lifebook-link {
    display: block;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lifebook-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lifebook-link h4 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 0.5rem;
}

.lifebook-link p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Search Results */
.search-results {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.search-results.hidden {
    display: none;
}

.search-results h3 {
    font-family: 'Playfair Display', serif;
    color: var(--forest-green);
    margin-bottom: 1rem;
}

.search-result-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.search-result-item:hover {
    background: var(--forest-green);
    color: white;
}

.search-result-item mark {
    background: yellow;
    padding: 0 2px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-mission {
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer a {
    color: var(--winter-green);
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-search {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 3rem 1.5rem;
    }
    
    .timeline {
        padding-left: 40px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-marker {
        left: -40px;
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 4rem 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .mission-statement {
        padding: 2rem 1.5rem;
    }
    
    .mission-lead {
        font-size: 1.4rem;
    }
}
