@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');

:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Theme - Dark Mode Default */
    --bg-color: #090b11;
    --bg-glow-1: rgba(215, 33, 22, 0.03);
    --bg-glow-2: rgba(255, 71, 61, 0.03);
    --card-bg: rgba(17, 19, 31, 0.7);
    --card-hover-bg: rgba(23, 26, 42, 0.85);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Accents */
    --primary: #d72116;
    --primary-hover: #b81b10;
    --primary-rgb: 215, 33, 22;
    --secondary: #ff473d;
    --secondary-hover: #e12d22;
    --secondary-rgb: 255, 71, 61;
    
    --gradient-accent: linear-gradient(135deg, #d72116 0%, #ff473d 100%);
    --gradient-glow: linear-gradient(135deg, rgba(215, 33, 22, 0.15) 0%, rgba(255, 71, 61, 0.15) 100%);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 1px 0 rgba(255, 255, 255, 0.05) inset;
    --shadow-glow: 0 0 40px -10px rgba(215, 33, 22, 0.25);

    /* Category Colors */
    --category-convert-to: #3b82f6;
    --category-convert-from: #10b981;
    --category-edit: #f59e0b;
    --category-security: #ef4444;
}

body.light-theme {
    /* Theme - Light Mode */
    --bg-color: #f6f8fc;
    --bg-glow-1: rgba(194, 28, 18, 0.02);
    --bg-glow-2: rgba(225, 45, 34, 0.02);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-hover-bg: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Accents */
    --primary: #c21c12;
    --primary-hover: #a1140c;
    --primary-rgb: 194, 28, 18;
    --secondary: #e12d22;
    --secondary-hover: #c21c12;
    --secondary-rgb: 225, 45, 34;

    --gradient-accent: linear-gradient(135deg, #c21c12 0%, #e12d22 100%);
    --gradient-glow: linear-gradient(135deg, rgba(194, 28, 18, 0.06) 0%, rgba(225, 45, 34, 0.06) 100%);
    --shadow-premium: 0 10px 35px -10px rgba(194, 28, 18, 0.08), 0 1px 1px 0 rgba(255, 255, 255, 0.8) inset;
    --shadow-glow: 0 0 35px -10px rgba(194, 28, 18, 0.15);
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    background-image: 
        radial-gradient(at 10% 20%, var(--bg-glow-1) 0px, transparent 50%),
        radial-gradient(at 90% 80%, var(--bg-glow-2) 0px, transparent 50%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Header Navbar */
.header-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(var(--primary-rgb), 0.01);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.logo-link {
    display: flex;
    align-items: center;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-link:hover {
    transform: scale(1.03);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    -webkit-text-fill-color: #fff;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    width: 250px;
    display: none; /* Shown dynamically on desktop */
}

@media (min-width: 768px) {
    .search-wrapper {
        display: block;
    }
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.15);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
}

/* Theme Toggle Button */
.btn-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-toggle:hover {
    background: rgba(var(--primary-rgb), 0.1);
    transform: scale(1.05);
}

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

.light-theme-icon { display: none; }
body.light-theme .dark-theme-icon { display: none; }
body.light-theme .light-theme-icon { display: block; }

/* Grid Categories */
.category-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 12px;
}

/* Hero Section */
.hero-section {
    padding: 90px 20px 60px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

@media (max-width: 576px) {
    .hero-title { font-size: 32px; }
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 400;
}

/* Grid Tools Container */
.tools-grid-section {
    padding: 0 30px 60px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Card Styles */
.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card:hover {
    background: var(--card-hover-bg);
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.tool-card:hover::before {
    opacity: 1;
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    z-index: 1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.icon-svg {
    width: 24px;
    height: 24px;
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    z-index: 1;
}

.card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    z-index: 1;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Feature/FAQ Sections */
.features-section, .faqs-section, .testimonials-section, .newsletter-section {
    padding: 60px 30px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item[open] {
    border-color: var(--primary);
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    font-family: var(--font-heading);
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Footer styling */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 60px 30px 30px;
    background: rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-brand {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .footer-brand {
        grid-column: span 2;
    }
}

.footer-text {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-top: 15px;
    max-width: 300px;
}

.footer-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

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

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

/* Premium Gradient Button */
.btn-gradient {
    background: var(--gradient-accent);
    color: #fff !important;
    border: none;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.5);
}

.btn-gradient:active {
    transform: translateY(0);
}

/* Newsletter Input */
.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 20px auto 0;
}

.newsletter-input {
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
}

.newsletter-input:focus {
    border-color: var(--primary);
}

/* Category Headers Filter Bar */
.category-filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--primary);
    color: var(--text-primary);
    background: rgba(var(--primary-rgb), 0.08);
}

/* Floating Scroll to Top */
.btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 99;
}

.btn-scroll-top.visible {
    transform: scale(1);
    opacity: 1;
}

.btn-scroll-top svg {
    width: 20px;
    height: 20px;
}

/* Ads Space Wrapper */
.ads-banner-container {
    margin: 20px auto;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), 0.02);
    border: 1px dashed var(--border-color);
    max-width: 728px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Blog Page Styles */
.blog-featured-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .blog-featured-card {
        grid-template-columns: 1.2fr 1fr;
        padding: 40px;
    }
}

.blog-featured-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
    transform: translateY(-2px);
}

.blog-featured-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--gradient-glow);
    opacity: 0.3;
    pointer-events: none;
}

.blog-featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

.blog-featured-image {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.06), rgba(var(--secondary-rgb), 0.06));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.blog-featured-image svg {
    width: 64px;
    height: 64px;
}

.blog-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 15px;
}

.blog-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-premium);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
}

.blog-card-image {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), rgba(var(--secondary-rgb), 0.03));
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.blog-card-image svg {
    width: 44px;
    height: 44px;
    color: var(--primary);
    opacity: 0.8;
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.blog-card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Contact Page Split Layout */
.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

@media (min-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr 1.2fr;
        padding: 50px;
        gap: 60px;
    }
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-info-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
}

.contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(var(--primary-rgb), 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-info-card:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.05);
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--gradient-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 20px;
    height: 20px;
}

.contact-info-text h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.contact-info-text p {
    font-size: 13.5px;
    color: var(--text-secondary);
}

/* Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-accent);
    width: 0%;
    z-index: 200;
    transition: width 0.1s ease;
}

