/* ============================================
   Lakáshitel Kalkulátor - Egyedi stílusok
   Mobile-first megközelítés
   ============================================ */

/* --- Alap --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Egyedi scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* --- Navigáció --- */
.nav-link {
    position: relative;
    transition: color 0.2s;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* --- Mobil menü --- */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open {
    transform: translateX(0);
}
.mobile-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* --- Hero szekció --- */
.hero-gradient,
.gradient-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 40%, #2563eb 100%);
    position: relative;
    overflow: hidden;
}
.hero-gradient::before,
.gradient-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-gradient::after,
.gradient-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* --- Kártyák --- */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* --- Gomb animációk --- */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-accent {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transition: all 0.3s ease;
}
.btn-accent:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4);
}

/* --- Kalkulátor kártya --- */
.calc-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Range slider testreszabás */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

/* Range progress fill */
input[type="range"].range-filled {
    background: linear-gradient(to right, #2563eb var(--range-progress, 0%), #e2e8f0 var(--range-progress, 0%));
}

/* --- Eredmény kártyák --- */
.result-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
}
.result-highlight {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: white;
}

/* --- Számláló animáció --- */
.counter-value {
    font-variant-numeric: tabular-nums;
    transition: all 0.5s ease;
}

/* --- Scroll animációk --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }
.fade-up.delay-4 { transition-delay: 0.4s; }

/* --- Accordion --- */
.accordion-content {
    max-height: 0 !important;
    overflow: hidden !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
}
.accordion-content.open {
    max-height: 500px !important;
    padding-top: 0.25rem !important;
    padding-bottom: 1rem !important;
    opacity: 1;
}
.accordion-icon {
    transition: transform 0.3s ease;
}
.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

/* --- Tooltip --- */
.tooltip-trigger { position: relative; cursor: help; }
.tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
    width: max-content;
    max-width: 280px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 50;
}
.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}
.tooltip-trigger:hover .tooltip-content,
.tooltip-trigger:focus .tooltip-content {
    opacity: 1;
    pointer-events: auto;
}

/* --- Cookie banner (mobile-friendly popup) --- */
.cookie-banner {
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    pointer-events: none;
}
.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.cookie-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cookie-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* --- Loading spinner --- */
.spinner {
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Szekció elválasztó --- */
.section-divider {
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    height: 1px;
}

/* --- Input fókusz --- */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

/* --- Number input nyilak elrejtése --- */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ============================================
   Blog tartalom stílusok (.blog-content)
   ============================================ */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #475569;
}
.blog-content > *:first-child { margin-top: 0; }
.blog-content > *:last-child { margin-bottom: 0; }

.blog-content p { margin: 1.25em 0; }

.blog-content h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    margin: 2em 0 0.75em;
    line-height: 1.3;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.4em;
}
.blog-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 1.75em 0 0.6em;
    line-height: 1.35;
}
.blog-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin: 1.5em 0 0.5em;
    line-height: 1.4;
}

.blog-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-color: #bfdbfe;
    text-underline-offset: 2px;
    transition: color 0.15s, text-decoration-color 0.15s;
}
.blog-content a:hover {
    color: #1d4ed8;
    text-decoration-color: #2563eb;
}

.blog-content strong { color: #1e293b; font-weight: 600; }
.blog-content em { font-style: italic; }

.blog-content ul {
    margin: 1.25em 0;
    padding-left: 1.75em;
    list-style-type: disc;
}
.blog-content ol {
    margin: 1.25em 0;
    padding-left: 1.75em;
    list-style-type: decimal;
}
.blog-content li {
    margin: 0.4em 0;
    padding-left: 0.25em;
    color: #475569;
}
.blog-content li::marker { color: #94a3b8; }
.blog-content ul ul, .blog-content ol ol,
.blog-content ul ol, .blog-content ol ul { margin: 0.3em 0; }

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.blog-content thead { background: #f1f5f9; }
.blog-content th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #334155;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #e2e8f0;
}
.blog-content td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}
.blog-content tbody tr:hover td { background: #f8fafc; }
.blog-content tbody tr:last-child td { border-bottom: none; }

.blog-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.25em;
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    border-radius: 0 8px 8px 0;
    color: #1e40af;
    font-style: italic;
}
.blog-content blockquote p { margin: 0.5em 0; }
.blog-content blockquote p:first-child { margin-top: 0; }
.blog-content blockquote p:last-child { margin-bottom: 0; }

.blog-content code {
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    background: #f1f5f9;
    color: #7c3aed;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}
.blog-content pre {
    margin: 1.5em 0;
    padding: 1.25em;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}
.blog-content pre code { background: none; color: inherit; padding: 0; border-radius: 0; font-size: inherit; }

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em auto;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.blog-content figure { margin: 1.5em 0; }
.blog-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.5em;
}

.blog-content hr {
    border: none;
    height: 2px;
    background: #e2e8f0;
    margin: 2.5em 0;
    border-radius: 1px;
}

.blog-content .highlight,
.blog-content .info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1em 1.25em;
    margin: 1.5em 0;
    color: #1e40af;
}
.blog-content .warning-box {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 1em 1.25em;
    margin: 1.5em 0;
    color: #92400e;
}
.blog-content .success-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1em 1.25em;
    margin: 1.5em 0;
    color: #166534;
}

.blog-content iframe,
.blog-content .video-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    margin: 1.5em 0;
    border: none;
}

/* Prose alias (backwards compat) */
.prose { font-size: 1.1rem; line-height: 1.8; color: #475569; }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2rem; margin-bottom: 1rem; color: #0f172a; border-bottom: 2px solid #e2e8f0; padding-bottom: 0.4em; }
.prose h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.75rem; color: #1e293b; }
.prose p { margin-bottom: 1rem; line-height: 1.75; color: #475569; }
.prose ul, .prose ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: #2563eb; text-decoration: underline; }
.prose a:hover { color: #1d4ed8; }
.prose blockquote { border-left: 4px solid #2563eb; padding-left: 1rem; margin: 1.5rem 0; font-style: italic; color: #6b7280; background: #eff6ff; border-radius: 0 8px 8px 0; padding: 1em 1.25em; }
.prose img { border-radius: 0.75rem; margin: 1.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.75rem; text-align: left; }
.prose th { background: #f9fafb; font-weight: 600; }
.prose strong { color: #1e293b; font-weight: 600; }

/* --- Mobil finomhangolás --- */
@media (max-width: 640px) {
    .blog-content { font-size: 1rem; }
    .blog-content h2 { font-size: 1.4rem; }
    .blog-content h3 { font-size: 1.15rem; }
    .blog-content table { font-size: 0.85rem; }
    .blog-content th, .blog-content td { padding: 8px 10px; }
    .blog-content pre { font-size: 0.8rem; padding: 1em; }
}

/* --- Print stílus --- */
@media print {
    .no-print { display: none !important; }
    .hero-gradient, .gradient-bg { background: #1e3a8a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
