/* THE FLOCKING REED'S FARM - HOMESTEAD THEME */

/* 1. Base Settings */
body {
    -webkit-text-size-adjust: 100%; 
}

/* 2. Custom Fonts */
.font-handwritten {
    font-family: 'Kalam', cursive;
}

.font-body {
    font-family: 'Inter', sans-serif;
}

/* 4. Utilities */
.cute-frame {
    border: 12px solid #FFF8E1; /* Cream border */
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(62, 39, 35, 0.2); 
    display: block;
    margin: 0 auto;
}

.farm-goals-border {
    border-top-width: 4px;
    border-style: solid;
    border-image-source: linear-gradient(to right, #6abf4b, #e94b3c, #4b89da);
    border-image-slice: 1;
    position: relative;
}

.farm-goals-border::after {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: radial-gradient(rgba(0,0,0,0.15) 0.5px, transparent 0.5px);
    background-size: 3px 3px;
    pointer-events: none;
}

/* 5. Image Styling */
.navbar-logo {
    height: 3.5rem;
    width: auto;
    margin-right: 10px;
}

.hero-banner {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    max-height: 40vh;
}

/* 6. DYSLEXIA MODE */
body.dyslexia-mode {
    font-family: 'Comic Sans MS', 'Comic Sans', sans-serif !important;
    line-height: 1.8 !important; 
}


/* 7. Dark Mode Overrides (Deep Farm Night) */
.dark .cute-frame {
    border-color: #374151;
}

    /* 8. Ko-fi Mobile Resizer */
@media (max-width: 640px) {
    /* Target the Ko-fi Iframe Button */
    iframe[id*="kofi-widget-overlay"] {
        transform: scale(0.75) !important; /* Shrink to 75% size */
        transform-origin: bottom right !important; /* Anchor it to the corner */
        right: 12px !important; /* Adjust spacing from edge */
        bottom: 12px !important;
    }
}

.footer {
    background-color: #D1C4E9;
}

.dark .footer {
    background-color: #1a120b;
}

.footer-button {
    background-color: #8D6E63;
    color: #FEF9E7;
    padding: 8px 16px;
    border-radius: 8px;
    border: 2px solid #5D4037;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.footer-button:hover {
    background-color: #A1887F;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dark .footer-button { /* Dark mode styles for footer-button */
    background-color: #3E2723; /* Darker background */
    color: #FACC15; /* Accent color text */
    border-color: #5D4037; /* Darker border */
}

.dark .footer-button:hover {
    background-color: #5D4037; /* Darker hover background */
    color: #FFFFFF; /* White hover text */
}

/* Custom Button Styles */
.btn-green {
    background-color: #2E4A35; /* farm-green */
    color: #ffffff;
    border-bottom: 4px solid #1B2E21; /* Darker green */
}
.btn-green:hover {
    background-color: #3a5c44; /* farm-green-dark */
}
.dark .btn-green {
    background-color: #3a5c44;
    color: #ffffff;
    border-bottom-color: #2E4A35;
}
.dark .btn-green:hover {
    background-color: #2E4A35;
}

.btn-brown {
    background-color: #5D4037; /* farm-brown */
    color: #ffffff;
    border-bottom: 4px solid #3E2723; /* Darker brown */
}
.btn-brown:hover {
    background-color: #795548; /* Lighter brown */
}
.dark .btn-brown {
    background-color: #795548;
    color: #ffffff;
    border-bottom-color: #5D4037;
}
.dark .btn-brown:hover {
    background-color: #5D4037;
}

.z-navbar {
    z-index: 1000;
}

/* === Navbar Styles === */
.nav-link {
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
    padding: 0.5rem 1rem; /* 8px 16px */
    border-radius: 9999px; /* rounded-full */
    font-weight: 700; /* font-bold */
    letter-spacing: 0.025em; /* tracking-wide */
    text-decoration: none;
}

/* Base hover state */
.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.dark .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Home Link --- */
.nav-link--home:hover,
.nav-link--home.is-active {
    color: #2E4A35; /* farm-green */
}
.dark .nav-link--home:hover,
.dark .nav-link--home.is-active {
    color: #A5D6A7; /* light green */
}

/* --- About Link --- */
.nav-link--about:hover,
.nav-link--about.is-active {
    color: #5D4037; /* farm-brown */
}
.dark .nav-link--about:hover,
.dark .nav-link--about.is-active {
    color: #A1887F; /* light brown */
}

/* --- News Link --- */
.nav-link--news:hover,
.nav-link--news.is-active {
    color: #4285F4; /* google-blue */
}
.dark .nav-link--news:hover,
.dark .nav-link--news.is-active {
    color: #67a0fd; /* google-blue-dark */
}

/* --- Shop Link --- */
.nav-link--shop:hover,
.nav-link--shop.is-active {
    color: #D97706; /* farm-orange */
}
.dark .nav-link--shop:hover,
.dark .nav-link--shop.is-active {
    color: #e68a00; /* farm-orange-dark */
}

/* Active state also gets the background */
.nav-link.is-active {
    background-color: rgba(0, 0, 0, 0.05);
}
.dark .nav-link.is-active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Custom Granulated Navbar Background */
.granulated-nav-bg {
    /* Light theme granulated background */
    background-color: #D0EAD6; /* farm-light-green from config */
    background-image: radial-gradient(rgba(46, 74, 53, 0.08) 0.5px, transparent 0.5px), radial-gradient(rgba(46, 74, 53, 0.05) 0.5px, transparent 0.5px);
    background-size: 20px 20px, 30px 30px;
    background-position: 0 0, 15px 15px;
}

.dark .granulated-nav-bg {
    /* Dark theme granulated background */
        background-color: #2E4A35;
        background-image: radial-gradient(#3E5C45 0.5px, transparent 0.5px), radial-gradient(#1B2E21 0.5px, transparent 0.5px);
        background-size: 20px 20px, 30px 30px;
        background-position: 0 0, 15px 15px;
    }
    
    /* === Blog Timeline Feature === */
    
    /* Sticky sidebar for timeline navigation */
    @media (min-width: 768px) { /* md breakpoint */
        #timeline-sidebar {
            position: -webkit-sticky; /* For Safari */
            position: sticky;
            top: 8rem; /* Adjust this value based on your navbar height */
            align-self: flex-start; /* Prevents stretching */
            max-height: calc(100vh - 9rem); /* Prevents it from overlapping the footer */
            overflow-y: auto;
        }
    }
    
    /* Styling for the timeline navigation container */
    #timeline-nav {
        padding-left: 0.5rem;
        border-left: 2px solid #D1C4E9; /* A soft border */
    }
    
    .dark #timeline-nav {
        border-left-color: #512DA8;
    }
    
    /* Individual timeline navigation links */
    #timeline-nav a {
        display: block;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
        text-decoration: none;
        font-weight: 500;
    }
    
    #timeline-nav a:hover {
        background-color: rgba(46, 74, 53, 0.1); /* farm-green with alpha */
        color: #2E4A35;
    }
    
    .dark #timeline-nav a:hover {
        background-color: rgba(104, 255, 169, 0.1);
        color: #A5D6A7;
    }
    
    /* Pinned post specific styles */
    #timeline-nav a[href="#pinned-posts"] {
        font-weight: 700;
        color: #795548; /* A brown color to match the theme */
    }
    
    .dark #timeline-nav a[href="#pinned-posts"] {
        color: #FFC107; /* Amber color for dark mode */
    }
    
    article.pinned-post {
        border-left: 4px solid #FFC107;
        background-color: #FFFDE7;
    }
    
    .dark article.pinned-post {
        border-left-color: #FFC107;
        background-color: #424242;
    }
    
    /* Heading for each month/year section */
    .timeline-section-header {
        scroll-margin-top: 8rem; /* Offset for sticky nav */
    }
    