/* --- Global Styles & Variables --- */
:root {
    --bg-color: #EFEBE0;
    --text-color: #4d463d;
    --accent-color: #556B2F;
    --secondary-color: #D2B48C;
    --paper-texture: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="n" x="0" y="0"><feTurbulence type="fractalNoise" baseFrequency=".7" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23n)" opacity="0.1"/></svg>');
    
    --font-serif: 'Lora', serif;
    --font-sans: 'Open Sans', sans-serif;
    --font-handwriting: 'Caveat', cursive;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.7;
    margin: 0;
    padding: 2rem;
    background-image: var(--paper-texture);
}

.grow-journal-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 3rem 4rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
}

/* --- Header --- */
.journal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.site-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 400;
    margin: 0;
    color: var(--accent-color);
}

.leaf-divider {
    position: relative;
    height: 1px;
    background-color: var(--text-color);
    margin-top: 1rem;
}

.leaf-divider::after {
    content: ' ';
    display: block;
    width: 30px;
    height: 30px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-color);
    padding: 0 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%23556B2F"><path d="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6-3.2 8.7-11.4 14.6-20.8 14.6h-54.3c-3.1 8.9-7.1 17.4-11.9 25.4l32.5 44.7c5.9 8.1 5.1 19.3-1.8 26.2-7 6.9-18.2 7.7-26.2 1.8l-44.7-32.5c-8 4.8-16.5 8.8-25.4 11.9v54.3c0 9.4-5.9 17.6-14.6 20.8-8.7 3.2-18.4 .5-24.6-6.4l-39.4-43.3c-8.3-1.1-16.8-1.7-25.4-1.7s-17.1 .6-25.4 1.7l-39.4 43.3c-6.2 6.9-15.9 9.6-24.6 6.4-8.7-3.2-14.6-11.4-14.6-20.8v-54.3c-8.9-3.1-17.4-7.1-25.4-11.9l-44.7 32.5c-8.1 5.9-19.3 5.1-26.2-1.8-6.9-7-7.7-18.2-1.8-26.2l32.5-44.7c-4.8-8-8.8-16.5-11.9-25.4H20.8c-9.4 0-17.6-5.9-20.8-14.6-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4c-1.1-8.3-1.7-16.8-1.7-25.4s.6-17.1 1.7-25.4L16.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6 3.2-8.7 11.4-14.6 20.8-14.6h54.3c3.1-8.9 7.1-17.4 11.9-25.4L64.5 81.9c-5.9-8.1-5.1-19.3 1.8-26.2 7-6.9 18.2-7.7 26.2-1.8l44.7 32.5c8-4.8 16.5-8.8 25.4-11.9V20.8c0-9.4 5.9-17.6 14.6-20.8 8.7-3.2 18.4-.5 24.6 6.4l39.4 43.3c8.3 1.1 16.8 1.7 25.4 1.7s17.1-.6 25.4-1.7l39.4-43.3c6.2-6.9 15.9-9.6 24.6-6.4 8.7 3.2 14.6 11.4 14.6 20.8v54.3c8.9 3.1 17.4 7.1 25.4 11.9l44.7-32.5c8.1-5.9 19.3-5.1 26.2 1.8 6.9 7 7.7 18.2 1.8 26.2l-32.5 44.7c4.8 8 8.8 16.5 11.9 25.4h54.3c9.4 0 17.6 5.9 20.8 14.6z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


/* --- Growth Cycle Timeline --- */
.growth-cycle-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
    padding: 1rem 0;
}

.timeline-stage {
    text-align: center;
    width: 80px;
}

.stage-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    margin: 0 auto;
    background-color: white;
    position: relative;
}

