
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; font-size: 14px; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
h1, h2, h3, h4 { color: var(--primary); font-weight: 700; line-height: 1.25; }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade { animation: fadeIn 0.6s ease-out forwards; }

/* HEADER */
header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.header-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 20px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.nav-links a:hover { color: var(--accent); }

/* HERO */
.hero { background: linear-gradient(180deg, var(--card-bg) 0%, var(--bg-color) 100%); padding: 60px 20px; border-bottom: 1px solid var(--border); text-align: center; }
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: 36px; margin-bottom: 16px; color: var(--primary); letter-spacing: -1px; }
.hero p { font-size: 16px; color: var(--text-muted); margin-bottom: 0; line-height: 1.5; }

/* CONTAINER */
.container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.section-title { font-size: 22px; margin-bottom: 24px; color: var(--primary); }

/* INTRO TEXT BLOCK */
.intro-block { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 40px; box-shadow: var(--shadow-sm); }
.intro-block h2 { font-size: 18px; margin-bottom: 12px; }
.intro-block p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.intro-block p:last-child { margin-bottom: 0; }

/* BROKER LIST (Modern & Compact) */
.broker-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 50px; }
.broker-item { display: flex; align-items: center; background: var(--card-bg); border-radius: var(--radius); padding: 16px 24px; border: 1px solid var(--border); transition: var(--transition); box-shadow: var(--shadow-sm); }
.broker-item:hover { box-shadow: var(--shadow-hover); border-color: #cbd5e1; transform: translateY(-2px); }

.b-rank { font-size: 16px; font-weight: 700; color: #94a3b8; width: 32px; }
.b-logo-wrap { width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--border); display: flex; justify-content: center; align-items: center; padding: 4px; margin-right: 20px; flex-shrink: 0; background: #fff;}
.b-logo-wrap img { max-width: 100%; max-height: 100%; border-radius: 4px; object-fit: contain; }

.b-main-info { flex: 1.5; display: flex; flex-direction: column; }
.b-main-info h3 { font-size: 16px; margin-bottom: 2px; }
.b-main-info .b-type { font-size: 12px; color: var(--text-muted); }

.b-stats { flex: 2; display: flex; justify-content: flex-start; gap: 40px; }
.b-stat-block span { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px;}
.b-stat-block strong { font-size: 14px; color: var(--primary); font-weight: 600;}

.b-rating-wrap { width: 80px; text-align: center; }
.rating-badge { font-weight: 600; color: #b45309; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; background: #fef3c7; padding: 6px 12px; border-radius: 20px;}

.b-actions { flex: 1.2; display: flex; justify-content: flex-end; gap: 10px; }
.btn { display: inline-flex; justify-content: center; align-items: center; padding: 10px 18px; border-radius: 8px; font-weight: 500; font-size: 13px; transition: var(--transition); cursor: pointer; text-align: center;}
.btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; border: none; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }
.btn-primary:hover { box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text-muted); background: var(--bg-color); }

/* FAQ SECTION */
.faq-section { margin-top: 40px; }
.faq-list { display: flex; flex-direction: column; gap: 16px; }
.faq-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-sm);}
.faq-item h3 { font-size: 15px; margin-bottom: 8px; color: var(--primary); }
.faq-item p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* BROKER DETAIL PAGE */
.breadcrumb { margin-bottom: 24px; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--accent); }

.broker-header-block { background: var(--card-bg); border-radius: var(--radius); padding: 30px; border: 1px solid var(--border); margin-bottom: 30px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm);}
.bh-left { display: flex; align-items: center; gap: 24px; }
.bh-logo { width: 80px; height: 80px; border-radius: 12px; border: 1px solid var(--border); padding: 6px; object-fit: contain; background: #fff;}
.bh-info h1 { font-size: 28px; margin-bottom: 8px; letter-spacing: -0.5px;}
.bh-tags { display: flex; gap: 8px; flex-wrap: wrap;}
.bh-tag { background: var(--bg-color); border: 1px solid var(--border); padding: 4px 12px; border-radius: 6px; font-size: 12px; color: var(--text-muted); font-weight: 500;}

.broker-layout { display: grid; grid-template-columns: 2.5fr 1fr; gap: 30px; }
.content-card { background: var(--card-bg); border-radius: var(--radius); padding: 32px; border: 1px solid var(--border); box-shadow: var(--shadow-sm);}
.content-card h2 { font-size: 20px; margin: 30px 0 16px; border-bottom: 1px solid var(--bg-color); padding-bottom: 10px; }
.content-card h2:first-child { margin-top: 0; }
.content-card p { margin-bottom: 16px; color: var(--text-main); font-size: 15px; line-height: 1.7; }
.content-card ul { margin: 0 0 16px 20px; font-size: 15px; color: var(--text-main); }
.content-card li { margin-bottom: 8px; }
blockquote { border-left: 4px solid var(--accent); background: var(--bg-color); padding: 16px 20px; margin: 24px 0; font-style: italic; font-size: 15px; color: var(--text-main); border-radius: 0 8px 8px 0; }

.sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--card-bg); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-sm);}
.widget h3 { font-size: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px;}
.w-stat { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px dashed var(--border); padding-bottom: 8px;}
.w-stat:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0;}
.w-label { color: var(--text-muted); font-size: 13px; }
.w-val { font-weight: 600; color: var(--primary); font-size: 14px; }

