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

:root {
  --primary-color: #2563eb; /* High Contrast Blue */
  --primary-hover: #1d4ed8;
  --secondary-color: #10B981;
  --accent-color: #6366f1; /* Indigo Accent */
  --text-main: #0f172a; /* Slate 900 */
  --text-muted: #64748b;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 70px;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  padding-bottom: 80px; /* Space for bottom nav */
}

body.loaded {
  opacity: 1;
  transform: translateY(0);
}

body.menu-open {
    overflow: hidden;
}

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
    h2 {
        font-size: 2.25rem;
    }
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.text-muted {
  color: var(--text-muted);
}

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

/* Header */
/* Header & Glassmorphism */
header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.05);
  text-decoration: none;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-nav-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 10px;
    transition: var(--transition);
}

/* Nav Links - Responsive Dropdown */
.nav-links {
  display: flex;
  gap: 2rem;
}

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

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

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        max-height: 400px;
        padding: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 1rem 2rem;
        width: 100%;
        color: var(--text-main);
        display: block;
    }
    
    .nav-links a:hover {
        background-color: #f8fafc;
        color: var(--primary-color);
    }
}

/* Bottom Nav */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0 1rem;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: var(--transition);
    flex: 1;
}

.bottom-nav-link span {
    font-size: 1.5rem;
}

.bottom-nav-link.active {
    color: var(--primary-color);
}

.bottom-nav-link:active {
    transform: scale(0.9);
}

/* Responsive Grid Adjustments */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        margin: 0 auto;
    }
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(rgba(10, 15, 30, 0.8), rgba(10, 15, 30, 0.8)), 
              url('../images/hero-bg-sharp.png');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 8rem 0; /* Slightly more padding for a grander look */
  text-align: center;
  overflow: hidden;
}

/* Add a glowing effect to the hero content */
.hero h1 {
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 0;
    }
}

.hero h1 {
  color: white;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.04em;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.search-container {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
}

.search-bar {
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 8px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.search-bar:focus-within {
    box-shadow: 0 15px 40px -5px rgba(99, 102, 241, 0.4);
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.5);
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    background: transparent;
    color: var(--text-main);
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(15, 23, 42, 0.6);
    font-weight: 500;
}

.search-bar button {
    padding: 0.8rem 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #4f46e5); /* Indigo theme to match hero */
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.search-bar button:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

@media (max-width: 480px) {
    .search-bar {
        padding: 4px;
        border-radius: var(--radius-md);
    }
    .search-bar input {
        padding: 0.6rem 0.8rem;
        font-size: 1rem;
    }
    .search-bar button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* App-like Refinements */
.calc-card {
  background: var(--bg-card);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.calc-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.calc-icon {
  background-color: #f5f3ff;
  color: var(--primary-color);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.btn-primary {
  background: var(--primary-color);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.calculator-tool {
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: var(--transition);
}

@media (min-width: 768px) {
    .calculator-tool {
        padding: 2.5rem;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: #fff;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-calc {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-calc:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .calculator-tool {
        padding: 3rem;
    }
}

/* Ad Banner Professionalization (Google Ads Ready) */
.ad-banner {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 2.5rem auto;
    max-width: 900px;
    min-height: 100px;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ad-banner::before {
    content: "ADVERTISEMENT";
    position: absolute;
    top: -10px;
    left: 1rem;
    background: var(--bg-main);
    padding: 0 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.ad-banner p {
    margin: 0;
    font-size: 0.85rem;
}

.category-block {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.category-block:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-block h3 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
}

.category-block ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-block a {
    color: var(--text-main);
    font-weight: 500;
    display: block;
    padding: 4px 0;
}

.category-block a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.result-box {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: none;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-box.active {
    display: block;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-value {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.result-value .value {
    display: inline-block;
    min-width: 1ch;
}

.result-value .label {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 0.75rem;
    -webkit-text-fill-color: var(--text-muted);
}

.result-label {
  font-weight: 600;
  color: var(--text-main);
}

/* Article / Explanation Section */
.content-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.content-section * + h2,
.content-section * + h3 {
  margin-top: 2.5rem;
}

.content-section ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

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

/* Styled Tables for Charts */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.data-table th {
  background-color: #f9fafb;
  font-weight: 600;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* FAQs */
.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.faq-answer {
  color: var(--text-muted);
}

/* Footer */
footer {
  background-color: white;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-col h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.launchone-link {
  text-decoration: none !important;
  color: inherit !important;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.launchone-link:hover {
  text-decoration: underline !important;
  color: var(--primary-color) !important;
}

/* Premium Widget Styles for Calculator Icons */
.calc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
    color: #4f46e5;
    border-radius: 16px;
    transition: var(--transition);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.calc-card:hover .calc-icon {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.calc-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 2.5;
}

/* Search Result Widget Icons */
.search-results a .icon { 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(99, 102, 241, 0.08); 
    color: #4f46e5;
    border-radius: 10px;
    transition: var(--transition);
}

.search-results a .icon svg {
    width: 20px;
    height: 20px;
}

.search-results a:hover .icon, 
.search-results a.search-active .icon { 
    background: #6366f1;
    color: #fff;
    transform: scale(1.05) rotate(-3deg); 
}
