/* ==========================================
   CSS VARIABLES (matching konvto.com style)
   ========================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --secondary: #f43f5e;
    --accent: #8b5cf6;

    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --bg-card: #ffffff;

    --text-dark: #0f172a;
    --text-body: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.10);

    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================
   RESET & BASE
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    padding-top: 72px;
}

::selection {
    background: var(--primary);
    color: #fff;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

/* ==========================================
   SKIP TO CONTENT (accessibility)
   ========================================== */
.skip-to-content {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 9999;
    font-weight: 600;
    font-size: 0.85rem;
    transition: top 0.3s ease;
}
.skip-to-content:focus {
    top: 0;
    color: #fff;
}

/* ==========================================
   NAVBAR (fixed + glassmorphism)
   ========================================== */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.navbar-custom.scrolled {
    padding: 8px 0;
    box-shadow: var(--shadow-sm);
}

.navbar-brand-custom {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-dark) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.navbar-brand-custom .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.navbar-brand-custom:hover {
    opacity: 0.8;
}

.nav-link-custom {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-muted) !important;
    padding: 6px 16px !important;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--primary) !important;
    background: var(--primary-light);
}

.navbar-toggler-custom {
    border: none;
    background: transparent;
    padding: 6px 10px;
    border-radius: var(--radius);
    transition: background var(--transition);
    color: var(--text-body);
    font-size: 1.3rem;
}

.navbar-toggler-custom:hover {
    background: var(--border-light);
}

.navbar-toggler-custom:focus {
    box-shadow: none;
}

/* ==========================================
   HERO
   ========================================== */
.hero-section {
    padding: 48px 0 32px;
    text-align: center;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.hero-title .highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

/* ==========================================
   CALCULATOR CARD
   ========================================== */
.calc-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    height: 100%;
}

.calc-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.calc-card label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-body);
    font-size: 0.95rem;
}

.calc-card input[type="date"] {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-body);
    font-family: var(--font);
    color: var(--text-body);
    transition: all var(--transition);
}

.calc-card input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.30);
    transition: all var(--transition-bounce);
    cursor: pointer;
}

.btn-primary-custom:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.40);
    color: #fff;
}

.btn-primary-custom:active {
    transform: scale(0.97);
}

.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-body);
    transition: all var(--transition);
    cursor: pointer;
}

.btn-outline-custom:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.result-box {
    margin-top: 1.8rem;
    padding: 1.2rem 1.5rem;
    background: var(--bg-body);
    border-radius: var(--radius);
    font-size: 1.05rem;
    border-left: 4px solid var(--primary);
    min-height: 110px;
    transition: all 0.3s;
}

.result-box strong {
    color: var(--text-dark);
}

.result-box .highlight {
    color: var(--primary);
    font-weight: 600;
}

.result-box .text-muted-placeholder {
    color: var(--text-light);
}

/* ==========================================
   INFO SIDEBAR
   ========================================== */
.info-side {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    height: 100%;
}

.info-side h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.info-side ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-side ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-body);
}

.info-side ul li:last-child {
    border-bottom: none;
}

.info-side ul li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

/* ==========================================
   CONTENT SECTION (general)
   ========================================== */
.content-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.content-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1.8rem 0 0.6rem;
    color: var(--text-dark);
}

.content-section p {
    color: var(--text-body);
    margin-bottom: 1rem;
}

.content-section ul {
    margin: 0.5rem 0 1rem 1.5rem;
    color: var(--text-body);
}

.content-section ul li {
    margin-bottom: 0.3rem;
}

/* ==========================================
   MODERN ARTICLE SECTION (redesigned)
   ========================================== */
.article-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2.5rem;
    box-shadow: var(--shadow-md);
    border-left: 6px solid;
    border-image: var(--primary-gradient) 1;
    border-image-slice: 1;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}

/* Decorative glow */
.article-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.article-section::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.article-section>* {
    position: relative;
    z-index: 1;
}

.article-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

/* Gradient underline */
.article-section h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
    margin-top: 0.5rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.8rem;
}

.article-tags .badge-custom {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all var(--transition);
}

.article-tags .badge-custom:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.article-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 1.8rem 0 0.6rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-section h3::before {
    content: '\f0eb';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius);
}

/* Specific icon overrides for variety */
.article-section h3:nth-of-type(2)::before {
    content: '\f0b1';
}
.article-section h3:nth-of-type(3)::before {
    content: '\f12e';
}
.article-section h3:nth-of-type(4)::before {
    content: '\f0e6';
}

.article-section p {
    color: var(--text-body);
    margin-bottom: 1rem;
    font-size: 1.02rem;
    line-height: 1.8;
}

.article-section ul,
.article-section ol {
    margin: 0.5rem 0 1rem 1.8rem;
    color: var(--text-body);
}

.article-section ul li,
.article-section ol li {
    margin-bottom: 0.5rem;
    padding-left: 0.2rem;
}

.article-section ul li::marker {
    color: var(--primary);
}

.article-section .cta-box {
    background: var(--bg-body);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border-light);
    text-align: center;
}

.article-section .cta-box strong {
    color: var(--text-dark);
}

/* ==========================================
   FAQ GRID
   ========================================== */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.faq-item {
    background: var(--bg-body);
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.faq-item h4 {
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
    font-size: 1rem;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ==========================================
   DARK FOOTER (black themed)
   ========================================== */
.footer-custom {
    background: #0f172a;
    border-top: none;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-custom h5 {
    font-weight: 700;
    font-size: 1.1rem;
    color: #f8fafc;
    margin-bottom: 1.2rem;
}

.footer-custom p,
.footer-custom ul li a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-custom ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-custom ul li {
    margin-bottom: 0.5rem;
}

.footer-custom ul li a:hover {
    color: #38bdf8;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    transition: all var(--transition);
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: #3b82f6;
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-bottom a {
    color: #64748b;
}

.footer-bottom a:hover {
    color: #38bdf8;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .content-section,
    .article-section {
        padding: 1.8rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 64px;
    }

    .navbar-custom {
        padding: 10px 0;
    }

    .navbar-brand-custom {
        font-size: 1.1rem;
    }
    .navbar-brand-custom .brand-icon {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .calc-card {
        padding: 1.5rem;
    }

    .calc-card h2 {
        font-size: 1.3rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .content-section,
    .article-section {
        padding: 1.5rem;
    }

    .content-section h2,
    .article-section h2 {
        font-size: 1.6rem;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        width: 100%;
        justify-content: center;
    }

    .result-box {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .footer-custom .col-md-3 {
        margin-bottom: 1.8rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .calc-card {
        padding: 1.2rem;
    }

    .info-side {
        padding: 1.5rem;
    }

    .article-section {
        border-left-width: 4px;
        padding: 1.2rem;
    }

    .article-section h2::after {
        width: 50px;
    }
}