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

:root {
    /* Primary Color Palette (Red-based) */
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --primary-light: #fca5a5;
    --primary-gradient: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    
    /* Cooling Palette */
    --cooling-blue: #0ea5e9;
    --cooling-gradient: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    
    /* Neutral Palette - Light mode */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Reset & Single Row Layout */
header {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
}

.nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
}

.logo {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.nav-links {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
}

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

.theme-toggle {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.theme-toggle-btn {
    background: var(--border);
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: radial-gradient(circle at 70% 20%, rgba(239, 68, 68, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 30% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 40%);
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-2px);
}

/* Calculator Card */
.calc-container {
    max-width: 900px;
    margin: -4rem auto 4rem;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.calc-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

input {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Results Card */
.results-card {
    background: var(--bg-main);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
}

.result-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

/* Featured Section */
.featured {
    padding: 6rem 0;
}

.featured-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.featured-image {
    background: var(--border);
    aspect-ratio: 1;
    border-radius: 2rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-image:hover img {
    transform: scale(1.05);
}

.featured-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.featured-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* SEO Content Section */
.seo-section {
    padding: 6rem 0;
    background: var(--bg-main);
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
}

.seo-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.seo-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* FAQs */
.faq-section {
    padding: 6rem 0;
}

.faq-grid {
    display: grid;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    cursor: pointer;
}

.faq-question {
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    margin-top: 1rem;
    color: var(--text-muted);
    display: none;
}

/* Contact Page Styles */
.contact-container {
    max-width: 600px;
    margin: 4rem auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    background: var(--bg-card);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

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

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

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

.disclaimer-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    font-style: italic;
}

/* Animations */
[data-animate] {
    opacity: 0;
    transition: var(--transition);
}

[data-animate="fade-up"] {
    transform: translateY(20px);
}

.animate-in {
    opacity: 1;
    transform: translateY(0) !important;
}

/* Theme Toggle specifics */
.sun-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .calc-grid, .featured-row, .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .calc-container {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }
}
