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

:root {
  /* Main Variables */
  --color-white: rgba(255, 255, 255, 1);
  --color-cream-50: rgba(252, 252, 249, 1);
  --color-cream-100: rgba(255, 255, 253, 1);
  --color-slate-500: #64748b;
  --color-slate-900: #0f172a;
  --color-teal-500: rgba(33, 128, 141, 1);
  --color-teal-600: rgba(29, 116, 128, 1);
  --color-error: #ef4444;

  --color-bg-1: #e0e7ff;
  --color-bg-2: #fef3c7;
  --color-bg-3: #dcfce7;
  
  /* Missing Variables imported from Secondary CSS */
  --color-black: rgba(0, 0, 0, 1);
  --color-gray-200: rgba(245, 245, 245, 1);
  --color-gray-300: rgba(167, 169, 169, 1);
  --color-gray-400: rgba(119, 124, 124, 1);
  --color-brown-600: rgba(94, 82, 64, 1);
  --color-charcoal-700: rgba(31, 33, 33, 1);
  --color-charcoal-800: rgba(38, 40, 40, 1);
  --color-teal-300: rgba(50, 184, 198, 1);
  --color-teal-400: rgba(45, 166, 178, 1);
  --color-teal-700: rgba(26, 104, 115, 1);
  --color-teal-800: rgba(41, 150, 161, 1);
  --color-red-400: rgba(255, 84, 89, 1);
  --color-red-500: rgba(192, 21, 47, 1);
  --color-orange-400: rgba(230, 129, 97, 1);
  --color-orange-500: rgba(168, 75, 47, 1);
  --color-bg-4: rgba(239, 68, 68, 0.08);

  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: #1e40af;
  --color-primary-hover: #1e3a8a;
  --color-border: #e2e8f0;
  --color-card-border: rgba(94, 82, 64, 0.12);
  
  --font-family-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Added font sizing system from Secondary */
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;

  --radius-base: 8px;
  --radius-md: 12px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --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);
  
  --duration-normal: 250ms;
  --container-lg: 1024px;
}