/* PROS CONS */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 30px 0; }
.pc-box { padding: 20px; border-radius: 8px; border: 1px solid var(--border); }
.pc-box.pros { background: #f0fdf4; border-color: #bbf7d0; }
.pc-box.cons { background: #fef2f2; border-color: #fecaca; }
.pc-box h4 { font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.pc-box.pros h4 { color: #15803d; }
.pc-box.cons h4 { color: #b91c1c; }
.pc-box ul { margin: 0; list-style: none;}
.pc-box li { font-size: 14px; margin-bottom: 10px; color: var(--text-main); display: flex; align-items: flex-start; gap: 8px; line-height: 1.5;}
.pc-box.pros li::before { content: '✓'; color: #15803d; font-weight: bold;}
.pc-box.cons li::before { content: '✕'; color: #b91c1c; font-weight: bold;}

/* REVIEWS */
.reviews-wrap { margin-top: 30px; }
.reviews-wrap h2 { font-size: 20px; margin-bottom: 20px; }
.review-card { padding: 20px; border-bottom: 1px solid var(--border); display: flex; gap: 16px; }
.review-card:last-child { border-bottom: none; }
.r-avatar { width: 44px; height: 44px; background: var(--bg-color); border: 1px solid var(--border); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.r-content { flex: 1; }
.r-header { display: flex; justify-content: space-between; margin-bottom: 6px; align-items: center;}
.r-name { font-weight: 600; font-size: 15px;}
.r-date { font-size: 12px; color: var(--text-muted); }
.r-stars { color: #f59e0b; font-size: 14px; margin-bottom: 8px; letter-spacing: 2px;}
.r-text { color: var(--text-main); font-size: 14px; line-height: 1.6; }

/* FOOTER */
footer { background: var(--card-bg); border-top: 1px solid var(--border); padding: 50px 20px 30px; margin-top: 60px; color: var(--text-main); }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px;}
.f-col h4 { color: var(--primary); font-size: 15px; margin-bottom: 16px; font-weight: 600; }
.f-col ul { list-style: none; }
.f-col li { margin-bottom: 10px; font-size: 14px; color: var(--text-muted);}
.f-col a:hover { color: var(--accent); }
.f-logo { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 12px; display: inline-block; letter-spacing: -0.5px;}
.f-logo span { color: var(--accent); }
.f-bottom { text-align: center; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 24px; }

/* ========================================= */
/* MEDIA QUERIES FOR FULL RESPONSIVENESS     */
/* ========================================= */

/* TABLETS (Max 1024px) */
@media (max-width: 1024px) {
    .broker-layout { grid-template-columns: 2fr 1fr; gap: 20px; }
    .b-stats { gap: 20px; }
    .b-actions { flex-direction: column; gap: 8px; }
    .btn { padding: 8px 12px; font-size: 12px; }
}

/* MOBILE PHONES (Max 768px) */
@media (max-width: 768px) {
    /* Header */
    .header-container { flex-direction: column; height: auto; padding: 15px 20px; gap: 15px; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 16px; }

    /* Hero */
    .hero { padding: 40px 15px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 14px; }

    /* General */
    .container { padding: 30px 15px; }
    .section-title { font-size: 20px; margin-bottom: 20px; }

    /* Broker List */
    .broker-item { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
    .b-rank { display: none; /* Hide rank on mobile to save space */ }
    
    .b-logo-wrap { margin-right: 0; margin-bottom: 10px; }
    .b-main-info { align-items: center; text-align: center; }
    
    .b-stats { flex-direction: row; justify-content: space-between; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 15px 0; margin: 10px 0; width: 100%;}
    .b-stat-block { text-align: center; width: 50%; }
    
    .b-rating-wrap { width: 100%; text-align: center; margin-bottom: 10px; }
    
    .b-actions { flex-direction: row; justify-content: space-between; width: 100%; gap: 10px; }
    .btn { flex: 1; text-align: center; padding: 12px; }

    /* Detail Page */
    .broker-layout { grid-template-columns: 1fr; gap: 30px; }
    .sidebar { position: static; }
    
    .broker-header-block { flex-direction: column; text-align: center; gap: 20px; padding: 20px; }
    .bh-left { flex-direction: column; gap: 15px; }
    .bh-tags { justify-content: center; }
    .bh-right { width: 100%; }
    .bh-right .btn { width: 100%; max-width: 100%; }

    .content-card { padding: 20px; }
    .content-card h2 { font-size: 18px; }
    .pros-cons { grid-template-columns: 1fr; gap: 15px; }
    
    .review-card { flex-direction: column; gap: 12px; }
    .r-avatar { display: none; } /* Simplify review on mobile */

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .f-col:first-child { grid-column: span 2; text-align: center; }
    .f-logo { margin: 0 auto 12px; }
    .f-col:first-child p { margin: 0 auto; }
}

/* SMALL MOBILE (Max 480px) */
@media (max-width: 480px) {
    .nav-links { display: none; /* Can be replaced with a hamburger menu later, hiding for extreme small screens for simplicity */ }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .f-col:first-child { grid-column: span 1; }
    .b-actions { flex-direction: column; }
}
