/* ============================================
   UNA ARBOR STYLESHEET
   "Field Guide" Theme for Tree Encyclopedia
   ============================================ */

/* --- COLOR PALETTE --- */
:root {
    --bg-cream: #f4f1e8;       /* The "Paper" Background */
    --primary-green: #3a4d31;  /* Deep Forest Green - Main Headers */
    --accent-orange: #c25b32;  /* Burnt Orange - Buttons/Highlights */
    --danger-red: #8b2e2e;     /* Rustic Red - Fungi Warnings */
    --text-dark: #2c3e50;      /* Dark Grey - Main Text */
    --text-light: #5f6a6a;     /* Lighter Grey - Meta Data */
    --border-color: #dcd6cc;   /* Subtle borders */
}

/* --- BASE STYLES --- */
body {
    background-color: var(--bg-cream);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- HEADER NAVIGATION --- */
.header-nav {
    background-color: var(--primary-green);
    color: var(--bg-cream);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 40px;
    overflow: hidden;
}

.logo img {
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    max-width: 150px !important;
    object-fit: contain;
    display: block;
}

.tagline {
    font-size: 0.9rem;
    color: var(--bg-cream);
    opacity: 0.9;
}

/* --- MAIN CONTAINER --- */
.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 4px; /* Slight rounding like a book page */
    overflow: hidden;
}

/* --- HERO SECTION (Tree Identity) --- */
.tree-header {
    display: flex;
    border-bottom: 2px solid var(--primary-green);
    flex-wrap: wrap;
}

.tree-image-box {
    flex: 1;
    min-width: 300px;
    background-color: #e0e0e0;
    min-height: 400px;
    background-size: cover;
    background-position: center;
}

.tree-info-box {
    flex: 1;
    padding: 3rem;
    min-width: 300px;
}

h1 {
    font-family: 'Georgia', serif;
    color: var(--primary-green);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.latin-name {
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    display: inline-block;
    border-bottom: 1px solid var(--accent-orange);
    padding-bottom: 5px;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.data-point strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-orange);
    letter-spacing: 1px;
}

/* --- IDENTIFICATION SECTION --- */
.section-title {
    background-color: var(--bg-cream);
    color: var(--primary-green);
    padding: 10px 20px;
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
}

.id-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 2rem;
}

.id-card {
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: center;
    border-radius: 4px;
}

.id-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 10px;
    background-color: #eee;
}

/* --- DANGER ZONE (Fungi Section) --- */
.danger-section {
    padding: 2rem;
    background-color: #fff5f5;
    border-top: 4px solid var(--danger-red);
}

.danger-title {
    color: var(--danger-red);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.fungi-grid {
    display: grid;
    gap: 20px;
}

.fungi-card {
    display: flex;
    background: white;
    border: 1px solid #eecaca;
    border-radius: 8px;
    overflow: hidden;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.fungi-card.high-risk {
    border-left: 4px solid #c0392b;
}

.fungi-card.moderate-risk {
    border-left: 4px solid #d35400;
}

.fungi-image {
    width: 180px;
    min-height: 150px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

.fungi-info {
    padding: 20px;
    flex: 1;
    min-width: 250px;
}

.fungi-info h3 {
    color: var(--danger-red);
    font-size: 1.3rem;
    margin: 0 0 5px 0;
    font-family: 'Georgia', serif;
}

.fungi-scientific {
    color: var(--text-light);
    margin: 0 0 10px 0;
}

.fungi-risk {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    margin-bottom: 10px;
    background-color: #c0392b;
}

.moderate-risk .fungi-risk {
    background-color: #d35400;
}

.fungi-rot {
    font-size: 0.9rem;
    color: var(--primary-green);
    font-weight: 600;
    margin: 8px 0;
}

.fungi-danger {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.5;
}

/* --- FOOTER --- */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    background-color: var(--bg-cream);
    border-top: 1px solid var(--border-color);
}

.footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
}

/* --- RESPONSIVE DESIGN --- */

/* Tablet screens */
@media (max-width: 768px) {
    .header-nav {
        padding: 0.5rem 1rem;
        height: auto;
        min-height: 50px;
    }

    .logo img {
        height: 60px !important;
        max-height: 60px !important;
    }

    .tagline {
        font-size: 0.8rem;
    }

    .container {
        margin: 20px auto;
        padding: 0 10px;
    }

    h1 {
        font-size: 2rem;
    }

    .tree-info-box {
        padding: 2rem;
    }

    .data-grid {
        gap: 1rem;
    }

    .id-grid {
        padding: 1.5rem;
        gap: 15px;
    }

    .danger-section {
        padding: 1.5rem;
    }

    .fungi-image {
        width: 150px;
        min-height: 120px;
    }
}

/* Mobile phones */
@media (max-width: 600px) {
    .header-nav {
        flex-direction: column;
        padding: 0.75rem 1rem;
        height: auto;
        text-align: center;
        gap: 0.5rem;
    }

    .logo {
        justify-content: center;
        height: auto;
    }

    .logo img {
        height: 70px !important;
        max-height: 70px !important;
    }

    .tagline {
        font-size: 0.75rem;
        text-align: center;
    }

    .container {
        margin: 10px;
        padding: 0;
        border-radius: 0;
    }

    .tree-header {
        flex-direction: column;
    }

    .tree-image-box {
        min-width: 100%;
        height: 250px;
        min-height: 250px;
    }

    .tree-info-box {
        padding: 1.5rem;
        min-width: 100%;
    }

    h1 {
        font-size: 1.75rem;
    }

    .latin-name {
        font-size: 1rem;
    }

    .data-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .section-title {
        font-size: 1.25rem;
        padding: 10px 15px;
    }

    .id-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 15px;
    }

    .id-card {
        padding: 12px;
    }

    .id-card img {
        height: 180px;
    }

    .danger-section {
        padding: 1rem;
    }

    .danger-title {
        font-size: 1.25rem;
    }

    .fungi-card {
        flex-direction: column;
    }

    .fungi-image {
        width: 100%;
        min-height: 180px;
    }

    .fungi-info {
        min-width: 100%;
        padding: 15px;
    }

    .fungi-info h3 {
        font-size: 1.1rem;
    }

    .footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .header-nav {
        padding: 0.5rem;
    }

    .logo img {
        height: 60px !important;
        max-height: 60px !important;
    }

    .tagline {
        font-size: 0.7rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .tree-info-box {
        padding: 1rem;
    }

    .id-grid {
        padding: 0.75rem;
    }

    .danger-section {
        padding: 0.75rem;
    }
}

