/*
 Theme Name:   FINK Child
 Theme URI:    https://blog.fink.money
 Description:  GeneratePress child theme for the FINK blog — brand-consistent styling with Space Grotesk headings, DM Sans body, and FINK green accents.
 Author:       FINK
 Author URI:   https://fink.money
 Template:     generatepress
 Version:      1.1.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  fink-child
*/


/* ==========================================================================
   1. CSS VARIABLES
   ========================================================================== */

:root {
    /* Brand Colours */
    --fink-green: #00E676;
    --fink-green-dark: #00C853;
    --fink-green-glow: rgba(0, 230, 118, 0.3);
    --fink-green-bg: #F0FFF4;

    /* Neutrals */
    --fink-black: #0a0a0a;
    --fink-dark: #111111;
    --fink-gray: #1a1a1a;
    --fink-mid-gray: #2a2a2a;
    --fink-light-gray: #888888;
    --fink-white: #ffffff;
    --fink-off-white: #fafafa;

    /* Borders */
    --fink-border-light: rgba(0, 0, 0, 0.06);
    --fink-border-dark: rgba(255, 255, 255, 0.08);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-med: 0.25s ease;
    --transition-slow: 0.4s ease;
}


/* ==========================================================================
   2. GLOBAL / BASE STYLES
   ========================================================================== */

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--fink-white);
    color: var(--fink-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4,
.entry-title,
.page-title,
.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--fink-black);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    line-height: 1.08;
    letter-spacing: -1.5px;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.2;
}

h3 {
    font-size: 1.25rem;
    line-height: 1.3;
}

h4 {
    font-size: 1.1rem;
    line-height: 1.4;
}


/* ==========================================================================
   3. LINKS & ACCENT COLOUR
   ========================================================================== */

a {
    color: var(--fink-green-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--fink-green);
}

/* Entry content links get an underline for readability */
.entry-content a {
    text-decoration: underline;
    text-decoration-color: var(--fink-green-glow);
    text-underline-offset: 3px;
}

.entry-content a:hover {
    text-decoration-color: var(--fink-green);
}


/* ==========================================================================
   4. HEADER
   ========================================================================== */

