/*!
Theme Name: Kadence Child - Classic Sophisticated Botanical
Template: kadence
*/

/* ==========================================================================
   THEME PALETTE & TYPOGRAPHY VARIABLES
   ========================================================================== */
:root {
    /* --- Classic, Understated Fonts --- */
    --botanical-font-heading: Garamond, Baskerville, 'Baskerville Old Face', 'Hoefler Text', Times New Roman, serif;
    --botanical-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* --- Sophisticated & Classy Botanical Palette --- */
    --botanical-primary: #1f3a2c;    /* Deep Classic Pine */
    --botanical-secondary: #526e5d;  /* Muted Sage */
    --botanical-accent: #9c6644;     /* Warm Terracotta / Clay */
    --botanical-bg: #f7f6f2;         /* Soft Parchment Cream */
    --botanical-card-bg: #ffffff;    /* Clean White Component BG */
    --botanical-border: #dedbd2;     /* Subtle Muted Border */
    --botanical-text: #2c3531;       /* Deep Charcoal Text */
    --botanical-hover-text: #ffffff; /* Text color when hovering primary buttons */

    /* --- Flowering Calendar Bar (Vibrant Burnt Orange) --- */
    --main-bar-color: #d06733;       /* Classy Burnt Orange */
    --main-bar-rgb: 208, 103, 51;
}

/* --- Global Font Application (Cards, Posts, and Pages) --- */
body,
p,
li,
.entry-content,
.entry-content p {
    font-family: var(--botanical-font-body);
    color: var(--botanical-text);
    font-size: 1.05rem;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.ftg-main-title,
.ftg-title-area h2,
.vpt-header,
.vpt-title-area h2,
.planda-hierarchy-line .h-label,
.potd-widget-header {
    font-family: var(--botanical-font-heading);
    letter-spacing: 0.015em;
}

/* ==========================================================================
   GLOBAL COMPONENT STYLING
   ========================================================================== */

/* --- Featured Genus & Type Grids --- */
.ftg-type-wrap { width: 100%; box-sizing: border-box; }
.ftg-type-inner {
    box-sizing: border-box; width: 100%; padding: 24px 20px;
    background-color: var(--botanical-bg);
    border: 1px solid var(--botanical-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(31, 58, 44, 0.03);
    display: flex; flex-direction: column; gap: 14px;
}
.ftg-main-title { font-size: 20px; font-weight: 600; text-align: center; margin: 0 0 10px 0; color: var(--botanical-primary); }
.ftg-title-area { text-align: center; }
.ftg-title-area h2 { margin: 0 0 4px 0; font-size: 24px; }
.ftg-title-area h2 a { text-decoration: none; color: var(--botanical-primary); transition: color 0.2s ease; }
.ftg-title-area h2 a:hover { color: var(--botanical-secondary); text-decoration: underline; }
.ftg-type-desc {
    font-size: 14px;
    color: var(--botanical-text);
    opacity: 0.85;
    text-align: left;
    margin: 0 0 5px 0;
    line-height: 1.6;
}
.ftg-read-more {
    color: var(--botanical-accent);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.ftg-read-more:hover {
    text-decoration: underline;
}
.ftg-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.ftg-type-grid > .ftg-type-card:nth-child(3):last-child {
    grid-column: span 2;
    width: 100%;
}
.ftg-type-card {
    background: var(--botanical-card-bg);
    border: 1px solid var(--botanical-border);
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ftg-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 58, 44, 0.05);
    border-color: var(--botanical-secondary);
}
.ftg-type-img img { width: 100%; height: 160px; object-fit: cover; display: block; }
.ftg-type-img[style*="background"] { background-color: var(--botanical-border) !important; }
.ftg-type-content { padding: 14px; text-align: center; }
.ftg-type-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--botanical-text);
    margin: 0 0 3px 0;
}
.ftg-type-latin {
    font-size: 13px;
    font-style: italic;
    font-weight: normal;
    color: #ffffff;
    opacity: 0.9;
    margin: 0;
}

