/* ===================================================================
   Hmmnm Homepage CSS — Consolidated v1
   =================================================================== */

/* ---------- Base Reset ---------- */
html, body, #outer-wrap, #wrap, .hmmnm-home {
    overflow-x: hidden !important;
    max-width: 100% !important;
}
#outer-wrap, #wrap { width: 100% !important; }

.hmmnm-home {
    background: #020617 !important;
    color: #e2e8f0 !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.hmmnm-home * { box-sizing: border-box; }
.hmmnm-home .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Reading Progress Bar ---------- */
.reading-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, #6366f1, #a855f7, #6366f1);
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    z-index: 99999; transition: width 0.1s linear;
}
@keyframes progressShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Hero ---------- */
.home-hero {
    position: relative; height: 75vh; min-height: 500px;
    max-height: 800px; overflow: hidden;
}
.hero-slider { position: absolute; inset: 0; z-index: 1; }
.hero-slide {
    position: absolute; inset: 0; background-size: cover;
    background-position: center; opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(2,6,23,0.4) 0%, rgba(2,6,23,0.7) 60%, rgba(2,6,23,0.95) 100%);
}
.hero-particles {
    position: absolute; inset: 0; z-index: 2;
    pointer-events: none; opacity: 0.6;
}
.home-hero .hero-content {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
    padding: 0 32px 0;
}
.hero-text-row {
    background: linear-gradient(90deg, rgba(2,6,23,0.85) 0%, rgba(15,23,42,0.75) 50%, rgba(2,6,23,0.85) 100%);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(99,102,241,0.1); border-bottom: none;
    border-radius: 20px 20px 0 0; padding: 20px 36px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.hero-text-left { flex: 1; min-width: 0; }

.home-hero .hero-title {
    font-size: 3.2rem; font-weight: 900; line-height: 1.2;
    color: #f1f5f9 !important; margin-bottom: 6px; letter-spacing: -0.02em;
}
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.home-hero .hero-subtitle {
    font-size: 1.6rem; color: #94a3b8 !important;
    line-height: 1.6; margin-bottom: 0; max-width: 100%;
}
.home-hero .hero-content .btn {
    display: inline-flex; align-items: center; flex-shrink: 0;
    border-radius: 10px; padding: 14px 32px; font-size: 1.1rem; white-space: nowrap;
}

/* Hero nav */
.hero-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
    background: rgba(15,23,42,0.6); backdrop-filter: blur(8px);
    border: 1px solid rgba(99,102,241,0.2); color: #e2e8f0;
    width: 44px; height: 44px; border-radius: 50%; font-size: 18px;
    cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero-nav:hover { background: rgba(99,102,241,0.3); border-color: rgba(99,102,241,0.5); }

/* Hero dots */
.hero-dots {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    z-index: 4; display: flex; gap: 8px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all 0.3s; }
.dot.active { background: #6366f1; width: 24px; border-radius: 4px; }

/* ---------- About ---------- */
.home-about {
    padding: 28px 0; background: #0f172a; overflow: hidden; position: relative;
}
.about-text {
    font-size: 2rem !important; line-height: 1.85; color: #94a3b8 !important;
    text-align: center; max-width: 800px; margin: 0 auto;
    animation: aboutSlideIn 1s ease-out both;
}
@keyframes aboutSlideIn { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
.home-about::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 300%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(99,102,241,0.03) 25%, rgba(139,92,246,0.05) 50%, rgba(99,102,241,0.03) 75%, transparent 100%);
    animation: aboutShimmer 8s linear infinite;
}
@keyframes aboutShimmer { 0% { transform: translateX(-33.33%); } 100% { transform: translateX(33.33%); } }
.home-about::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 200px; height: 1px; background: linear-gradient(90deg, transparent, rgba(99,102,241,0.3), transparent);
}
.about-text strong { color: #e2e8f0 !important; font-weight: 700; }

/* ---------- Stats Bar ---------- */
.home-stats {
    padding: 30px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    position: relative; overflow: hidden;
}
.home-stats::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.05), transparent);
    animation: statsGlow 4s ease-in-out infinite;
}
@keyframes statsGlow { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; z-index: 1; }
.stat-item { text-align: center; padding: 16px 0; }
.stat-number {
    display: block; font-size: 2.5rem; font-weight: 900;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1.2; margin-bottom: 4px;
}
.stat-label { font-size: 0.85rem; color: #64748b; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }

/* ---------- Section Header ---------- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-title {
    font-size: 1.8rem; font-weight: 800; color: #f1f5f9 !important;
    margin-bottom: 12px; position: relative; display: inline-block;
}
.section-line {
    width: 60px; height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 2px; margin: 0 auto; animation: linePulse 3s ease-in-out infinite;
}
@keyframes linePulse { 0%, 100% { width: 60px; opacity: 1; } 50% { width: 100px; opacity: 0.7; } }

/* ---------- Featured Posts Slider ---------- */
.home-featured { padding: 40px 0; background: #020617; }
.post-slider-wrap { position: relative; overflow: hidden; }
.post-slider { display: flex; will-change: transform; }
.post-slide { flex: 0 0 calc(100% / 3); min-width: 0; padding: 0 10px; }
.post-slide-card {
    display: flex; flex-direction: column;
    background: rgba(15,23,42,0.7); border: 1px solid rgba(99,102,241,0.25);
    border-radius: 20px; overflow: hidden; text-decoration: none; color: #e2e8f0;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1); height: 100%;
}
.post-slide-card:hover {
    transform: translateY(-6px); border-color: rgba(99,102,241,0.4);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(99,102,241,0.15);
}
.post-slide-img { position: relative; overflow: hidden; height: 180px; }
.post-slide-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.post-slide-card:hover .post-slide-img img { transform: scale(1.08); }
.post-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2,6,23,0.8) 100%);
}
.post-slide-info { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post-slide-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-shrink: 0; }
.featured-cat {
    font-size: 1rem; text-transform: uppercase; letter-spacing: 1px;
    background: rgba(99,102,241,0.15); color: #a5b4fc;
    padding: 4px 10px; border-radius: 20px; font-weight: 600;
}
.post-date { font-size: 1rem; color: #64748b; }
.featured-title {
    font-size: 1.8rem; font-weight: 700; color: #f1f5f9 !important;
    line-height: 1.4; margin-bottom: 10px; flex-shrink: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-excerpt {
    font-size: 1.3rem; color: #94a3b8; line-height: 1.65; margin-bottom: 14px;
    flex: 1; min-height: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.read-more { font-size: 1.3rem; color: #6366f1; font-weight: 600; margin-top: auto; transition: all 0.3s; }
.read-more:hover { color: #a855f7; transform: translateX(4px); display: inline-block; }

/* ---------- Category Post Cards (pt_view — single consolidated block) ---------- */

/* Card container — high specificity to override pt_view cv.css */
.hmmnm-home .pt-cv-page .pt-cv-content-item,
.hmmnm-home .pt-cv-colsys .pt-cv-content-item {
    background: rgba(15,23,42,0.7) !important;
    border: 1px solid rgba(99,102,241,0.25) !important;
    border-radius: 20px !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1) !important;
    float: none !important;
    clear: none !important;
}
.hmmnm-home .pt-cv-page .pt-cv-content-item:hover,
.hmmnm-home .pt-cv-colsys .pt-cv-content-item:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(99,102,241,0.4) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(99,102,241,0.15) !important;
}

/* Image field — let it grow with content */
.hmmnm-home .pt-cv-ifield {
    position: relative !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    flex-shrink: 0 !important;
}
/* Image link wrapper — fixed height for cover */
.hmmnm-home .pt-cv-ifield .pt-cv-href-thumbnail {
    display: block !important;
    height: 220px !important;
    overflow: hidden !important;
    border-radius: 20px 20px 0 0 !important;
    position: relative !important;
}
.hmmnm-home .pt-cv-ifield img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    transition: transform 0.5s !important;
}
.hmmnm-home .pt-cv-page .pt-cv-content-item:hover .pt-cv-ifield img,
.hmmnm-home .pt-cv-colsys .pt-cv-content-item:hover .pt-cv-ifield img { transform: scale(1.08) !important; }
.hmmnm-home .pt-cv-ifield::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2,6,23,0.8) 100%);
    pointer-events: none;
}

