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

/* CSS variables for Day theme (Only Light mode) */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Box Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);

    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #4f46e5;
    --primary-hover: #3730a3;
    --primary-light: rgba(79, 70, 229, 0.1);
    
    --secondary: #059669;
    --secondary-hover: #047857;
    --secondary-light: rgba(5, 150, 105, 0.1);
    
    --accent: #0891b2;
    --accent-light: rgba(8, 145, 178, 0.1);
    --danger: #dc2626;
    --danger-light: rgba(220, 38, 38, 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    
    --adsense-bg: #f1f5f9;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.flex {
    display: flex;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--bg-surface-alt);
    padding: 5rem 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 0.5rem;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-secondary {
    background-color: var(--secondary-light);
    color: var(--secondary);
}

.badge-accent {
    background-color: var(--accent-light);
    color: var(--accent);
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Header & Navbar */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.navbar {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links .active {
    color: var(--primary);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }
[data-theme="light"] .theme-toggle-btn .sun-icon { display: none; }
[data-theme="light"] .theme-toggle-btn .moon-icon { display: block; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-glow);
    color: #ffffff;
}

.btn-secondary {
    background-color: var(--secondary);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
}

/* Footer Section */
.footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin: 1rem 0 1.5rem 0;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.social-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
}

.footer-column h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-disclaimer {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.8;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: var(--text-muted);
}

.footer-bottom-links a:hover {
    color: var(--primary);
}

/* Forms & Calculator Layouts */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-label span {
    color: var(--primary);
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface-alt);
    color: var(--text-primary);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Custom Range Slider */
.slider-container {
    margin: 1rem 0 1.5rem 0;
}

input[type="range"].slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    transition: background 450ms ease-in;
}

input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transition: var(--transition-smooth);
}

input[type="range"].slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Interactive Calculator Layout */
.calculator-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: start;
}

.calc-inputs {
    padding-right: 1rem;
}

.calc-results {
    background: var(--bg-surface-alt);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    text-align: center;
    position: sticky;
    top: 90px;
}

.result-main {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.result-val {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.1;
    margin: 0.5rem 0;
}

.result-lbl {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.calc-breakdown {
    text-align: left;
    margin-top: 1.5rem;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.breakdown-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
}

/* Dynamic SVG Donut Chart */
.chart-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem auto;
}

.chart-svg {
    transform: rotate(-90deg);
}

.chart-circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 16;
}

.chart-circle-val {
    fill: none;
    stroke: var(--primary);
    stroke-width: 16;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease-in-out;
}

.chart-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-label-val {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

/* Rates Dashboard */
.rates-dashboard {
    overflow-x: auto;
}

.rates-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.rates-table th, .rates-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.rates-table th {
    background-color: var(--bg-surface-alt);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

.rates-table tr:hover {
    background-color: var(--primary-light);
}

.rate-up {
    color: var(--danger);
    font-weight: 600;
}

.rate-down {
    color: var(--secondary);
    font-weight: 600;
}

/* AdSense Placements */
.adsense-placeholder {
    background-color: var(--adsense-bg);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.adsense-placeholder::before {
    content: 'Advertisement';
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* SILO Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 2.2fr 0.8fr;
    gap: 3rem;
}

.blog-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.widget-links li {
    margin-bottom: 0.5rem;
}

.widget-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
}

.widget-links a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

/* Article Styling */
.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem 0;
}

.article-content h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    margin: 2rem 0 1rem 0;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    background-color: var(--bg-surface-alt);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

/* CTA Banner inside articles */
.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0;
    box-shadow: var(--shadow-lg);
}

.cta-banner h3 {
    color: #ffffff;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.cta-banner .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Sticky widget toggler */
.sticky-widget-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    background-color: var(--primary);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
    border: none;
}

.sticky-widget-trigger:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* AI Chatbot Window */
.chat-window {
    position: fixed;
    bottom: 5.5rem;
    right: 2rem;
    width: 360px;
    height: 500px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.chat-header {
    background-color: var(--primary);
    color: #ffffff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-family: var(--font-heading);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.25rem;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.msg-bot {
    background-color: var(--bg-surface-alt);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg-user {
    background-color: var(--primary);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-surface-alt);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.chat-send {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-send:hover {
    background-color: var(--primary-hover);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    z-index: 1000;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cookie-btns {
    display: flex;
    gap: 1rem;
}

/* Hero Section */
.hero {
    padding: 7.5rem 0;
    background: linear-gradient(to right, rgba(248, 250, 252, 0.96) 35%, rgba(248, 250, 252, 0.7) 75%, rgba(248, 250, 252, 0.9)), url('../assets/luxury_modern_home_hero.png') no-repeat center center;
    background-size: cover;
    position: relative;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 520px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-calculator-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

/* Floating widgets or checkers */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

/* Category grid (Blog SILO) */
.category-card {
    border-left: 4px solid var(--primary);
}

.category-card-rates { border-left-color: #6366f1; }
.category-card-guides { border-left-color: #10b981; }
.category-card-credit { border-left-color: #f59e0b; }
.category-card-investment { border-left-color: #06b6d4; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .calculator-grid, .blog-layout, .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .calc-results {
        position: static;
    }
    
    .hero-content h1 {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        text-align: center;
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-content h1 {
        font-size: 2.25rem;
    }
}

/* Hide theme toggles (Day-only mode active) */
.theme-toggle-btn {
    display: none !important;
}
