/*
Theme Name: Hanimani
Author: Irek
Description: Modern finance & lifestyle portal for youth. Honey/Bee themed.
Version: 2.2
*/

:root {
    --honey: #FFB830;
    --honey-dark: #E8950A;
    --honey-deep: #C47A08;
    --honey-light: #FFD580;
    --honey-pale: #FFF8E7;
    --honey-glow: rgba(255, 184, 48, 0.15);
    
    --bg-primary: #FFFCF7;
    --bg-secondary: #FFF9EE;
    --bg-card: #FFFFFF;
    
    --text-primary: #2D1E05;
    --text-secondary: #6B5D4A;
    --text-muted: #A8997F;
    
    --border: rgba(45, 30, 5, 0.08);
    --border-focus: var(--honey-dark);
    
    --shadow-sm: 0 2px 8px rgba(45, 30, 5, 0.04);
    --shadow-md: 0 8px 24px rgba(45, 30, 5, 0.06);
    --shadow-lg: 0 16px 48px rgba(45, 30, 5, 0.1);
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    
    --font-main: 'Bricolage Grotesque', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================== RESET & BASE ===================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; }

/* ===================== PATTERNS ===================== */
.bg-honeycomb {
    background-color: var(--bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23FFB830' stroke-opacity='0.05' stroke-width='1'/%3E%3C/svg%3E");
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 16px;
    font-family: var(--font-main);
}
.btn-primary { background: var(--honey-dark); color: white; box-shadow: 0 4px 14px rgba(232, 149, 10, 0.3); }
.btn-primary:hover { background: var(--honey-deep); transform: translateY(-2px); }
.btn-secondary { background: var(--honey-pale); color: var(--honey-deep); }

/* ===================== NAVBAR ===================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 0;
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(255, 252, 247, 0.9);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    font-family: 'Gaegu', cursive;
    letter-spacing: -0.02em;
}
.logo-icon { font-size: 32px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-secondary); font-weight: 600; transition: var(--transition); }
.nav-links a:hover { color: var(--honey-dark); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.menu-toggle span { display: block; width: 28px; height: 3px; background: var(--text-primary); border-radius: 4px; transition: var(--transition); }
.menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 40px;
        z-index: 1000;
    }
    .nav-links.open { right: 0; }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links a { font-size: 24px; padding: 16px; display: block; }
    .logo { font-size: 20px; }
    .logo-icon { font-size: 28px; }
    .nav-cta { display: none; }
}

/* ===================== HERO SLIDER ===================== */
.hero {
    padding: 0;
    position: relative;
    overflow: hidden;
    height: 700px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
}
.hero .container { position: relative; z-index: 5; height: 100%; }
.hero-slide { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; 
    visibility: hidden;
    transition: opacity 1.2s ease-in-out, visibility 1.2s;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }
@keyframes fadeEffect { from { opacity: 0; } to { opacity: 1; } }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; width: 100%; }
.hero-content { text-align: left; }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; }
.hero-visual { position: relative; display: flex; justify-content: center; }
.single-image {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
}
.single-image img { width: 100%; height: 100%; object-fit: cover; }
.slider-dots { display: flex; justify-content: center; gap: 12px; margin-top: 0; position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 10; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(45, 30, 5, 0.1); cursor: pointer; transition: var(--transition); }
.dot.active { background: var(--honey-dark); width: 30px; border-radius: 100px; }