/* GeneratePress site header */
.site-header {
    background: var(--fink-white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

/* GeneratePress header inner container */
.inside-header {
    padding: 0.875rem 2rem;
}

/* ---- Logo image (injected via generate_site_title_output) ---- */
.fink-header-logo {
    display: block;
    height: 32px;
    width: auto;
}

.main-title {
    line-height: 1;
    margin: 0;
}

.main-title a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.main-title a:hover {
    opacity: 0.85;
}

/* Navigation — right aligned */
.main-navigation {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}

.main-navigation a {
    color: #0a0a0a;
    text-decoration: none;
    padding: 0.25rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--fink-green);
    transition: width var(--transition-med);
}

.main-navigation a:hover {
    color: var(--fink-green-dark);
}

.main-navigation a:hover::after {
    width: 100%;
}

.main-navigation .current-menu-item > a {
    color: var(--fink-green-dark);
}

.main-navigation .current-menu-item > a::after {
    width: 100%;
}

/* Sticky header scroll effect (if using GP sticky header) */
.navigation-stick {
    box-shadow: var(--shadow-sm);
}


/* ==========================================================================
   5. MOBILE NAVIGATION / HAMBURGER
   ========================================================================== */

/* GeneratePress mobile menu toggle */
.menu-toggle,
.menu-toggle:hover,
.menu-toggle:focus {
    background: none;
    border: none;
    color: var(--fink-black);
    padding: 0.5rem;
    font-size: 0;
    line-height: 1;
}

.menu-toggle .mobile-menu {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile menu panel */
.main-navigation .menu-toggle:hover,
.main-navigation .menu-toggle:focus {
    background: transparent;
}

/* Mobile dropdown styling */
.main-navigation ul ul {
    background: var(--fink-white);
    border: 1px solid var(--fink-border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.main-navigation ul ul a {
    font-size: 0.85rem;
}


/* ==========================================================================
   6. CONTENT AREA — FULL WIDTH LAYOUT
   ========================================================================== */

/* Constrain content width for readability */
.site-content {
    max-width: 100%;
}

/* Blog archive: centred content container */
.site-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Remove sidebar space */
.no-sidebar .site-main {
    width: 100%;
    margin: 0 auto;
}

/* Page header / archive title */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--fink-border-light);
}

.page-header .page-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 0.5rem;
}

.page-header .archive-description {
    color: var(--fink-light-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}


/* ==========================================================================
   7. POST CARDS — BLOG INDEX / ARCHIVE
   ========================================================================== */

/* Grid layout for post listing (GP columns module) */
.generate-columns-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

/* Individual post card — consistent styling for every post */
article.post {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
    border: none;
    transition: all var(--transition-med);
}

article.post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Featured image */
article.post .post-image {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    aspect-ratio: 16 / 9;
}

article.post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

article.post:hover .post-image img {
    transform: scale(1.03);
}

/* Post content inside card */
article.post .inside-article {
    padding: 1.5rem;
}

/* ---- Category badge — solid green pill ---- */
article.post .cat-links,
.entry-meta .cat-links {
    display: inline-block;
    margin-bottom: 0.75rem;
}

article.post .cat-links a,
.cat-links a {
    display: inline-block;
    background: #00E676;
    color: #0a0a0a;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background var(--transition-fast);
}

article.post .cat-links a:hover,
.cat-links a:hover {
    background: var(--fink-green-dark);
    color: #0a0a0a;
    text-decoration: none;
}

/* Post title on card */
article.post .entry-title {
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

article.post .entry-title a {
    color: var(--fink-black);
    text-decoration: none;
}

article.post .entry-title a:hover {
    color: var(--fink-green-dark);
}

/* Post date & meta */
article.post .entry-meta {
    font-size: 0.8rem;
    color: var(--fink-light-gray);
    margin-bottom: 0.75rem;
}

article.post .entry-meta a {
    color: var(--fink-light-gray);
    text-decoration: none;
}

article.post .entry-meta a:hover {
    color: var(--fink-green-dark);
}

/* Hide author on cards (keep date + category) */
article.post .byline {
    display: none;
}

/* Excerpt */
article.post .entry-summary {
    font-size: 0.9rem;
    color: var(--fink-light-gray);
    line-height: 1.65;
    margin-bottom: 0;
}

/* Read more link */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fink-green-dark);
    text-decoration: none;
    margin-top: 1rem;
    transition: all var(--transition-fast);
}

.read-more:hover {
    color: var(--fink-green);
    gap: 0.5rem;
}


/* ==========================================================================
   8. SINGLE POST
   ========================================================================== */

.single .site-main {
    max-width: 740px;
    padding-top: 2rem;
}

.single .entry-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.single .entry-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.12;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.single .entry-meta {
    font-size: 0.85rem;
    color: var(--fink-light-gray);
}

.single .entry-meta a {
    color: var(--fink-light-gray);
    text-decoration: none;
}

.single .entry-meta a:hover {
    color: var(--fink-green-dark);
}

/* Featured image on single post */
.single .featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.single .featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

/* Post content typography */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--fink-gray);
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.entry-content blockquote {
    border-left: 3px solid var(--fink-green);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--fink-green-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--fink-dark);
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content img {
    border-radius: var(--radius-md);
    max-width: 100%;
    height: auto;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content code {
    background: var(--fink-off-white);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.entry-content pre {
    background: var(--fink-black);
    color: var(--fink-white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.85rem;
    line-height: 1.7;
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Post tags at bottom */
.post-tags,
.tags-links {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--fink-border-light);
}

.tags-links a {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--fink-light-gray);
    background: var(--fink-off-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-decoration: none;
    margin: 0.25rem 0.25rem 0.25rem 0;
    transition: all var(--transition-fast);
}

.tags-links a:hover {
    background: var(--fink-green-bg);
    color: var(--fink-green-dark);
}

/* Post navigation (prev/next) */
.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--fink-border-light);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.post-navigation a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fink-black);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-navigation a:hover {
    color: var(--fink-green-dark);
}

.post-navigation .meta-nav {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fink-light-gray);
    margin-bottom: 0.25rem;
}


/* ==========================================================================
   9. PAGE TEMPLATE
   ========================================================================== */

.page .site-main {
    max-width: 740px;
}

.page .entry-title {
    text-align: center;
    margin-bottom: 2rem;
}


/* ==========================================================================
   10. PAGINATION
   ========================================================================== */

.pagination,
.nav-links {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

.pagination .page-numbers,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    margin: 0 0.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fink-black);
    background: var(--fink-off-white);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination .page-numbers:hover {
    background: var(--fink-green-bg);
    color: var(--fink-green-dark);
}

.pagination .page-numbers.current {
    background: var(--fink-green);
    color: var(--fink-black);
    font-weight: 700;
}