/* Card title */
.hmmnm-home .pt-cv-title {
    font-size: 1.8rem !important; font-weight: 700 !important;
    color: #f1f5f9 !important; line-height: 1.4 !important;
    margin-bottom: 10px !important; padding: 14px 16px 0 16px !important;
    display: block !important; visibility: visible !important;
}
.hmmnm-home .pt-cv-title a {
    color: #f1f5f9 !important; text-decoration: none !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hmmnm-home .pt-cv-title a:hover { color: #a5b4fc !important; }

/* Card excerpt */
.hmmnm-home .pt-cv-content {
    font-size: 1.3rem !important; color: #94a3b8 !important;
    line-height: 1.65 !important; padding: 0 16px !important;
    margin-bottom: 14px !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    display: block !important; visibility: visible !important;
    flex: 1 1 auto !important;
}

/* Card read more */
.hmmnm-home .pt-cv-readmore {
    font-size: 1.3rem !important; color: #a5b4fc !important;
    font-weight: 600 !important; padding: 0 16px 16px 16px !important;
    margin-top: auto !important; text-decoration: none !important;
    transition: all 0.3s !important;
    display: block !important; visibility: visible !important;
}
.hmmnm-home .pt-cv-readmore:hover {
    color: #c7d2fe !important; transform: translateX(4px) !important;
    display: inline-block !important;
}

/* Card meta */
.hmmnm-home .pt-cv-meta-text,
.hmmnm-home .pt-cv-meta-date,
.hmmnm-home .pt-cv-left,
.hmmnm-home .pt-cv-right,
.hmmnm-home .pt-cv-ctf {
    color: #64748b !important; font-size: 1rem !important;
}

/* pt_view layout overrides */
.hmmnm-home .pt-cv-viewstyle-block .pt-cv-content-item {
    padding: 0 !important; border: none !important;
    background: none !important; margin: 0 !important;
}
.hmmnm-home .pt-cv-wrapper { max-width: 100%; overflow: hidden; }
.hmmnm-home .pt-cv-colsys { margin-left: 0 !important; margin-right: 0 !important; }
.hmmnm-home .pt-cv-page {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    margin: 0 !important; padding: 0 !important; width: 100% !important;
    align-items: stretch !important;
}
.hmmnm-home .pt-cv-content-item img {
    display: block !important; max-width: 100% !important; visibility: visible !important;
}

/* 2-column pt_view sections */
.hmmnm-home .pt-cv-page[data-cvc="2"] {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* ---------- Category Sections ---------- */
.home-category { padding: 30px 0; background: #0f172a; transition: background 0.3s; }
.home-category.alt-bg { background: #020617; }
.category-header {
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 24px; position: relative;
}
.category-header::after {
    content: ''; position: absolute; bottom: -16px; left: 0;
    width: 80px; height: 2px; background: linear-gradient(90deg, #6366f1, transparent);
}
.category-icon { font-size: 2.5rem; animation: iconFloat 3s ease-in-out infinite; }
@keyframes iconFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.category-header > div { flex: 1; }
.category-title { font-size: 1.6rem; font-weight: 800; color: #f1f5f9 !important; margin-bottom: 4px; }
.category-desc { font-size: 0.9rem; color: #64748b !important; margin: 0; }
.category-view-all {
    font-size: 0.85rem; color: #6366f1 !important; text-decoration: none !important;
    font-weight: 600; padding: 8px 20px;
    border: 1px solid rgba(99,102,241,0.3); border-radius: 20px;
    transition: all 0.3s !important; white-space: nowrap;
    flex-shrink: 0; position: relative; overflow: hidden;
}
.category-view-all:hover {
    background: rgba(99,102,241,0.1) !important;
    border-color: #6366f1 !important; color: #a5b4fc !important;
}

/* ---------- CTA Section ---------- */
.home-cta {
    padding: 50px 0;
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
    text-align: center; position: relative; overflow: hidden;
}
.home-cta::before {
    content: ''; position: absolute; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.15), transparent 70%);
    top: -200px; right: -100px; border-radius: 50%; animation: ctaOrb 6s ease-in-out infinite;
}
.home-cta::after {
    content: ''; position: absolute; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(168,85,247,0.1), transparent 70%);
    bottom: -150px; left: -50px; border-radius: 50%; animation: ctaOrb 8s ease-in-out infinite reverse;
}
@keyframes ctaOrb { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.2); opacity: 1; } }
.cta-title {
    font-size: 2rem; font-weight: 800; color: #f1f5f9 !important;
    margin-bottom: 12px; position: relative; z-index: 1;
}
.cta-subtitle {
    font-size: 1rem; color: #94a3b8 !important; margin-bottom: 28px;
    position: relative; z-index: 1;
}
.home-cta .btn { position: relative; z-index: 1; }

/* ---------- Buttons Global ---------- */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important; border: none !important;
    border-radius: 12px !important; padding: 14px 36px !important;
    font-weight: 600 !important; font-size: 1.15rem !important;
    cursor: pointer; transition: all 0.3s !important;
    text-decoration: none !important; display: inline-block;
    position: relative; overflow: hidden;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99,102,241,0.4) !important;
}
.btn-lg { padding: 16px 40px !important; font-size: 1.25rem !important; border-radius: 16px !important; }