@media (max-width: 992px) {
    .hero { padding: 0; min-height: auto; height: 850px; }
    .hero-slide { padding: 100px 0 40px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .hero-content { order: 1; display: flex; flex-direction: column; align-items: center; }
    .hero-visual { order: 2; margin-bottom: 20px; }
    .hero-actions { justify-content: center; width: 100%; }
    .single-image { max-width: 90%; aspect-ratio: 3/2; }
}
@media (max-width: 600px) {
    .hero { height: 800px; }
    .hero-slide { padding-top: 110px; }
    .hero h1 { font-size: 28px; }
    .hero-description { font-size: 16px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
}

.hero-badge {
    display: inline-flex;
    padding: 6px 14px;
    background: var(--honey-pale);
    color: var(--honey-deep);
    border-radius: 100px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 20px;
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); margin-bottom: 20px; }
.hero h1 span { color: var(--honey-dark); }
.hero-description { font-size: 18px; color: var(--text-secondary); margin-bottom: 32px; max-width: 500px; }
.floating-honey {
    position: absolute;
    bottom: -15px;
    right: -15px;
    font-size: 48px;
    background: white;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===================== CALCULATOR ===================== */
.calculator-section, .calculator-page-main {
    padding: 40px 0;
    background: var(--bg-secondary);
}
.calc-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-lg);
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden; /* Zmienione na hidden dla czystości krawędzi */
    position: relative;
    width: 100%;
}
.calc-main-body { padding: 40px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.input-group { margin-bottom: 24px; width: 100%; }
.input-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; font-weight: 700; gap: 10px; }
.input-value { color: var(--honey-dark); font-family: var(--font-mono); white-space: nowrap; }

input[type=range] { -webkit-appearance: none; width: 100%; height: 6px; background: #EFE9E0; border-radius: 4px; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%;
    background: var(--honey-dark); border: 3px solid white; cursor: pointer; box-shadow: var(--shadow-sm);
}