/* --- "An raibh fhios agat" Fact Box Style --- */
.dyk-fact-box {
    font-size: 14px;
    line-height: 1.6;
    color: var(--botanical-text);
    background: var(--botanical-card-bg);
    border-left: 4px solid var(--botanical-accent);
    padding: 16px 18px;
    margin: 14px;
    border-radius: 0 4px 4px 0;
    border-top: 1px solid var(--botanical-border);
    border-right: 1px solid var(--botanical-border);
    border-bottom: 1px solid var(--botanical-border);
}
.dyk-overlay-latin {
    color: #ffffff !important;
}

/* --- "Gnáthóg na Míosa" Styles --- */
.potd-widget-header {
    font-size: 20px !important;
    font-weight: 600 !important;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: var(--botanical-primary);
}
.gotm-excerpt p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 1em 0;
}
.gotm-plants-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}
@media (min-width: 600px) {
    .gotm-plants-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

/* --- Planda Info Tabbed Interface & Infobox Styling --- */
.plandai-names-container {
    background: var(--botanical-bg);
    border-left: 4px solid var(--botanical-primary);
    padding: 10px 14px;
    margin: 0 0 12px 0;
    border-radius: 6px;
    border-top: 1px solid var(--botanical-border);
    border-right: 1px solid var(--botanical-border);
    border-bottom: 1px solid var(--botanical-border);
}
.plandai-name-group {
    margin-bottom: 6px;
}
.plandai-name-group:last-child {
    margin-bottom: 0;
}
.plandai-name-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--botanical-primary);
    margin-bottom: 1px;
}
.english-name-group .plandai-name-label {
    color: var(--botanical-secondary);
}
.plandai-name-value {
    color: var(--botanical-text);
}
.irish-value {
    font-size: 1rem;
}
.english-value {
    font-size: 0.95rem;
}
.planda-hierarchy-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    margin-bottom: 10px;
    background: var(--botanical-card-bg);
    border: 1px solid var(--botanical-border);
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--botanical-text);
}
.planda-hierarchy-line .h-label {
    font-weight: bold;
    color: var(--botanical-primary);
}
.planda-hierarchy-line .h-separator {
    color: var(--botanical-border);
}
.planda-taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.planda-taxonomy-box {
    background: var(--botanical-card-bg);
    border: 1px solid var(--botanical-border);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--botanical-text);
}
.planda-taxonomy-box .taxonomy-label-icon {
    color: var(--botanical-primary);
    margin-right: 4px;
}