/* ---------- Ripple Effect ---------- */
.ripple-effect {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,0.3); transform: scale(0);
    animation: rippleAnim 0.6s ease-out; pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed; bottom: 32px; right: 32px; z-index: 9999;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(20px); transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(99,102,241,0.5); }
.btt-arrow { font-size: 16px; line-height: 1; }
.btt-pct { font-size: 9px; font-weight: 700; margin-top: -1px; }

/* ---------- Fade-in on scroll ---------- */
.fade-section { opacity: 1 !important; }
.fade-section.fade-visible { opacity: 1 !important; }
.fade-section .pt-cv-page .pt-cv-content-item { opacity: 1 !important; }
.fade-section .post-slide {
    opacity: 1 !important; flex: 0 0 calc(100% / 3);
    min-width: 0; padding: 0 8px;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.fade-section.fade-visible .pt-cv-page .pt-cv-content-item,
.fade-section.fade-visible .post-slide { opacity: 1 !important; }

/* ---------- Section Dividers ---------- */
.home-featured::before,
.home-category::before,
.home-cta::before {
    content: ''; display: block; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.2), transparent);
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .post-slide { flex: 0 0 50%; }
    .hmmnm-home .pt-cv-page { grid-template-columns: repeat(2, 1fr) !important; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .stat-number { font-size: 2rem; }
}

