/* ═══════════════════════════════════════════════════════════
   INFORMIAA — Homepage Stylesheet
   Colors: 
     --green-dark : #1F4D3A  (primary dark)
     --green-deep : #163D2E  (deeper shade)
     --green-mid  : #2FA37A  (accent / CTA)
     --bg-light   : #F5F5F5  (section background)
     --bg-white   : #F7F7F8  (card background)
     --text-dark  : #111111
     --text-muted : #6B7280
   ═══════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@400;500;600&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --green-dark  : #1F4D3A;
    --green-deep  : #163D2E;
    --green-mid   : #2FA37A;
    --bg-light    : #F5F5F5;
    --bg-white    : #F7F7F8;
    --text-dark   : #111111;
    --text-muted  : #6B7280;
    --border      : #E5E7EB;
    --radius      : 10px;
    --shadow-sm   : 0 1px 4px rgba(0,0,0,0.06);
    --shadow-card : 0 2px 12px rgba(0,0,0,0.07);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body   : 'DM Sans', system-ui, sans-serif;
    --slides-visible: 4; /* updated by JS for responsive */
    --gap          : 20px;
}

/* ── Global reset for homepage ────────────────────────────── */
#inf-homepage,
#inf-homepage * {
    box-sizing: border-box;
}
#inf-homepage {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: #fff;
    width: 100%;
}

/* ── Container — full-bleed with inner max-width ─────────── */
.inf-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Section base ─────────────────────────────────────────── */
.inf-section {
    padding: 52px 0;
}
.inf-section--recent {
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.inf-section--category {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}
.inf-section--category:nth-child(even) {
    background: #fff;
}

/* ── Section header ───────────────────────────────────────── */
.inf-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 2.5px solid var(--green-dark);
}
.inf-section__heading {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 700;
    color: var(--green-dark);
    margin: 0;
    letter-spacing: -0.01em;
}

/* ── Explore link ─────────────────────────────────────────── */
.inf-explore-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-mid);
    text-decoration: none;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
}
.inf-explore-link:hover {
    color: var(--green-dark);
}
.inf-explore-link svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}
.inf-explore-link:hover svg {
    transform: translateX(3px);
}

/* ══════════════════════════════════════════════════════════════
   SECTION 1 — RECENT POSTS GRID
══════════════════════════════════════════════════════════════ */
.inf-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
}

/* ══════════════════════════════════════════════════════════════
   POST CARD — shared by both sections
══════════════════════════════════════════════════════════════ */
.inf-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.inf-card:hover {
    box-shadow: var(--shadow-card);
    border-color: #d1d5db;
}

/* Image wrapper — enforces 960:560 = 17:10 ratio */
.inf-card__img-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 17 / 10;
    overflow: hidden;
    background: var(--border);
    flex-shrink: 0;
    text-decoration: none;
}
.inf-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* NO hover zoom — intentionally omitted */
}

/* Card body */
.inf-card__body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

/* Category tag */
.inf-card__cat {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--green-mid);
    background: rgba(47, 163, 122, 0.1);
    border: 1px solid rgba(47, 163, 122, 0.25);
    padding: 2px 9px;
    border-radius: 100px;
    text-decoration: none;
    align-self: flex-start;
    transition: background 0.2s;
}
.inf-card__cat:hover {
    background: rgba(47, 163, 122, 0.2);
    color: var(--green-dark);
}

/* Title */
.inf-card__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.38;
    color: var(--text-dark);
    margin: 0;
}
.inf-card--large .inf-card__title {
    font-size: 1.08rem;
}
.inf-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.inf-card__title a:hover {
    color: var(--green-mid);
}

/* Meta: author · date */
.inf-card__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.inf-card__dot {
    color: #CBD5E1;
}
.inf-card__author {
    font-weight: 500;
    color: var(--green-dark);
}