/* Icons can be replaced with SVGs or images */
.stage-icon.seed::after { content: '🌱'; font-size: 24px; position:absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.stage-icon.seedling::after { content: '🌿'; font-size: 24px; position:absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.stage-icon.vegetative::after { content: '🌳'; font-size: 24px; position:absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.stage-icon.flowering::after { content: '🌸'; font-size: 24px; position:absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }


.stage-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-family: var(--font-serif);
}

.timeline-connector {
    flex-grow: 1;
    height: 2px;
    background-color: var(--secondary-color);
    margin-top: 30px;
}

/* --- Main Content & Gallery --- */
.field-notes-section {
    overflow: hidden; /* Clearfix for floated gallery */
}

.specimen-photos-gallery {
    float: right;
    width: 35%;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.specimen-photo {
    background: white;
    border: 10px solid white;
    border-bottom-width: 25px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    margin-bottom: 2.5rem;
    position: relative;
}

.specimen-photo::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 25px;
    background: rgba(210, 180, 140, 0.4);
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    box-shadow: 0 0 3px rgba(0,0,0,0.1);
    border-left: 1px solid rgba(0,0,0,0.1);
    border-right: 1px solid rgba(0,0,0,0.1);
}

.specimen-photo img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.photo-one { transform: rotate(-3deg); }
.photo-two { transform: rotate(4deg); margin-left: 10%; }
.photo-three { transform: rotate(2deg); }
.photo-four { transform: rotate(-5deg); margin-left: -5%; }
.photo-five { transform: rotate(3deg); margin-left: 5%; }

.main-content {
    width: 60%;
}

.journal-menu {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--secondary-color);
}

.journal-menu summary {
    list-style: none; /* Hide default marker for Firefox */
    cursor: pointer;
    font-family: var(--font-handwriting);
    font-size: 2.2rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    outline: none; /* remove focus ring */
}

.journal-menu summary::-webkit-details-marker {
    display: none; /* Hide default marker for Chrome/Safari */
}

.journal-menu summary:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 4px;
}

.journal-menu summary::before {
    content: '→';
    font-family: var(--font-serif);
    margin-right: 0.75rem;
    transition: transform 0.25s ease-in-out;
    display: inline-block;
}

details[open] > summary::before {
    transform: rotate(90deg);
}

.journal-menu ul {
    list-style-type: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    border-left: 2px solid var(--accent-color);
    margin-left: 0.5rem; 
}

/* Styling for future menu items */
.journal-menu ul li {
    padding: 0.3rem 0;
}

.journal-menu ul a {
    text-decoration: none;
    font-family: var(--font-serif);
    color: var(--text-color);
    transition: color 0.2s ease;
}

.journal-menu ul a:hover {
    color: var(--accent-color);
}

.journal-body {
    min-height: 400px;
}

/* --- Footer --- */
.journal-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--secondary-color);
    font-size: 0.9rem;
}

.journal-footer a {
    color: var(--accent-color);
    text-decoration: none;
}

.journal-footer a:hover {
    text-decoration: underline;
}

/* --- Responsive Styles --- */
@media (max-width: 992px) {
    .grow-journal-container {
        padding: 2rem;
    }

    .specimen-photos-gallery {
        width: 40%;
    }
    .main-content {
        width: 55%;
    }
}


@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .grow-journal-container {
        padding: 1.5rem 1rem;
    }

    .site-title {
        font-size: 2.5rem;
    }

    /* --- Timeline vertical stack --- */
    .growth-cycle-timeline {
        flex-direction: column;
        align-items: center;
    }
    .timeline-connector {
        width: 2px;
        height: 30px;
        margin: 0.5rem 0;
        flex-grow: 0;
    }

    /* --- Gallery and content stack --- */
    .specimen-photos-gallery {
        float: none;
        width: 90%;
        margin: 0 auto 2rem auto;
    }

    .main-content {
        width: 100%;
    }

    .specimen-photo {
        margin-bottom: 2rem;
    }
    
    .photo-one, .photo-two, .photo-three, .photo-four, .photo-five {
        transform: rotate(0);
        margin-left: 0;
    }
}