@media (max-width: 768px) {
    .home-hero { min-height: 100vh; max-height: none; padding: 0 0 100px; }
    .home-hero .hero-content { padding: 20px 16px; }
    .hero-text-row {
        padding: 20px; border-radius: 16px 16px 0 0;
        flex-direction: column; align-items: stretch; gap: 16px;
    }
    .home-hero .hero-title { font-size: 2.4rem; }
    .home-hero .hero-subtitle { font-size: 0.88rem; }
    .home-hero .hero-content .btn { padding: 14px 32px; font-size: 0.9rem; text-align: center; justify-content: center; }
    .hero-nav { display: none; }
    .post-slide { flex: 0 0 100%; }
    .hmmnm-home .pt-cv-page { grid-template-columns: 1fr !important; }
    .category-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .category-view-all { align-self: flex-start; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .stat-number { font-size: 1.8rem; }
    .section-title { font-size: 1.4rem; }
    .home-about, .home-featured, .home-category { padding: 40px 0; }
    .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
    .hero-particles { display: none; }
}

@media (max-width: 480px) {
    .home-hero .hero-title { font-size: 1.8rem; }
    .home-hero .hero-subtitle { font-size: 0.82rem; }
    .hero-text-row { padding: 16px; gap: 12px; }
    .home-hero .hero-content .btn { padding: 12px 24px; font-size: 1rem; }
    .about-text { font-size: 1.75rem !important; }
    .stat-number { font-size: 1.5rem; }
    .stats-grid { gap: 12px; }
    .home-stats { padding: 24px 0; }
    .featured-title { font-size: 1.5rem; }
    .post-excerpt { font-size: 1.1rem; }
    .category-header { margin-bottom: 20px; }
    .category-icon { font-size: 2rem; }
    .category-title { font-size: 1.6rem; }
    .category-view-all { padding: 6px 16px; font-size: 1rem; }
    .home-featured, .home-category { padding: 32px 0; }
    .home-cta { padding: 40px 0; }
    .cta-title { font-size: 1.5rem; }
    .btn-lg { padding: 14px 32px !important; font-size: 0.95rem !important; }
}

/* ---------- Footer — 3 columns ---------- */
#footer-widgets {
    background-color: #0f172a !important;
}
#footer-widgets .footer-box {
    float: left !important;
    width: 33.333% !important;
    padding: 0 15px !important;
}
#footer-widgets .footer-box.col-4 {
    display: none !important;
}
#footer-widgets .footer-box.col-4,
#footer-widgets .footer-box:empty {
    display: none !important;
}
#footer-widgets .footer-box .widget-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    margin-bottom: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}
#footer-widgets li a {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    transition: color 0.3s !important;
}
#footer-widgets li a:hover {
    color: #a5b4fc !important;
}
@media (max-width: 768px) {
    #footer-widgets .footer-box { width: 100% !important; margin-bottom: 24px !important; }
}

/* ---------- Bottom Footer ---------- */
#footer-bottom {
    background-color: #020617 !important;
    color: #94a3b8 !important;
}
#footer-bottom a {
    color: #94a3b8 !important;
}
#footer-bottom a:hover {
    color: #a5b4fc !important;
}