.calc-results { display: flex; flex-direction: column; width: 100%; }
.result-main { text-align: center; padding: 24px; background: var(--honey-pale); border-radius: var(--radius-md); margin-bottom: 20px; }
.result-total { font-size: 36px; font-weight: 800; word-break: break-all; }
.chart-container { height: 250px; margin: 20px 0; position: relative; width: 100%; }
.results-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.breakdown-item { padding: 12px; background: #F9F7F2; border-radius: var(--radius-sm); text-align: center; }
.breakdown-label { font-size: 11px; display: block; margin-bottom: 4px; }
.breakdown-value { font-size: 16px; font-weight: 800; }

.calc-cta-bar {
    background: var(--honey-pale);
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
}

@media (max-width: 992px) {
    .calc-grid { grid-template-columns: 1fr; gap: 32px; }
    .calc-main-body { padding: 30px 20px; }
    .calc-cta-bar { flex-direction: column; text-align: center; gap: 16px; padding: 24px 20px; }
}
@media (max-width: 480px) {
    .result-total { font-size: 24px; } /* Zmniejszony font dla bardzo długich kwot */
    .results-breakdown { grid-template-columns: 1fr; }
    .chart-container { height: 180px; }
    .input-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .breakdown-value { font-size: 14px; }
}

/* ===================== SECTIONS ===================== */
section { padding: 80px 0; }
.section-header { margin-bottom: 40px; }
.section-tag { color: var(--honey-dark); font-weight: 700; font-size: 13px; display: block; margin-bottom: 8px; }

/* ===================== ABOUT & TIPS ===================== */
.about-grid, .steps-grid, .tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.about-card, .step-card, .tip-card { background: white; padding: 30px; border-radius: var(--radius-md); border: 1px solid var(--border); }

/* ===================== FOOTER ===================== */
.footer { background: #1A1207; color: white; padding: 60px 0 30px; }
.footer .logo { color: white; margin-bottom: 24px; }
.footer .logo .logo-text { color: var(--honey); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-links { list-style: none; margin-top: 15px; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 20px; text-align: center; font-size: 12px; opacity: 0.4; }

/* ===================== LATEST POSTS ===================== */
.latest-posts { 
    background: white; 
    padding: 100px 0; 
    position: relative;
}

.posts-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 32px; 
}

.post-card { 
    background: white; 
    border-radius: var(--radius-lg); 
    overflow: hidden; 
    border: 1px solid var(--border); 
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.post-card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow-lg); 
    border-color: var(--honey-light); 
}

.post-card-image { 
    position: relative; 
    height: 220px; 
    display: block; 
    overflow: hidden; 
    background: var(--bg-secondary);
}

.post-card-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img { 
    transform: scale(1.05); 
}

.card-category { 
    position: absolute; 
    top: 16px; 
    left: 16px; 
    background: var(--honey); 
    color: var(--text-primary); 
    padding: 6px 14px; 
    border-radius: 100px; 
    font-size: 11px; 
    font-weight: 800; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.post-card-content { 
    padding: 24px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.post-date { 
    font-size: 12px; 
    color: var(--text-muted); 
    font-weight: 700; 
    margin-bottom: 8px; 
    display: block; 
}

.post-card-content h3 { 
    font-size: 20px; 
    margin-bottom: 12px; 
    line-height: 1.4;
}

.post-card-content h3 a { 
    text-decoration: none; 
    color: var(--text-primary); 
    transition: var(--transition); 
}

.post-card-content h3 a:hover { 
    color: var(--honey-dark); 
}

.post-card-content p { 
    font-size: 15px; 
    color: var(--text-secondary); 
    margin-bottom: 20px; 
    flex-grow: 1; 
    line-height: 1.6;
}

.read-more { 
    font-weight: 800; 
    font-size: 14px; 
    color: var(--honey-dark); 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
}

.read-more:hover { 
    color: var(--honey-deep); 
}

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: 1fr; }
    .post-card-image { height: 200px; }
}

/* ===================== PAGE STYLES ===================== */
.page-hero { padding: 160px 0 60px; text-align: center; }
.calc-info-box { margin-top: 40px; padding: 24px; background: var(--honey-pale); border-radius: var(--radius-md); border-left: 4px solid var(--honey-dark); }
.calc-info-box h4 { margin-bottom: 8px; color: var(--honey-deep); }
.calc-info-box p { font-size: 14px; color: var(--text-secondary); margin: 0; }
.calc-edu { padding: 100px 0; background: white; }
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.edu-card { padding: 40px; background: var(--bg-primary); border-radius: var(--radius-md); transition: var(--transition); }
.edu-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.edu-icon { font-size: 40px; margin-bottom: 24px; }
.seo-content { margin-top: 80px; padding-top: 80px; border-top: 1px solid var(--border); }
.seo-text-block { max-width: 800px; margin: 0 auto; }
.seo-text-block h2 { font-size: 28px; margin-bottom: 24px; }
.seo-text-block h3 { font-size: 20px; margin: 32px 0 16px; }
.seo-text-block p { color: var(--text-secondary); margin-bottom: 20px; }
.seo-text-block ul { margin-bottom: 24px; padding-left: 20px; color: var(--text-secondary); }
.seo-text-block li { margin-bottom: 12px; }
.seo-text-block code { background: var(--honey-pale); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; color: var(--honey-deep); }

@media (max-width: 768px) { .page-hero { padding-top: 120px; } .edu-grid { grid-template-columns: 1fr; } }

/* ===================== ABOUT PAGE ===================== */
.about-hero { padding: 160px 0 80px; }
.white-section { background: white; border-radius: 60px; margin: 40px 20px; box-shadow: var(--shadow-sm); }
.story-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 80px; align-items: start; padding: 80px 40px; }
.story-text h2 { margin-bottom: 24px; }
.story-stats { display: flex; flex-direction: column; gap: 24px; }
.stat-card { background: var(--bg-primary); padding: 32px; border-radius: var(--radius-md); text-align: center; border: 1px solid var(--border); transition: var(--transition); }
.stat-card:hover { border-color: var(--honey); transform: translateX(10px); }
.stat-num { display: block; font-size: 40px; font-weight: 800; color: var(--honey-dark); margin-bottom: 8px; }
.stat-label { font-size: 14px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

.about-values { padding: 100px 0; }
.about-cta { padding-bottom: 100px; }
.cta-box { background: var(--honey-dark); padding: 80px 40px; border-radius: var(--radius-lg); text-align: center; color: white; }
.cta-box h2 { font-size: 40px; margin-bottom: 16px; }
.cta-box p { font-size: 18px; margin-bottom: 40px; opacity: 0.9; }
.cta-box .btn-secondary { background: white; color: var(--honey-deep); }

@media (max-width: 992px) {
    .story-grid { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px; }
    .stat-card:hover { transform: translateY(-5px); }
}

/* ===================== BLOG ARCHIVE ===================== */
.archive-posts { padding-bottom: 100px; }
.blog-pagination { margin-top: 60px; display: flex; justify-content: center; gap: 10px; }
.blog-pagination .page-numbers { 
    width: 45px; 
    height: 45px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    background: white; 
    border: 1px solid var(--border); 
    text-decoration: none; 
    color: var(--text-primary); 
    font-weight: 700; 
    transition: var(--transition); 
}
.blog-pagination .page-numbers.current { background: var(--honey); color: white; border-color: var(--honey); }
.blog-pagination .page-numbers:hover:not(.current) { border-color: var(--honey); color: var(--honey); }
.blog-pagination .next, .blog-pagination .prev { width: auto; padding: 0 20px; border-radius: 100px; }

/* ===================== SINGLE POST ===================== */
.single-article { padding-top: 140px; }
.article-header { text-align: center; margin-bottom: 60px; }
.article-meta { margin-bottom: 24px; display: flex; justify-content: center; gap: 20px; align-items: center; font-weight: 700; font-size: 14px; }
.category-badge a { background: var(--honey-pale); color: var(--honey-deep); padding: 6px 16px; border-radius: 100px; text-decoration: none; }
.post-date { color: var(--text-muted); }
.article-title { font-size: clamp(32px, 5vw, 56px); max-width: 900px; margin: 0 auto 40px; }

.article-featured-image { position: relative; max-width: 900px; margin: 0 auto; }
.image-frame { border-radius: var(--radius-lg); overflow: hidden; border: 4px solid white; box-shadow: var(--shadow-lg); aspect-ratio: 16/9; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; }

.article-body-wrapper { padding: 60px 0; background: white; border-radius: 60px 60px 0 0; margin-top: -40px; position: relative; z-index: 6; }
.article-content, .entry-content { max-width: 800px; margin: 0 auto; font-size: 19px; line-height: 1.9; color: var(--text-secondary); }
.article-content h2, .article-content h3, .entry-content h2, .entry-content h3 { color: var(--text-primary); margin: 50px 0 24px; font-size: clamp(24px, 3vw, 32px); }
.article-content p, .entry-content p { margin-bottom: 32px; display: block; }
.article-content img, .entry-content img { border-radius: var(--radius-md); margin: 40px 0; width: 100%; height: auto; }
.article-content blockquote, .entry-content blockquote { border-left: 6px solid var(--honey); padding: 32px 40px; background: var(--bg-secondary); border-radius: var(--radius-md); font-style: italic; color: var(--text-primary); margin: 50px 0; font-size: 22px; line-height: 1.6; }

/* Styl dla leadu (pierwszego akapitu) */
.article-content p.lead {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.7;
    margin-bottom: 48px;
}

/* Styl dla miodowej listy */
.honey-list {
    list-style: none;
    padding: 0;
    margin: 32px 0;
}

.honey-list li {
    background: var(--bg-secondary);
    margin-bottom: 12px;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.honey-list li::before {
    content: '🍯';
    font-size: 20px;
}

.article-footer { max-width: 750px; margin: 60px auto 0; padding-top: 40px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.share-label { font-weight: 700; font-size: 14px; margin-right: 12px; }
.share-icons a { background: var(--bg-primary); color: var(--text-primary); width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; font-weight: 800; font-size: 12px; transition: var(--transition); border: 1px solid var(--border); }
.share-icons a:hover { background: var(--honey); color: white; border-color: var(--honey); }

.article-content ul {
    list-style: none;
    padding-left: 0;
    margin: 32px 0;
}

.article-content ul li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 16px;
}

.article-content ul li::before {
    content: '🍯';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 18px;
}

.post-navigation { padding: 60px 0; background: var(--bg-secondary); }
.nav-links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.nav-links-grid a { text-decoration: none; color: var(--text-primary); font-weight: 800; display: block; padding: 24px; background: white; border-radius: var(--radius-md); border: 1px solid var(--border); transition: var(--transition); }
.nav-links-grid a:hover { transform: translateY(-5px); border-color: var(--honey); box-shadow: var(--shadow-md); }
.nav-links-grid span { color: var(--honey-dark); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.nav-next { text-align: right; }

@media (max-width: 768px) {
    .single-article { padding-top: 100px; }
    .article-body-wrapper { border-radius: 30px 30px 0 0; padding: 40px 0; }
    .article-footer { flex-direction: column; gap: 30px; text-align: center; }
    .nav-links-grid { grid-template-columns: 1fr; }
}

/* Animacje Intersection Observer */
[data-animate] { opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
[data-animate].visible { opacity: 1; transform: translateY(0); }