/* ==========================================================================
   11. FOOTER
   ========================================================================== */

/* Hide GeneratePress default footer widgets if any */
.footer-widgets-container {
    display: none;
}

/* GeneratePress site footer area */
.site-footer {
    background: var(--fink-black) !important;
    color: var(--fink-white);
    padding: 0;
    margin-top: 0;
}

.site-info {
    background: var(--fink-black);
    padding: 0;
}

/* Custom footer injected via generate_footer hook */
.fink-footer {
    background: var(--fink-black);
    padding: 2.5rem 2rem 2rem;
    border-top: 1px solid var(--fink-border-dark);
}

.fink-footer-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.fink-footer-copy {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    margin: 0;
}

.fink-footer-links {
    display: flex;
    gap: 1.5rem;
}

.fink-footer-links a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.fink-footer-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.fink-footer-disclaimer {
    max-width: 860px;
    margin: 1.5rem auto 0;
    padding-top: 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.7rem;
    line-height: 1.7;
    border-top: 1px solid var(--fink-border-dark);
}


/* ==========================================================================
   12. WIDGETS / SEARCH
   ========================================================================== */

/* Search form */
.search-form .search-field {
    border: 1px solid var(--fink-border-light);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.search-form .search-field:focus {
    border-color: var(--fink-green);
    outline: none;
    box-shadow: 0 0 0 3px var(--fink-green-glow);
}

.search-form .search-submit {
    background: var(--fink-green);
    color: var(--fink-black);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-form .search-submit:hover {
    background: var(--fink-green-dark);
}


/* ==========================================================================
   13. BUTTONS (GLOBAL)
   ========================================================================== */

button,
input[type="submit"],
.wp-block-button__link {
    font-family: 'DM Sans', sans-serif;
}

.wp-block-button__link {
    background: var(--fink-green);
    color: var(--fink-black);
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-med);
}

.wp-block-button__link:hover {
    background: var(--fink-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px var(--fink-green-glow);
}


/* ==========================================================================
   14. SELECTION / HIGHLIGHT
   ========================================================================== */

::selection {
    background: var(--fink-green);
    color: var(--fink-black);
}

::-moz-selection {
    background: var(--fink-green);
    color: var(--fink-black);
}


/* ==========================================================================
   15. SCROLLBAR (WEBKIT)
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--fink-off-white);
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


/* ==========================================================================
   16. RESPONSIVE — TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .generate-columns-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .inside-header {
        padding: 0.875rem 1.5rem;
    }
}


/* ==========================================================================
   17. RESPONSIVE — MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    /* Stack post cards into single column */
    .generate-columns-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .site-main {
        padding: 2rem 1rem;
    }

    .inside-header {
        padding: 0.875rem 1rem;
    }

    /* Logo scales down on mobile */
    .fink-header-logo {
        height: 28px;
    }

    /* Single post */
    .single .site-main {
        padding: 1.5rem 1rem;
    }

    .single .entry-title {
        font-size: 1.75rem;
    }

    .entry-content {
        font-size: 1rem;
    }

    /* Footer */
    .fink-footer {
        padding: 2rem 1rem 1.5rem;
    }

    .fink-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .fink-footer-links {
        justify-content: center;
    }

    /* Post navigation */
    .post-navigation .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* Page header */
    .page-header .page-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .single .entry-title {
        font-size: 1.5rem;
    }

    article.post .entry-title {
        font-size: 1.05rem;
    }
}


/* ==========================================================================
   18. GENERATEPRESS OVERRIDES & CLEANUP
   ========================================================================== */

/* Remove any GP default bottom margin on featured images in archives */
.post-image {
    margin-bottom: 0;
}

/* Card inner — reset GP defaults, padding handled by .inside-article */
.inside-article {
    border: none;
    padding: 0;
}

/* Ensure .inside-article gets proper padding inside post cards */
article.post .inside-article {
    padding: 1.5rem;
}

/* Remove GP default post separator */
.generate-columns-container .post-image-aligned-center {
    margin-bottom: 0;
}

/* Hide comments section completely */
#comments,
.comments-area {
    display: none !important;
}

/* Hide sidebar if it somehow renders */
#right-sidebar,
#left-sidebar,
.widget-area {
    display: none !important;
}

/* Clean up GeneratePress footer default styles */
.site-info .inside-site-info {
    display: none;
}

/* Centre blog content */
.site-main,
.site-content .content-area {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}