/* Base styles (merged with secondary improvements) */
html { font-size: 16px; font-family: var(--font-family-base); line-height: 1.7; color: var(--color-text); background-color: var(--color-background); scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { margin: 0; padding: 0; padding-top: 75px; }
*, *::before, *::after { box-sizing: border-box; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; color: var(--color-primary); letter-spacing: -0.02em; }
h1 { font-size: 38px; margin-bottom: 24px; }
h2 { font-size: 28px; margin-top: 48px; margin-bottom: 24px; border-bottom: 2px solid var(--color-bg-1); padding-bottom: 10px; }
h3 { font-size: 22px; margin-top: 32px; margin-bottom: 16px; color: var(--color-text); }
h4 { font-size: 18px; margin-bottom: 12px; }
p { margin: 0 0 20px 0; font-size: 17px; color: #334155; }
a { color: var(--color-primary); text-decoration: none; transition: all 0.2s; font-weight: 500; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
ul, ol { margin-bottom: 24px; padding-left: 24px; font-size: 17px; color: #334155; }
li { margin-bottom: 10px; }

.container { width: 100%; margin: 0 auto; padding: 0 20px; max-width: var(--container-lg); }

/* Buttons (Kept Main Design) */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: var(--radius-base); font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s; border: none; text-decoration: none; box-shadow: var(--shadow-sm); }
.btn--primary { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover)); color: #ffffff; }
.btn--outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); box-shadow: none; }
.btn:hover, .btn--outline:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn--primary:hover { color: #ffffff !important; text-decoration: none !important; }
.btn--outline:hover { background: var(--color-primary); color: #ffffff !important; }
.btn--lg { padding: 16px 32px; font-size: 18px; border-radius: var(--radius-md); }

/* Navigation & Search (Kept Main Design) */
.navbar { border-bottom: 1px solid var(--color-border); position: fixed; top: 0; left: 0; right: 0; z-index: 1000; box-shadow: var(--shadow-sm); transition: all 0.3s ease; background: rgba(255, 255, 253, 0.98); backdrop-filter: blur(10px); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; flex-wrap: wrap; }
.nav-brand { font-weight: bold; font-size: 24px; color: var(--color-primary); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.nav-menu { display: flex; gap: 28px; align-items: center; }
.nav-link { color: var(--color-text-secondary); font-weight: 600; font-size: 16px; padding: 8px 0; position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--color-primary); transition: width 0.3s ease; }
.nav-link.active, .nav-link:hover { color: var(--color-primary); text-decoration: none; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-search { display: flex; align-items: center; background: white; border-radius: var(--radius-full); padding: 8px 18px; border: 1px solid #cbd5e1; transition: border-color 0.3s, box-shadow 0.3s; }
.nav-search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1); }
.search-input { border: none; background: transparent; outline: none; font-size: 14px; color: var(--color-text); width: 180px; }
.search-btn { background: none; border: none; cursor: pointer; font-size: 16px; padding: 0; }

.nav-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; padding: 5px; }
.nav-toggle span { width: 28px; height: 3px; background: var(--color-primary); transition: 0.3s; border-radius: 2px;}
.nav-toggle.active span:nth-child(1) { transform: rotate(-45deg) translate(-6px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(45deg) translate(-6px, -6px); }

/* Search Results Overlay */
#search-results-modal { display: none; position: fixed; top: 70px; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 253, 0.98); z-index: 999; padding: 40px 20px; overflow-y: auto; backdrop-filter: blur(5px); }
#search-results-modal.active { display: block; animation: fadeIn 0.3s ease; }
.search-result-item { background: white; margin-bottom: 20px; padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: transform 0.2s; max-width: 800px; margin-left: auto; margin-right: auto;}
.search-result-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.close-search-btn { position: absolute; top: 20px; right: 20px; background: #fef2f2; color: var(--color-error); border: 1px solid #fca5a5; padding: 10px 20px; border-radius: var(--radius-base); cursor: pointer; font-weight: bold; font-size: 16px; transition: all 0.2s;}
.close-search-btn:hover { background: var(--color-error); color: white; }

/* Main Layout & Sections */
.page { display: block; min-height: calc(100vh - 70px); padding-bottom: 60px; }

/* Hero Section */
.hero { background: linear-gradient(135deg, #f0fdfa 0%, #e0e7ff 100%); padding: 90px 0; text-align: center; border-bottom: 1px solid var(--color-border); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 60%); z-index: 0; }
.hero-content { max-width: 850px; margin: 0 auto; position: relative; z-index: 1; }
.hero-title { font-size: 46px; margin-bottom: 24px; border: none; line-height: 1.2;}
.hero-description { font-size: 20px; margin-bottom: 32px; color: #475569; }
.hero-actions { display: flex; gap: 20px; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }
.badge { background: white; padding: 8px 18px; border-radius: var(--radius-full); font-size: 14px; font-weight: 600; color: var(--color-primary); border: 1px solid #cbd5e1; box-shadow: var(--shadow-sm);}

/* --- IMPORTED FROM SECONDARY CSS: ARTICLE / BLOG STYLES --- */
.article-header { background: linear-gradient(135deg, var(--color-bg-1) 0%, var(--color-bg-3) 100%); padding: 80px 0; text-align: center; border-bottom: 1px solid var(--color-border); margin-bottom: 40px; }
.article-header h1 { max-width: 900px; margin: 0 auto 20px; }
.article-meta { color: var(--color-text-secondary); font-size: 15px; display: flex; justify-content: center; gap: 20px; }
.article-meta span { display: flex; align-items: center; gap: 6px; }

.article-content { max-width: 850px; margin: 0 auto; background: var(--color-surface); padding: 48px; border-radius: var(--radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.article-content ul, .article-content ol { margin-bottom: 24px; padding-left: 24px; }
.article-content li { margin-bottom: 12px; font-size: 17px; line-height: 1.8; color: #334155; }
.article-content strong { color: var(--color-text); font-weight: 600; }

.data-stat { display: inline-block; background: var(--color-bg-2); border: 1px solid #f97316; color: #c2410c; padding: 4px 12px; border-radius: var(--radius-full); font-weight: 600; font-size: 14px; margin-bottom: 16px; }

.article-cta { text-align: center; padding: 48px 32px; background: linear-gradient(135deg, #1e40af 0%, var(--color-primary) 100%); border-radius: var(--radius-lg); margin-top: 60px; color: white; }
.article-cta h2 { color: white; border: none; margin-top: 0; }
.article-cta p { color: rgba(255,255,255,0.9); font-size: 18px; margin-bottom: 32px; }
.article-cta .btn--primary { background: white; color: #1e40af !important; border: 2px solid white; }
.article-cta .btn--primary:hover { background: transparent; color: white !important; border-color: white; }

.dmca-badge { margin-top: 10px; display: inline-block; }
/* ------------------------------------------------------------ */

/* Content Container (Main Style) */
.main-article { max-width: 900px; margin: 60px auto; background: white; padding: 50px 60px; border-radius: var(--radius-md); box-shadow: 0 4px 20px rgba(0,0,0,0.03); border: 1px solid var(--color-border); }

/* Custom Formatting Boxes */
.info-card { background: #eff6ff; border-left: 5px solid var(--color-primary); padding: 24px; margin: 32px 0; border-radius: 0 12px 12px 0; }
.info-card h4 { margin-top: 0; margin-bottom: 12px; color: #1e40af; }
.info-card p:last-child { margin-bottom: 0; }

.tip-box { background: #f0fdf4; border: 1px solid #22c55e; border-radius: var(--radius-md); padding: 24px; margin: 32px 0; }
.tip-box h4 { color: #15803d; display: flex; align-items: center; gap: 8px; margin-top: 0; margin-bottom: 12px;}
.tip-box p:last-child { margin-bottom: 0; }

.warning-box { background: #fef2f2; border: 1px solid #ef4444; border-radius: var(--radius-md); padding: 24px; margin: 32px 0; }
.warning-box h4 { color: #b91c1c; }

/* Features Grid inside text */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 40px 0; }
.feature-card { background: white; padding: 32px; border-radius: var(--radius-md); border: 1px solid #e2e8f0; text-align: left; transition: all 0.3s; box-shadow: var(--shadow-sm); }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #cbd5e1;}
.feature-icon { font-size: 40px; margin-bottom: 16px; display: block;}

/* Comparison Table */
.comparison-table-wrapper { overflow-x: auto; margin: 40px 0; border-radius: var(--radius-md); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm);}
.comparison-table { width: 100%; border-collapse: collapse; background: white; }
.comparison-table th, .comparison-table td { padding: 20px; text-align: left; border-bottom: 1px solid var(--color-border); }
.comparison-table th { background: var(--color-primary); color: white; font-weight: 600; font-size: 18px;}
.comparison-table tr:nth-child(even) { background: #f8fafc; }
.comparison-table td:nth-child(2) { font-weight: 700; color: #059669; background: #f0fdf4; }

/* Internal Links Grid */
.internal-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 32px 0; }
.internal-link-card { background: white; border: 1px solid #cbd5e1; padding: 20px; border-radius: var(--radius-md); font-weight: 600; color: var(--color-primary); display: flex; align-items: center; gap: 14px; transition: all 0.3s; box-shadow: var(--shadow-sm);}
.internal-link-card:hover { background: var(--color-primary); color: white; transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none;}

/* Trust & Author Section */
.trust-section { background: #fffbeb; padding: 40px; border-radius: var(--radius-md); margin: 60px 0; border: 1px solid #fcd34d; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);}
.trust-section h3 { margin-top: 0; color: #b45309; border: none;}
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 24px; }
.trust-item { display: flex; align-items: center; gap: 12px; font-weight: 600; color: #334155; }

.author-box { display: flex; align-items: center; gap: 32px; padding: 36px; background: white; border-radius: var(--radius-md); border: 1px solid #e2e8f0; margin: 50px 0; box-shadow: var(--shadow-sm); }
.author-box img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 4px solid #e0e7ff; box-shadow: var(--shadow-sm);}
.author-info h3 { margin-top: 0; margin-bottom: 8px; border: none;}

/* FAQ Section (Main Style preserved, merged with blog specific logic) */
.faq-section, .faq-container { margin-top: 60px; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 16px; background: white; overflow: hidden; box-shadow: var(--shadow-sm);}
.faq-question { padding: 22px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin: 0; font-size: 18px; color: var(--color-primary); transition: background 0.2s; border-bottom: none;}
.faq-question:hover { background: #f8fafc; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; background: #f8fafc; }
.faq-item.active .faq-answer { max-height: 800px; border-top: 1px solid var(--color-border);}
.faq-answer p { padding: 24px; margin: 0; }
.faq-toggle { font-weight: 300; font-size: 28px; transition: transform 0.3s; line-height: 1; color: var(--color-primary);}
.faq-item.active .faq-toggle { transform: rotate(45deg); color: var(--color-error); }

/* Footer (Kept Main Dark Theme) */
.footer { background: #0f172a; border-top: 1px solid var(--color-border); padding: 70px 0 30px; margin-top: 80px; color: #cbd5e1; }
.footer h3 { color: white !important; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 50px; margin-bottom: 50px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #cbd5e1; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #60a5fa; text-decoration: none; padding-left: 5px;}
.social-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.social-links a { background: rgba(255,255,255,0.05); padding: 10px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); font-size: 14px; color: white; transition: all 0.2s; text-decoration: none;}
.social-links a:hover { background: var(--color-primary); border-color: var(--color-primary); transform: translateY(-3px);}
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Back to Top Button */
.back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--color-primary); color: white; border: none; border-radius: 50%; width: 55px; height: 55px; font-size: 24px; cursor: pointer; box-shadow: 0 10px 15px -3px rgba(30, 64, 175, 0.4); opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000; display: flex; align-items: center; justify-content: center; text-decoration: none;}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-primary-hover); transform: translateY(-5px); color: white; text-decoration: none;}

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

/* Responsive Media Queries Merged */
@media (max-width: 850px) {
  .nav-menu { position: fixed; top: 73px; left: 0; right: 0; background: rgba(255, 255, 253, 0.98); backdrop-filter: blur(10px); flex-direction: column; padding: 30px; transform: translateY(-100%); opacity: 0; visibility: hidden; transition: 0.3s ease; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-lg);}
  .nav-menu.active { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-toggle { display: flex; }
  .nav-search { margin-top: 20px; margin-left: 0; width: 100%; justify-content: space-between; }
  .search-input { width: 100%; font-size: 16px;}
  
  /* Both Main and Article Layout adjustments */
  .main-article { padding: 40px 25px; margin: 20px auto; border-radius: 0; border-left: none; border-right: none;}
  .article-content { padding: 24px 20px; }
  
  .hero-title { font-size: 36px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .author-box { flex-direction: column; text-align: center; }
}

.fade-in { opacity: 0; transform: translateY(20px); transition: 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
