/* =====================================================
   Nemzetközi Banki Utalás Útmutató - Frontend Stílusok
   ===================================================== */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-muted: #64748b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.3;
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Search Form */
.search-section {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group select {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group select:hover {
    border-color: var(--primary-color);
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Results Section */
.results-section {
    display: none;
}

.results-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Country Card */
.country-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.country-card-header {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.country-card-header.source {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.country-card-header.target {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.country-flag {
    font-size: 2rem;
}

.country-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.country-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.country-card-body {
    padding: 1.5rem;
}

/* Section */
.info-section {
    margin-bottom: 1.5rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

/* Account Format */
.format-item {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.format-item:last-child {
    margin-bottom: 0;
}

.format-type {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.format-description {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.format-example {
    font-family: 'Consolas', 'Monaco', monospace;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.format-length {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Required Fields */
.field-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.field-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.field-item:last-child {
    border-bottom: none;
}

.field-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.field-icon.required {
    background: var(--danger-color);
    color: white;
}

.field-icon.optional {
    background: var(--secondary-color);
    color: white;
}

.field-content {
    flex: 1;
}

.field-label {
    font-weight: 600;
    color: var(--text-color);
}

.field-help {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Notes Section */
.notes-section {
    margin-top: 1.5rem;
}

.note-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-item.INFO {
    background: #eff6ff;
    border-left: 4px solid var(--info-color);
}

.note-item.WARNING {
    background: #fffbeb;
    border-left: 4px solid var(--warning-color);
}

.note-item.FEES {
    background: #f0fdf4;
    border-left: 4px solid var(--success-color);
}

.note-item.TIME {
    background: #faf5ff;
    border-left: 4px solid #a855f7;
}

.note-item.REGULATION,
.note-item.SANCTIONS {
    background: #fef2f2;
    border-left: 4px solid var(--danger-color);
}

.note-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.note-content {
    flex: 1;
    font-size: 0.95rem;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 3rem;
}

.loading.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
.error-message {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    color: var(--danger-color);
    text-align: center;
}

.error-message.active {
    display: block;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.footer p {
    margin: 0.5rem 0;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.badge-sepa {
    background: #dbeafe;
    color: #1e40af;
}

.badge-iban {
    background: #dcfce7;
    color: #166534;
}

/* =====================================================
   Detected Country Banner
   ===================================================== */
.detected-country-banner {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    overflow: hidden;
}

.detected-country-banner.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.detected-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.detected-flag {
    font-size: 2rem;
}

.detected-text {
    flex: 1;
    min-width: 200px;
}

.detected-text strong {
    color: #fef08a;
}

.detected-country-banner .btn {
    white-space: nowrap;
}

.detected-country-banner .btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.5);
    color: white;
}

.detected-country-banner .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* =====================================================
   Vertical Transfer Layout (New Design)
   ===================================================== */

/* Transfer Block - Common */
.transfer-block {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Source Block (Kiinduló ország) */
.source-block {
    border: 2px solid #dbeafe;
}

.source-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

/* Nagy zászló ikon */
.country-flag-large {
    font-size: 3.5rem;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

/* Twemoji képek méretezése */
img.emoji {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.1em;
    display: inline-block;
}

/* Nagy zászló ikonok */
.country-flag-large img.emoji {
    width: 3rem;
    height: 3rem;
}

/* Rendszer és figyelmeztetés ikonok */
.system-icon img.emoji {
    width: 1.5rem;
    height: 1.5rem;
}

.warning-icon img.emoji {
    width: 1.5rem;
    height: 1.5rem;
}

/* Címsor és meta ikonok normál méret */
.source-currency img.emoji,
.target-currency img.emoji,
.required-fields-section h3 img.emoji {
    width: 1.2em;
    height: 1.2em;
}

.source-info {
    flex: 1;
}

.source-label {
    font-size: 0.85rem;
    color: #1e40af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-country-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0.25rem 0;
}

.source-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.source-currency {
    font-size: 0.95rem;
    color: #334155;
}

.source-badges {
    display: flex;
    gap: 0.5rem;
}

/* Vertical Arrow */
.transfer-arrow-vertical {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}

.arrow-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.arrow-circle svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

/* Target Block (Célország) */
.target-block {
    border: 2px solid #dcfce7;
}

.target-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}


.target-info {
    flex: 1;
}

.target-label {
    font-size: 0.85rem;
    color: #166534;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.target-country-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #14532d;
    margin: 0.25rem 0;
}

.target-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.target-currency {
    font-size: 0.95rem;
    color: #334155;
}

.target-badges {
    display: flex;
    gap: 0.5rem;
}

/* Target Body */
.target-body {
    padding: 2rem;
}

/* System Info */
.system-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.system-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    flex: 1;
    min-width: 250px;
}

.system-item.sepa {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.system-item.iban {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.system-item.other {
    background: #fefce8;
    border: 1px solid #fef08a;
}

.system-icon {
    font-size: 1.5rem;
}

.system-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.system-text strong {
    font-size: 0.95rem;
    color: var(--text-color);
}

.system-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Currency Warning */
.currency-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.currency-warning .warning-icon {
    font-size: 1.5rem;
}

.currency-warning span:last-child {
    font-size: 0.95rem;
    color: #92400e;
    line-height: 1.5;
}

/* Account Format Highlight */
.account-format-highlight {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.format-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.format-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.format-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.format-details {
    padding-left: 0;
}

.format-desc {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.format-example-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.example-code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    background: transparent;
    letter-spacing: 2px;
    text-align: center;
}

.format-requirements {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 0.5rem;
}

.requirements-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.requirements-detail {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Other Formats */
.other-formats {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.other-formats-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.other-format-item {
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.other-format-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.other-format-item code {
    font-family: 'Consolas', monospace;
    background: white;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Required Fields Section */
.required-fields-section {
    margin-top: 1.5rem;
}

.required-fields-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.fields-group {
    margin-bottom: 1.5rem;
}

.fields-group:last-child {
    margin-bottom: 0;
}

.fields-group h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.group-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.group-icon.required {
    background: var(--danger-color);
}

.group-icon.optional {
    background: var(--secondary-color);
}

.fields-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fields-group h4.required-title,
.fields-group h4.optional-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.field-item-new {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    background: #f8fafc;
    border-left: 3px solid var(--primary-color);
}

.field-item-new.optional {
    background: #f8fafc;
    border-left: 3px solid var(--secondary-color);
}

.field-bullet {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background: var(--primary-color);
    flex-shrink: 0;
}

.field-bullet.optional {
    background: var(--secondary-color);
}

.field-content-new {
    flex: 1;
}

.field-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.05rem;
}

.field-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.5;
}

/* General Note */
.general-note {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1.5rem;
}

.general-note p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Responsive Vertical Layout */
@media (max-width: 768px) {
    .source-header,
    .target-header {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    
    .country-flag-large {
        font-size: 3rem;
    }
    
    .source-country-name,
    .target-country-name {
        font-size: 1.5rem;
    }
    
    .source-meta,
    .target-meta {
        justify-content: center;
    }
    
    .target-body {
        padding: 1.25rem;
    }
    
    .system-info {
        flex-direction: column;
    }
    
    .system-item {
        min-width: 100%;
    }
    
    .arrow-circle {
        width: 60px;
        height: 60px;
    }
    
    .arrow-circle svg {
        width: 28px;
        height: 28px;
    }
    
    .format-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .format-example-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =====================================================
   Recent Searches (New Design)
   ===================================================== */
.recent-searches {
    display: none;
    margin-top: 2rem;
}

.recent-searches.active {
    display: block;
}

.recent-searches-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.recent-searches-card h3 {
    padding: 1rem 1.5rem;
    margin: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    color: var(--text-color);
}

.recent-searches-list {
    padding: 0.5rem;
}

.recent-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.recent-search-item:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #f5f0ff 100%);
}

.recent-search-countries {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recent-search-country {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recent-search-iso {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.recent-search-name {
    font-weight: 500;
    color: var(--text-color);
}

.recent-search-arrow {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: bold;
}

.recent-search-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Responsive Recent Searches */
@media (max-width: 600px) {
    .recent-search-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .recent-search-time {
        align-self: flex-end;
    }
    
    .detected-banner-content {
        padding: 1rem;
        justify-content: center;
        text-align: center;
    }
    
    .detected-text {
        width: 100%;
    }
    
    .detected-country-banner .btn {
        flex: 1;
    }
}

/* =====================================================
   Blog Section
   ===================================================== */
.blog-section {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    padding: 4rem 0;
    margin-top: 2rem;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.blog-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.blog-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    display: block;
    position: relative;
    height: 180px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-content {
    padding: 1.25rem;
}

.blog-card-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.blog-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-card-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.blog-card-link:hover {
    color: var(--secondary-color);
}

.blog-more {
    text-align: center;
    margin-top: 2rem;
}

/* Blog Responsive */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-section {
        padding: 2rem 0;
    }
    
    .blog-header h2 {
        font-size: 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .blog-card-image {
        height: 200px;
    }
}

/* Blog List Page */
.blog-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .blog-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-grid-3 {
        grid-template-columns: 1fr;
    }
}

.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.blog-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.blog-category-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.blog-category-tag.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.blog-category-tag .count {
    background: rgba(0,0,0,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

.blog-category-tag.active .count {
    background: rgba(255,255,255,0.2);
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.page-info {
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

/* Blog Article Page */
.header-compact {
    padding: 1rem 0;
}

.header-compact h1 {
    font-size: 1.5rem;
    margin: 0;
}

.container-narrow {
    max-width: 800px;
}

.article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.article-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.article-excerpt {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-featured-image {
    margin: 0 0 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

.article-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: var(--primary-color);
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius-lg);
}

.share-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.9;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-linkedin { background: #0a66c2; }

.article-back {
    text-align: center;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-excerpt {
        font-size: 1.1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-share {
        flex-wrap: wrap;
    }
}

/* =====================================================
   Előnézet Kártya - Főoldal keresési eredmény
   ===================================================== */

.preview-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #22c55e;
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
}

.preview-header {
    margin-bottom: 1.5rem;
}

.preview-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.preview-flag {
    font-size: 2rem;
}

.preview-country-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.preview-arrow {
    font-size: 1.5rem;
    color: #22c55e;
    font-weight: bold;
}

.preview-title {
    font-size: 1.5rem;
    color: #166534;
    margin: 0 0 0.5rem 0;
}

.preview-subtitle {
    font-size: 1rem;
    color: #4b5563;
    margin: 0;
}

.preview-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.preview-icon {
    font-size: 1.5rem;
}

.preview-item-content {
    display: flex;
    flex-direction: column;
}

.preview-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.preview-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.preview-feature {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    color: #166534;
    font-weight: 500;
}

.preview-cta {
    margin-top: 1rem;
}

.preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    background: #22c55e;
    border-color: #22c55e;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.preview-btn:hover {
    background: #16a34a;
    border-color: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

/* =====================================================
   Népszerű útvonalak - Kártyás design
   ===================================================== */

/* =====================================================
   Legutóbbi keresések - Egyszerű táblázat stílus
   ===================================================== */

.recent-searches-section {
    margin-top: 0;
}

.routes-list {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.routes-header {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.routes-header-from {
    flex: 1;
    text-align: left;
}

.routes-header-arrow {
    width: 44px;
    flex-shrink: 0;
}

.routes-header-to {
    flex: 1;
    text-align: right;
}

.route-row {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.route-row:last-child {
    border-bottom: none;
}

.route-row:hover {
    background: #f8fafc;
}

.route-from,
.route-to {
    font-size: 0.9rem;
    color: var(--text-color);
    flex: 1;
}

.route-from {
    text-align: left;
    font-weight: 500;
}

.route-to {
    text-align: right;
    color: var(--text-muted);
}

.route-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
}

.route-arrow svg {
    width: 18px;
    height: 18px;
    color: #cbd5e1;
}

.route-row:hover .route-arrow svg {
    color: var(--primary-color);
}

.route-row:hover .route-from,
.route-row:hover .route-to {
    color: var(--primary-color);
}

/* Két hasábos elrendezés wrapper */
.homepage-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

.homepage-widgets > #recent-searches,
.homepage-widgets > #banks-by-country {
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .homepage-widgets {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Közös widget stílus
   ===================================================== */

.recent-searches-section,
.banks-by-country-section {
    margin: 0 !important;
    padding: 0 !important;
}

.recent-searches-title,
.banks-section-title {
    display: block !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    margin: 0 0 0.5rem 0 !important;
    padding: 0 0 0 0.25rem !important;
    line-height: 1.5 !important;
    height: auto !important;
}

/* =====================================================
   Bankok országonként
   ===================================================== */

.banks-country-list {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Fejléc a bankok táblázathoz */
.banks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.bank-country-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.bank-country-row:last-child {
    border-bottom: none;
}

.bank-country-row:hover {
    background: #f8fafc;
}

.bank-country-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.bank-country-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.bank-country-row:hover .bank-country-name {
    color: var(--primary-color);
}

.bank-country-row:hover .bank-country-count {
    background: #e0e7ff;
    color: var(--primary-color);
}

.banks-view-all {
    display: block;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    text-decoration: none;
    border-top: 1px solid #e2e8f0;
    background: #fafbfc;
    transition: background 0.15s;
}

.banks-view-all:hover {
    background: #f0f4ff;
}

@media (max-width: 768px) {
    #recent-searches.active > .recent-searches-section,
    #recent-searches.active > .banks-by-country-section {
        max-width: 100%;
    }
    
    .recent-searches-section {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .popular-routes-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .route-card-content {
        padding: 1.25rem 0.75rem;
        gap: 0.75rem;
    }
    
    .route-flag {
        font-size: 2rem;
    }
    
    .route-name {
        font-size: 0.85rem;
    }
    
    .route-arrow-svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 768px) {
    .preview-card {
        padding: 1.5rem;
    }
    
    .preview-title {
        font-size: 1.25rem;
    }
    
    .preview-summary {
        grid-template-columns: 1fr 1fr;
    }
    
    .preview-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobilon csak zászlók, országnév nélkül */
    .preview-country-name {
        display: none;
    }
    
    .preview-route {
        gap: 0.5rem;
    }
    
    .preview-flag {
        font-size: 2.5rem;
    }
    
    .preview-arrow {
        font-size: 1.25rem;
    }
}