/* Excerpt */
.inf-card__excerpt {
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   CAROUSEL
══════════════════════════════════════════════════════════════ */
.inf-carousel-outer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* The scrolling track */
.inf-carousel {
    display: flex;
    gap: var(--gap);
    overflow: hidden;          /* clips overflow — JS handles scroll */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    /* Prevent native scroll so JS carousel controls it */
    touch-action: pan-y;
}

/* Each slide: width is computed so exactly N fit */
.inf-carousel__slide {
    flex: 0 0 calc((100% - var(--gap) * (var(--slides-visible) - 1)) / var(--slides-visible));
    min-width: 0;
}

/* ── Arrow buttons ─────────────────────────────────────────── */
.inf-carousel-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--green-dark);
    background: #fff;
    color: var(--green-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
    padding: 0;
}
.inf-carousel-btn:hover {
    background: var(--green-dark);
    color: #fff;
}
.inf-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.inf-carousel-btn--prev { order: -1; }
.inf-carousel-btn--next { order: 1;  }

/* ── Dot indicators ────────────────────────────────────────── */
.inf-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 20px;
    min-height: 10px;
}
.inf-carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: none;
    padding: 0;
}
.inf-carousel-dots .dot.is-active {
    background: var(--green-mid);
    transform: scale(1.25);
}

/* ── No-posts fallback ─────────────────────────────────────── */
.inf-no-posts {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 20px 0;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */

/* Tablet — 2 columns recent, 2 slides carousel */
@media (max-width: 1024px) {
    :root { --slides-visible: 2; }

    .inf-recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .inf-container {
        padding: 0 20px;
    }
    .inf-section {
        padding: 40px 0;
    }
}

/* Large mobile — still 2 cols */
@media (max-width: 768px) {
    :root { --slides-visible: 1; }

    .inf-recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .inf-section__heading {
        font-size: 1.15rem;
    }
}

/* Small mobile — 1 col everywhere */
@media (max-width: 520px) {
    .inf-recent-grid {
        grid-template-columns: 1fr;
    }
    .inf-container {
        padding: 0 14px;
    }
    .inf-carousel-btn {
        width: 34px;
        height: 34px;
    }
    .inf-section {
        padding: 32px 0;
    }
    .inf-section__header {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ══════════════════════════════════════════════════════════════
   STICKY HEADER STYLES
══════════════════════════════════════════════════════════════ */

/* Make the site header sticky with smooth transitions */
.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
    background: #fff !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
    border-bottom: 1px solid transparent !important;
}

/* Header state when scrolled */
.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6) !important;
}

/* Smooth animation for header container when scrolling */
.site-header.scrolled .ast-container,
.site-header.scrolled .site-header-focus-item {
    transform: translateY(-2px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo animation on scroll */
.site-header.scrolled .site-logo-img,
.site-header.scrolled .site-title {
    transform: scale(0.92);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation items subtle animation */
.site-header.scrolled .main-navigation a,
.site-header.scrolled .main-header-menu-toggle {
    transition: all 0.3s ease;
}

/* Add subtle slide-in effect for navigation on scroll */
.site-header .main-navigation {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-header.scrolled .main-navigation {
    opacity: 1;
}

/* Ensure proper content flow behind sticky header */
#content {
    position: relative;
    z-index: 1;
}

/* Add spacing to prevent overlap with first section */
.inf-section--recent {
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

/* Smooth scroll behavior for the entire page */
html {
    scroll-behavior: smooth;
}

/* Fade-in animation for content sections as they scroll into view */
.inf-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Optional: Add entrance animation (uncomment if desired) */
/*
.inf-section {
    opacity: 0;
    transform: translateY(20px);
}

.inf-section.visible {
    opacity: 1;
    transform: translateY(0);
}
*/

/* ── Astra overrides — remove extra margins/padding ────────── */
.ast-container,
.entry-content,
.ast-page-builder-template .site-content {
    padding: 0 !important;
    max-width: none !important;
}
body.page-template-default .site-content {
    padding: 0;
}
.ast-page-builder-template #content {
    padding-top: 0;
}

/* Ensure header stays on top during scroll */
.site-header {
    will-change: transform, box-shadow;
}

/* Improve performance with GPU acceleration */
.site-header,
.site-header.scrolled .ast-container,
.site-header.scrolled .site-logo-img {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