/* --- Vertical Plant / Fern / Seaweed Tiles --- */
.vertical-plant-tile { width: 100%; box-sizing: border-box; display: flex; }
.vpt-inner {
    box-sizing: border-box; width: 100%; padding: 24px 20px;
    background-color: var(--botanical-bg);
    border: 1px solid var(--botanical-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(31, 58, 44, 0.03);
    display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.vpt-header { font-size: 20px; font-weight: 600; text-align: center; margin: 0 0 10px 0; color: var(--botanical-primary); }
.vpt-image img { width: 100%; height: 200px; object-fit: cover; border-radius: 6px; display: block; }
.vpt-title-area { text-align: center; }
.vpt-title-area h2 { margin: 0 0 4px 0; font-size: 22px; }
.vpt-title-area h2 a { text-decoration: none; color: var(--botanical-primary); }
.vpt-title-area h2 a:hover { color: var(--botanical-secondary); text-decoration: underline; }
.vpt-secondary { font-size: 14px; font-style: italic; color: var(--botanical-text); opacity: 0.7; margin-bottom: 6px; }
.vpt-stadas-line, .vpt-hierarchy-line { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 13px; margin-bottom: 6px; align-items: center; }

/* Unified Pill Elements */
.vpt-term-pill, .stadapill {
    background-color: var(--botanical-card-bg);
    border: 1px solid var(--botanical-border);
    color: var(--botanical-text);
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.vpt-term-pill:hover, .stadapill:hover, .stadas-pill:hover {
    background-color: var(--botanical-primary);
    color: var(--botanical-hover-text);
    border-color: var(--botanical-primary);
}

.vpt-related-section { margin-top: auto; border-top: 1px solid var(--botanical-border); padding-top: 12px; }
.vpt-related-section h4 { margin: 0 0 8px 0; font-size: 14px; color: var(--botanical-primary); font-weight: 600; }
.vpt-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vpt-related-item img { width: 100%; height: 65px; object-fit: cover; border-radius: 4px; display: block; transition: opacity 0.2s; }
.vpt-related-item img:hover { opacity: 0.85; }
.vpt-rel-title { font-size: 11px; text-decoration: none; display: block; font-weight: 600; color: var(--botanical-text); margin-top: 3px; line-height: 1.2; }
.vpt-read-more { font-size: 13px; text-align: center; margin-top: 6px; }
.vpt-read-more a { color: var(--botanical-accent); font-weight: 600; text-decoration: none; }
.vpt-read-more a:hover { text-decoration: underline; }

.vertical-plant-tile .flowering-bar-wrapper .bar-title {
    font-size: 13px !important;
    font-weight: normal !important;
}

/* --- Badges & Pills --- */
.category-style-pill a {
    background-color: var(--botanical-primary) !important;
    color: var(--botanical-hover-text) !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    font-size: 0.85em !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block !important;
}
.stadas-pill {
    background-color: var(--botanical-card-bg) !important;
    color: var(--botanical-primary);
    border: 1px solid var(--botanical-border);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}
.stadas-pill:hover {
    background-color: var(--botanical-secondary) !important;
    color: var(--botanical-hover-text);
    border-color: var(--botanical-secondary);
}

/* --- Interactive Month Calendar Bar --- */
.cpt-month-bar-wrapper {
    max-width: 700px;
    margin: 10px auto 25px auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: visible;
    background-color: transparent;
}
.bar-container {
    position: relative;
    width: 100%;
    height: 32px;
    border: 1px solid var(--botanical-border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(31, 58, 44, 0.03);
    background-color: var(--botanical-card-bg);
}
.bar-gradient-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.month-overlay-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    z-index: 2;
}
.month-overlay-grid .month-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    background-color: transparent;
    border-right: 1px solid var(--botanical-border);
    color: var(--botanical-text);
    font-size: 0.8em;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.month-overlay-grid .month-cell:last-child {
    border-right: none;
}
.month-overlay-grid .month-cell:hover {
    background-color: rgba(31, 58, 44, 0.05);
    color: var(--botanical-primary);
}
.bar-title {
    display: block !important;
    font-size: 1.1em !important;
    color: var(--botanical-text) !important;
    font-weight: 600;
    text-align: center;
    margin: 0 0 8px 0;
    padding-left: 0;
}

/* Text Contrast Logic for Calendar */
.light-text .active-month-text {
    color: #fff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}
.dark-text .active-month-text {
    color: var(--botanical-text) !important;
}

.flowering-bar-wrapper .bar-gradient-background {
    background: linear-gradient(
        to right,
        rgba(var(--main-bar-rgb), 0) var(--bar-start),
        var(--main-bar-color) var(--bar-peak-start),
        var(--main-bar-color) var(--bar-peak-end),
        rgba(var(--main-bar-rgb), 0) var(--bar-end)
    );
}

/* --- Taxonomy Emoji Spacing --- */
.planda-emoji {
    margin-right: 6px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .planda-hierarchy-line {
        max-width: 100%;
        margin: 0 auto 10px auto;
        padding: 8px 14px;
        font-size: 0.85em;
        text-align: left;
    }
    .planda-hierarchy-line .h-separator {
        color: var(--botanical-border);
        font-weight: 300;
        margin: 0 4px;
        display: inline;
    }
    .planda-hierarchy-line .h-label {
        display: inline;
        text-align: initial;
    }
    .planda-hierarchy-line .planda-term-pill {
        font-size: 1em;
        padding: 0 4px;
    }

    .planda-taxonomy-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 14px;
        margin-top: 15px;
        max-width: 100%;
        font-size: 1em;
    }

    .planda-taxonomy-grid .planda-taxonomy-box:nth-child(odd) {
        border-right: none;
        padding-right: 0;
    }

    .planda-taxonomy-box {
        margin-bottom: 5px;
        padding-bottom: 4px;
        padding-top: 4px;
    }

    .cpt-month-bar-wrapper {
        margin: 10px 0 25px 0;
        max-width: 100%;
    }

    .bar-title {
        font-size: 0.95em !important;
        margin: 0 0 6px 0;
        text-align: left;
        padding-left: 6px;
    }

    .month-overlay-grid .month-cell {
        font-size: 0.65em;
    }
}
