/* ===== CSS Variables ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    --gradient-color: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --border-color: rgba(102, 126, 234, 0.2);
    --hover-glow: rgba(102, 126, 234, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"],
body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --card-bg: rgba(30, 41, 59, 0.95);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --border-color: rgba(102, 126, 234, 0.3);
    --hover-glow: rgba(147, 51, 234, 0.4);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* Image optimization to prevent layout shift */
img {
    display: block;
    max-width: 100%;
    height: auto;
    width: 100%;
}

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

/* ===== Nav Actions (Theme Toggle + Hamburger) ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

/* ===== Theme Toggle ===== */
.theme-toggle,
.dark-mode-toggle,
.mode-switch {
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    position: relative;
    margin-left: 12px;
}

.theme-toggle:hover,
.dark-mode-toggle:hover,
.mode-switch:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Icon inside */
.theme-toggle i,
.dark-mode-toggle i,
.mode-switch i {
    font-size: 18px;
    color: #6a11cb;
    transition: color 0.3s ease;
}

.theme-toggle:focus {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* ===== Navigation ===== */
.navbar {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.nav-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.logo-icon {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    margin: 0 10px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #333;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #000;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger,
.hamburger-menu,
.menu-toggle {
    display: none !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 22px;
    cursor: pointer;
    position: relative;
    z-index: 10000;
    user-select: none;
    padding: 6px;
    gap: 3px;
}

.hamburger span,
.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block !important;
    margin: 3px 0;
    flex-shrink: 0;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 20%, #4facfe 40%, #00f2fe 60%, #f093fb 80%, #667eea 100%);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: heroGradientShift 20s ease infinite;
    overflow: hidden;
    padding: 100px 20px;
    will-change: background-position, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes heroGradientShift {
    0% { background-position: 0% 50%; }
    33% { background-position: 100% 50%; }
    66% { background-position: 50% 100%; }
    100% { background-position: 0% 50%; }
}

/* Smooth Float Animation for Hero Icons */
@keyframes smoothFloat {
    0% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-10px) translateZ(0); }
    100% { transform: translateY(0) translateZ(0); }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

.hero-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 0 20px;
    will-change: transform;
    transform: translateZ(0);
}

.hero-text-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    flex: 1;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.hero-title {
    font-size: 4rem;
    color: white;
    margin-bottom: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    line-height: 1.1;
    min-height: 80px;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.hero-title .typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: white;
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes fadeInUpHero {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated Gradient Text */
.animated-gradient-text {
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #fd79a8, #fdcb6e, #6c5ce7);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Finance Icons - Bottom to Top (Bubble-style) */
.floating-finance-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

/* Individual icon animations - bottom to top floating with smoothFloat */
.icon-1 {
    left: 10%;
    animation: floatUp 25s infinite ease-in-out, smoothFloat 3s ease-in-out infinite;
    animation-delay: 0s, 0s;
}

.icon-2 {
    left: 30%;
    animation: floatUp 28s infinite ease-in-out, smoothFloat 3s ease-in-out infinite;
    animation-delay: 2s, 0.5s;
}

.icon-3 {
    left: 50%;
    animation: floatUp 30s infinite ease-in-out, smoothFloat 3s ease-in-out infinite;
    animation-delay: 4s, 1s;
}

.icon-4 {
    left: 70%;
    animation: floatUp 27s infinite ease-in-out, smoothFloat 3s ease-in-out infinite;
    animation-delay: 1s, 1.5s;
}

.icon-5 {
    left: 20%;
    animation: floatUp 29s infinite ease-in-out, smoothFloat 3s ease-in-out infinite;
    animation-delay: 3s, 2s;
}

.icon-6 {
    left: 80%;
    animation: floatUp 26s infinite ease-in-out, smoothFloat 3s ease-in-out infinite;
    animation-delay: 5s, 2.5s;
}

/* Smooth bottom-to-top floating animation (like bubbles) - Optimized for performance */
@keyframes floatUp {
    0% {
        transform: translate3d(0, 100vh, 0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    50% {
        transform: translate3d(10px, 50vh, 0) scale(1);
        opacity: 0.6;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translate3d(-5px, -100px, 0) scale(0.8);
        opacity: 0;
    }
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    margin-top: 2px;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transform: translateY(20px) translateZ(0);
    animation: fadeInUpHero 0.8s ease 2s forwards;
    line-height: 1.4;
    will-change: transform, opacity;
}

.btn-hero {
    padding: 15px 40px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpHero 0.8s ease 2.5s forwards;
}

.btn-hero:hover {
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    will-change: transform;
}

/* Animations */
.animate-fade-in {
    animation: fadeInUp 1s ease;
}

.animate-fade-in-delay {
    animation: fadeInUp 1s ease 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s ease 0.4s both;
}

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

/* ===== Tools Section ===== */
.tools-section {
    padding: 80px 0;
}

/* Scroll-based animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* Category Accordion */
.category-accordion {
    margin-bottom: 30px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.category-accordion:nth-child(1) { animation-delay: 0.1s; }
.category-accordion:nth-child(2) { animation-delay: 0.2s; }
.category-accordion:nth-child(3) { animation-delay: 0.3s; }
.category-accordion:nth-child(4) { animation-delay: 0.4s; }
.category-accordion:nth-child(5) { animation-delay: 0.5s; }

.category-accordion:hover {
    box-shadow: 0 12px 40px var(--hover-glow);
    transform: translateY(-5px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 🔥 Animated Auto-Changing Gradient Background for Tool Categories */
@keyframes categoryGradient {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 150% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Animated Gradient Background for Category Sections */
@keyframes categoryGradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.category-header {
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #333;
    font-weight: 600;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: none;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .category-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #f1f1f1;
}

.category-header:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    opacity: 1;
}

.category-header:active {
    transform: scale(0.98);
}

/* ✨ Elegant Static Gradient for Tool Categories */
.tool-category,
.category-box,
.accordion-item,
.tool-section {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: none;
    position: relative;
    z-index: 1;
}

/* Hover effect (subtle glow) */
.tool-category:hover,
.category-box:hover,
.accordion-item:hover,
.tool-section:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Text & icon alignment */
.tool-category i,
.category-box i,
.accordion-item i,
.tool-section i {
    margin-right: 8px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.category-toggle {
    font-size: 2rem;
    font-weight: bold;
    transition: var(--transition);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.category-accordion.active .category-toggle {
    transform: rotate(45deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 20px 20px;
}

.category-accordion.active .category-content {
    max-height: 2000px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
}

.tool-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px var(--hover-glow);
    border-color: #667eea;
}

.tool-card:active {
    transform: translateY(-5px) scale(0.98);
}

.tool-icon {
    font-size: 3rem;
}

.tool-card h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
    font-weight: 600;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.close-modal:hover {
    transform: rotate(90deg);
    background: rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 25px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px var(--hover-glow);
}

.btn-calculate {
    padding: 15px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--hover-glow);
}

.result-box {
    background: linear-gradient(-45deg, #6a11cb, #2575fc, #00c6ff, #f7971e, #ff6b6b, #4ecdc4);
    background-size: 400% 400%;
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-top: 25px;
    animation: slideDown 0.5s ease, bgMove 8s ease infinite;
    display: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

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

.result-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, #667eea, #764ba2, #4facfe, #00f2fe, #f093fb, #f5576c);
    background-size: 400% 400%;
    opacity: 0;
    animation: bgMove 8s ease infinite;
    transition: opacity 1s ease;
    z-index: -1;
}

.result-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

@keyframes bgMove {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes bgFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.result-box h5 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.result-box p {
    margin: 10px 0;
    font-size: 1rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.result-box > div {
    position: relative;
    z-index: 1;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.btn-action {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
    font-size: 0.95rem;
}

.btn-print {
    background: var(--primary-gradient);
    color: white;
}

.btn-share {
    background: #25D366;
    color: white;
}

.btn-share.facebook {
    background: #1877F2;
}

.btn-share.twitter {
    background: #1DA1F2;
}

.btn-share.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.btn-reset {
    background: #64748b;
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ===== About Section ===== */
.about-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.about-card {
    animation: fadeInUp 0.8s ease;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.about-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-info {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 25px;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* ===== Trending FAQ Section ===== */
.trending-faq-section {
    padding: 80px 0;
    background: var(--bg-color);
}

/* ===== FAQ Section ===== */
.faq-section {
    padding: 80px 0;
}

/* ===== FAQ Search ===== */
.faq-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto 40px;
}

.faq-search {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--card-bg);
    color: var(--text-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.faq-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.faq-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 0.6;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item.hidden {
    display: none;
}

.faq-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInLeft 0.6s ease forwards;
}

.faq-item details {
    display: block;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
}

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

.faq-item summary::marker {
    display: none;
}

.faq-item summary h3 {
    margin: 0;
    flex: 1;
}

.faq-item summary:focus {
    outline: none;
}

.faq-item details[open] summary .faq-toggle {
    transform: rotate(45deg);
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }

.faq-item:hover {
    box-shadow: 0 10px 30px var(--hover-glow);
    transform: translateX(5px);
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.faq-question {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    transition: var(--transition);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 25px;
}

.faq-item[open] .faq-answer,
.faq-item details[open] .faq-answer {
    max-height: 1000px;
    padding: 0 25px 25px;
}

.faq-answer p {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.8;
    margin: 0;
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    animation: fadeInUp 0.8s ease;
}

.contact-card:nth-child(2) {
    animation-delay: 0.2s;
}

.contact-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 40px var(--hover-glow);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.contact-card a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.contact-card a:hover {
    text-decoration: underline;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    text-align: center;
    padding: 30px 10px;
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

.footer-gradient-line {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    margin-bottom: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
    text-align: left;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.footer-section p {
    color: #333;
    opacity: 0.9;
    line-height: 1.8;
}

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

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

.footer-links a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #000;
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 8px;
    color: #333;
    margin: 0 8px;
}

.social-icon svg {
    width: 24px;
    height: 24px;
    transition: var(--transition);
    fill: #333;
}

.social-icon:hover {
    transform: scale(1.2);
    color: #000;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.social-icon:hover svg {
    fill: #000;
}

@keyframes iconGlow {
    0%, 100% { filter: brightness(1.2); }
    50% { filter: brightness(1.4) drop-shadow(0 0 10px currentColor); }
}

.social-icon.facebook:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.5);
}

.social-icon.facebook:hover svg {
    fill: #000;
}

.social-icon.twitter:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.5);
}

.social-icon.twitter:hover svg {
    fill: #000;
}

.social-icon.instagram:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.5);
}

.social-icon.instagram:hover svg {
    fill: #000;
}

.social-icon.youtube:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.5);
}

.social-icon.youtube:hover svg {
    fill: #000;
}

.social-icon.whatsapp:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.5);
}

.social-icon.whatsapp:hover svg {
    fill: #000;
}

.social-icon.linkedin:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.5);
}

.social-icon.linkedin:hover svg {
    fill: #000;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    opacity: 0.9;
}

.footer-bottom a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #ffd700;
}

/* ===== Scroll to Top ===== */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: bounce 2s infinite;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    animation: none;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ===== WhatsApp Float Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 999;
    text-decoration: none;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.8);
    }
}

/* ===== Responsive Design ===== */
/* Responsive styles for animated gradient category headers */
@media (max-width: 768px) {
    .category-header {
        padding: 20px 15px;
        font-size: 1.2rem;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .category-toggle {
        font-size: 1.8rem;
        width: 28px;
        height: 28px;
    }
    
    /* Mobile Responsive for Tool Categories */
    .tool-category,
    .category-box,
    .accordion-item,
    .tool-section {
        font-size: 16px;
        padding: 12px;
    }
    
    .nav-actions {
        gap: 10px;
        align-items: center;
    }

    .theme-toggle,
    .dark-mode-toggle,
    .mode-switch {
        position: relative;
        right: 0;
        top: 0;
        margin-left: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Ensure it stays inline with menu icon */
    .navbar-right,
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .hero-content {
        flex-direction: column;
    }

    .floating-icon {
        font-size: 1.8rem;
        animation-duration: 20s !important;
    }
    
    /* Reduce animation complexity on mobile - use transform3d for GPU acceleration */
    @keyframes floatUp {
        0% {
            transform: translate3d(0, 100vh, 0) scale(0.8);
            opacity: 0;
        }
        10% {
            opacity: 0.3;
        }
        90% {
            opacity: 0.3;
        }
        100% {
            transform: translate3d(0, -100px, 0) scale(0.8);
            opacity: 0;
        }
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 2px;
    }

    .hero-description {
        font-size: 1rem;
        margin-top: 2px;
    }

    .hamburger {
        display: flex !important;
        position: relative;
        z-index: 1003;
    }

    .faq-search {
        padding: 12px 45px 12px 15px;
        font-size: 0.9rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--gradient-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 20px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer {
        font-size: 14px;
        padding: 40px 10px 15px;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        margin: 0 6px;
    }
    
    .social-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .category-header {
        padding: 18px 12px;
        font-size: 1.1rem;
        border-radius: 15px 15px 0 0;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
    
    .category-toggle {
        font-size: 1.6rem;
        width: 26px;
        height: 26px;
    }
    
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .nav-actions {
        gap: 8px;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        position: relative;
        top: 0;
        right: 0;
    }
    
    .footer {
        font-size: 13px;
        padding: 30px 10px 15px;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
        margin: 0 4px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 400px) {
    .category-header {
        padding: 15px 10px;
        font-size: 1rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .category-toggle {
        font-size: 1.5rem;
        width: 24px;
        height: 24px;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .hamburger {
        width: 32px;
        height: 32px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar,

    .footer,
    .theme-toggle,
    .scroll-to-top,
    .modal {
        display: none !important;
    }

    .result-box {
        background: linear-gradient(-45deg, #667eea, #764ba2) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-inside: avoid;
        background-size: 100% 100% !important;
        animation: none !important;
        color: white !important;
        box-shadow: none !important;
    }
    
    .result-box svg,
    .result-box circle,
    .result-box text {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .result-box::before {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    #print-area,
    #print-area * {
        visibility: visible;
    }
    
    #print-area {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }
    
    .result-box {
        background: linear-gradient(-45deg, #6a11cb, #2575fc, #00c6ff, #f7971e) !important;
        background-size: 400% 400% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color: #fff !important;
        padding: 20px !important;
        border-radius: 15px !important;
    }
    
    .result-box::after {
        content: "FindKarlo.com";
        position: absolute;
        bottom: 10px;
        right: 20px;
        font-size: 12px;
        opacity: 0.7;
    }
}

/* 🌈 Soft Blue-to-Pink Gradient for Category Boxes (Animated) */
.tool-category,
.accordion-item,
.category-box {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #333;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* Hover Effect for Category Boxes */
.tool-category:hover,
.accordion-item:hover,
.category-box:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* 🌇 Footer Section Gradient (Animated) */
footer,
.site-footer {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #333;
    text-align: center;
    padding: 30px 10px;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

/* Footer Links */
footer a,
.site-footer a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover,
.site-footer a:hover {
    color: #000;
    text-decoration: underline;
}

/* Footer Social Icons (if used) */
footer .social-icons i,
.site-footer .social-icons i {
    font-size: 20px;
    margin: 0 10px;
    color: #333;
    transition: transform 0.3s ease, color 0.3s ease;
}

footer .social-icons i:hover,
.site-footer .social-icons i:hover {
    transform: scale(1.2);
    color: #000;
}

/* Icon & Text alignment */
.tool-category i,
.accordion-item i,
.category-box i {
    margin-right: 8px;
}

/* 🌈 Gradient Animation Keyframes */
@keyframes smoothGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 🌞 LIGHT MODE (Default) - Animated Gradient */
header,
.navbar,
.site-header {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    transition: all 0.3s ease;
}

/* Hero section animation handled by the new heroGradientMove animation below */

/* 🧭 HEADER / NAVBAR STYLES (Comprehensive) */
header,
.site-header {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Header Links */
header a,
.site-header a,
.nav-link {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

header a:hover,
.site-header a:hover,
.nav-link:hover {
    color: #000;
}

/* Common text styling for light mode */
body:not([data-theme="dark"]) h1,
body:not([data-theme="dark"]) h2,
body:not([data-theme="dark"]) h3,
body:not([data-theme="dark"]) p,
body:not([data-theme="dark"]) a {
    color: #333;
}

/* Category Box Style - Light Mode */
body:not([data-theme="dark"]) .tool-category,
body:not([data-theme="dark"]) .accordion-item,
body:not([data-theme="dark"]) .category-box {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #333;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

body:not([data-theme="dark"]) .tool-category:hover,
body:not([data-theme="dark"]) .accordion-item:hover,
body:not([data-theme="dark"]) .category-box:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Footer Style - Light Mode */
body:not([data-theme="dark"]) footer,
body:not([data-theme="dark"]) .site-footer {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #333;
    text-align: center;
    padding: 30px 10px;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

/* Footer Links - Light Mode */
body:not([data-theme="dark"]) footer a,
body:not([data-theme="dark"]) .site-footer a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

body:not([data-theme="dark"]) footer a:hover,
body:not([data-theme="dark"]) .site-footer a:hover {
    color: #000;
    text-decoration: underline;
}

/* 🌙 DARK MODE - Animated Gradient */
[data-theme="dark"] header,
[data-theme="dark"] .navbar,
[data-theme="dark"] .site-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #f5f5f5;
}

[data-theme="dark"] .hero,
[data-theme="dark"] .hero-section,
[data-theme="dark"] .main-section {
    background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
    background-size: 200% 200% !important;
    animation: smoothGradientShift 20s ease infinite !important;
}

[data-theme="dark"] .tool-category,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .category-box {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #f1f1f1;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

[data-theme="dark"] .tool-category:hover,
[data-theme="dark"] .accordion-item:hover,
[data-theme="dark"] .category-box:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] footer,
[data-theme="dark"] .site-footer {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    background-size: 200% 200%;
    animation: smoothGradientShift 20s ease infinite;
    color: #f1f1f1;
    text-align: center;
    padding: 30px 10px;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] p,
[data-theme="dark"] a {
    color: #f1f1f1;
}

[data-theme="dark"] .nav-link,
[data-theme="dark"] header a,
[data-theme="dark"] .site-header a {
    color: #f1f1f1;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] header a:hover,
[data-theme="dark"] .site-header a:hover {
    color: #ffffff;
}

[data-theme="dark"] footer a,
[data-theme="dark"] .site-footer a {
    color: #f1f1f1;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

[data-theme="dark"] footer a:hover,
[data-theme="dark"] .site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Hero Text Colors - Light Mode */
body:not([data-theme="dark"]) .hero-title,
body:not([data-theme="dark"]) .hero-description {
    color: #333;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

body:not([data-theme="dark"]) .hero-title .typing-cursor {
    background: #333;
}

/* Hero Text Colors - Dark Mode */
[data-theme="dark"] .hero-title,
[data-theme="dark"] .hero-description {
    color: #f1f1f1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hero-title .typing-cursor {
    background: #f1f1f1;
}

/* 🌗 Smooth Transition */
body {
    transition: background 0.5s ease, color 0.5s ease;
}

/* 📱 Mobile Responsive */
@media (max-width: 768px) {
    header,
    .navbar,
    .site-header {
        flex-direction: column;
        padding: 10px;
    }
    
    .tool-category, .accordion-item {
        font-size: 16px;
        padding: 12px;
    }
    
    footer {
        font-size: 14px;
        padding: 20px 5px;
    }
}

/* 🌙 UNIVERSAL DARK MODE FIX */
[data-theme="dark"] {
    background-color: #0f172a; /* deep navy base */
    color: #e2e8f0; /* readable soft white */
}

/* 🧭 HEADER / NAVBAR */
[data-theme="dark"] header,
[data-theme="dark"] .navbar,
[data-theme="dark"] .site-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #f8fafc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] header a,
[data-theme="dark"] .navbar a,
[data-theme="dark"] .site-header a,
[data-theme="dark"] .nav-link {
    color: #f1f5f9;
}

[data-theme="dark"] header a:hover,
[data-theme="dark"] .navbar a:hover,
[data-theme="dark"] .site-header a:hover,
[data-theme="dark"] .nav-link:hover {
    color: #ffffff;
}

[data-theme="dark"] .nav-logo {
    color: #f8fafc;
}

/* 🏠 HERO / MAIN SECTION */
[data-theme="dark"] .hero,
[data-theme="dark"] .hero-section,
[data-theme="dark"] .main-section {
    background: linear-gradient(135deg, #111827, #1e293b);
    color: #f1f5f9;
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4 {
    color: #f8fafc;
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] span {
    color: #e2e8f0;
}

[data-theme="dark"] .section-title {
    color: #f8fafc;
    -webkit-text-fill-color: #f8fafc;
    background: none;
}

[data-theme="dark"] .section-subtitle {
    color: #e2e8f0;
    opacity: 0.9;
}

/* 📦 CATEGORY BOXES */
[data-theme="dark"] .tool-category,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .category-box,
[data-theme="dark"] .category-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

[data-theme="dark"] .tool-category:hover,
[data-theme="dark"] .accordion-item:hover,
[data-theme="dark"] .category-box:hover {
    background: linear-gradient(135deg, #334155, #475569);
    transform: scale(1.01);
}

/* 💬 FAQ SECTION */
[data-theme="dark"] .faq-section {
    background: transparent;
    color: #e2e8f0;
}

[data-theme="dark"] .faq-item {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .faq-item:hover {
    background: linear-gradient(135deg, #334155, #475569);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .faq-question,
[data-theme="dark"] .faq-question h3,
[data-theme="dark"] .faq-item summary,
[data-theme="dark"] .faq-item summary h3 {
    color: #f8fafc;
}

[data-theme="dark"] .accordion-body,
[data-theme="dark"] .faq-answer,
[data-theme="dark"] .faq-answer p {
    background: transparent;
    color: #e2e8f0;
    opacity: 1;
}

[data-theme="dark"] .faq-toggle {
    color: #f8fafc;
}

/* 🖱️ BUTTONS */
[data-theme="dark"] button,
[data-theme="dark"] .btn,
[data-theme="dark"] .explore-btn,
[data-theme="dark"] .btn-hero {
    background: #334155;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

[data-theme="dark"] button:hover,
[data-theme="dark"] .btn:hover,
[data-theme="dark"] .explore-btn:hover,
[data-theme="dark"] .btn-hero:hover {
    background: #475569;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

/* 📄 INPUT FIELDS */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .input-group input,
[data-theme="dark"] .input-group select,
[data-theme="dark"] .input-group textarea {
    background-color: #1e293b;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #94a3b8;
}

[data-theme="dark"] .input-group label {
    color: #e2e8f0;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] .input-group input:focus,
[data-theme="dark"] .input-group select:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* 🌇 FOOTER */
[data-theme="dark"] footer,
[data-theme="dark"] .site-footer {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #f1f5f9;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] footer a,
[data-theme="dark"] .site-footer a {
    color: #f1f5f9;
}

[data-theme="dark"] footer a:hover,
[data-theme="dark"] .site-footer a:hover {
    color: #ffffff;
}

/* 🎨 MODAL / CARDS */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .card,
[data-theme="dark"] .result-box {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-title {
    color: #f8fafc;
}

/* 🌗 TOGGLE SMOOTH TRANSITION */
body {
    transition: background 0.5s ease, color 0.5s ease;
}

/* ===== TOOLS SECTION - Extended Visibility ===== */
[data-theme="dark"] .tool-category h3,
[data-theme="dark"] .accordion-item h3,
[data-theme="dark"] .category-header h3 {
    color: #ffffff;
}

[data-theme="dark"] .tool-category p,
[data-theme="dark"] .accordion-item p,
[data-theme="dark"] .tool-category span,
[data-theme="dark"] .accordion-item span {
    color: #dbeafe;
}

/* ===== ABOUT US SECTION ===== */
[data-theme="dark"] .about-section,
[data-theme="dark"] #about,
[data-theme="dark"] .about-content {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .about-section h2,
[data-theme="dark"] #about h2,
[data-theme="dark"] .about-card h3 {
    color: #f1f5f9;
    -webkit-text-fill-color: #f1f5f9;
    background: none;
}

[data-theme="dark"] .about-section p,
[data-theme="dark"] #about p,
[data-theme="dark"] .about-card p,
[data-theme="dark"] .about-info {
    color: #e2e8f0;
}

[data-theme="dark"] .about-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

[data-theme="dark"] .about-icon {
    color: #f8fafc;
}

/* ===== CONTACT US SECTION ===== */
[data-theme="dark"] .contact-section,
[data-theme="dark"] #contact,
[data-theme="dark"] .contact-content {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .contact-section h2,
[data-theme="dark"] .contact-content h2,
[data-theme="dark"] .contact-card h3 {
    color: #f8fafc;
}

[data-theme="dark"] .contact-section p,
[data-theme="dark"] .contact-content p,
[data-theme="dark"] .contact-card p {
    color: #e2e8f0;
}

[data-theme="dark"] .contact-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .contact-card:hover {
    background: linear-gradient(135deg, #334155, #475569);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .contact-icon {
    color: #f8fafc;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: #1e293b;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #94a3b8;
}

/* ===== ICONS ===== */
[data-theme="dark"] i,
[data-theme="dark"] .icon,
[data-theme="dark"] .social-icons i,
[data-theme="dark"] .social-icon {
    color: #f1f5f9;
}

[data-theme="dark"] .social-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

[data-theme="dark"] .social-icon svg {
    fill: #f1f5f9;
}

[data-theme="dark"] .social-icons i:hover,
[data-theme="dark"] .social-icon:hover {
    color: #ffffff;
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .social-icon:hover svg {
    fill: #ffffff;
}

/* ===== FAQ SECTION - Extended ===== */
[data-theme="dark"] .faq-section h3,
[data-theme="dark"] .faq-item h3,
[data-theme="dark"] .faq-section .section-title {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: none;
}

/* ===== FOOTER - Extended ===== */
[data-theme="dark"] .footer-content,
[data-theme="dark"] .footer-section {
    color: #f1f5f9;
}

[data-theme="dark"] .footer-section h3,
[data-theme="dark"] .footer-section h4 {
    color: #f8fafc;
}

[data-theme="dark"] .footer-section p {
    color: #e2e8f0;
}

/* 🌙 UNIVERSAL DARK MODE FIX - Enhanced */
[data-theme="dark"] {
    background-color: #0b1220;
    color: #e2e8f0;
}

/* ===== HEADER - Enhanced ===== */
[data-theme="dark"] header,
[data-theme="dark"] .navbar {
    background: linear-gradient(135deg, #13294b, #1f3b6e);
    color: #f8fafc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .navbar a,
[data-theme="dark"] .nav-link {
    color: #f1f5f9;
}

[data-theme="dark"] .navbar a:hover,
[data-theme="dark"] .nav-link:hover {
    color: #ffffff;
}

/* ===== HERO SECTION - Enhanced ===== */
[data-theme="dark"] .hero,
[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #0b1220, #182848);
    color: #ffffff;
}

[data-theme="dark"] .hero-section h1,
[data-theme="dark"] .hero-title {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .hero-section p,
[data-theme="dark"] .hero-description {
    color: #e2e8f0;
}

[data-theme="dark"] .explore-btn,
[data-theme="dark"] .btn-hero {
    background-color: #334155;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: 0.3s;
}

[data-theme="dark"] .explore-btn:hover,
[data-theme="dark"] .btn-hero:hover {
    background-color: #475569;
    transform: scale(1.05);
}

/* ===== TOOLS SECTION - Enhanced ===== */
[data-theme="dark"] .tool-category,
[data-theme="dark"] .accordion-item {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tool-category h3,
[data-theme="dark"] .accordion-item h3 {
    color: #ffffff;
}

[data-theme="dark"] .tool-category p,
[data-theme="dark"] .accordion-item p {
    color: #cbd5e1;
}

/* ===== ABOUT US SECTION - Enhanced ===== */
[data-theme="dark"] .about-section {
    background-color: #0b1220;
    color: #f1f5f9;
}

[data-theme="dark"] .about-section h2,
[data-theme="dark"] #about h2 {
    color: #ffffff;
}

[data-theme="dark"] .about-section p,
[data-theme="dark"] #about p,
[data-theme="dark"] .about-card p {
    color: #e2e8f0;
}

/* ===== CONTACT US SECTION - Enhanced ===== */
[data-theme="dark"] .contact-section {
    background-color: #0b1220;
    color: #f1f5f9;
}

[data-theme="dark"] .contact-section h2,
[data-theme="dark"] .contact-content h2 {
    color: #ffffff;
}

[data-theme="dark"] .contact-section .contact-card,
[data-theme="dark"] .contact-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .contact-section .contact-card:hover,
[data-theme="dark"] .contact-card:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, #334155, #475569);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea {
    background-color: #1e293b;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #94a3b8;
}

/* ===== FOOTER - Enhanced ===== */
[data-theme="dark"] footer,
[data-theme="dark"] .site-footer {
    background: linear-gradient(135deg, #13294b, #1f3b6e);
    color: #f1f5f9;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] footer a,
[data-theme="dark"] .site-footer a {
    color: #f8fafc;
}

[data-theme="dark"] footer a:hover,
[data-theme="dark"] .site-footer a:hover {
    color: #ffffff;
}

/* ===== ICONS - Enhanced ===== */
[data-theme="dark"] i, 
[data-theme="dark"] .icon {
    color: #f8fafc;
}

[data-theme="dark"] .icon:hover {
    color: #ffffff;
    transform: scale(1.1);
}

/* ===== GENERAL TRANSITION ===== */
body {
    transition: background 0.5s ease, color 0.5s ease;
}

/* 🌙 FULL DARK MODE FIX — FindKarLo.com */
[data-theme="dark"] {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #f1f5f9;
}

/* ===== COMPREHENSIVE TEXT VISIBILITY FIX ===== */
[data-theme="dark"] * {
    color: inherit;
}

[data-theme="dark"] body,
[data-theme="dark"] .main-section,
[data-theme="dark"] .section,
[data-theme="dark"] div,
[data-theme="dark"] span,
[data-theme="dark"] li,
[data-theme="dark"] ul,
[data-theme="dark"] ol {
    color: #e2e8f0;
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .section-subtitle,
[data-theme="dark"] .card-title,
[data-theme="dark"] .modal-title {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary,
[data-theme="dark"] small {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .content,
[data-theme="dark"] .description,
[data-theme="dark"] .info,
[data-theme="dark"] .text {
    color: #e2e8f0 !important;
}

/* Fix for elements using CSS variables */
[data-theme="dark"] [style*="color: var(--text-color)"],
[data-theme="dark"] [style*="color:var(--text-color)"] {
    color: #f1f5f9 !important;
}

/* Force visibility for all text elements - Comprehensive Fix */
[data-theme="dark"] body,
[data-theme="dark"] main,
[data-theme="dark"] article,
[data-theme="dark"] section,
[data-theme="dark"] aside,
[data-theme="dark"] nav {
    color: #e2e8f0 !important;
}

/* All headings must be white */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #ffffff !important;
}

/* All paragraphs and text */
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] label {
    color: #e2e8f0 !important;
}

/* All links */
[data-theme="dark"] a {
    color: #f8fafc !important;
}

[data-theme="dark"] a:hover {
    color: #ffffff !important;
}

/* Cards and containers */
[data-theme="dark"] .card,
[data-theme="dark"] .card-body,
[data-theme="dark"] .card-text,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-body {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .card-title,
[data-theme="dark"] .card-header,
[data-theme="dark"] .modal-header {
    color: #ffffff !important;
}

/* Ensure CSS variable overrides work */
[data-theme="dark"] {
    --text-color: #f1f5f9 !important;
    --bg-color: #0f172a !important;
}

/* ===== HEADER / NAVBAR - Enhanced ===== */
[data-theme="dark"] header,
[data-theme="dark"] .navbar,
[data-theme="dark"] .site-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #f8fafc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] header a,
[data-theme="dark"] .navbar a,
[data-theme="dark"] .site-header a,
[data-theme="dark"] .nav-link {
    color: #f8fafc;
    transition: color 0.3s ease;
}

[data-theme="dark"] header a:hover,
[data-theme="dark"] .navbar a:hover,
[data-theme="dark"] .site-header a:hover,
[data-theme="dark"] .nav-link:hover {
    color: #ffffff;
}

/* ===== HERO SECTION - Enhanced ===== */
[data-theme="dark"] .hero-section,
[data-theme="dark"] .main-section {
    background: transparent;
    color: #f8fafc;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #ffffff;
}

[data-theme="dark"] p {
    color: #e2e8f0;
}

/* ===== TOOLS SECTION - Enhanced ===== */
[data-theme="dark"] .tool-category,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .category-box {
    background: linear-gradient(145deg, #1e293b, #334155);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .tool-category h3,
[data-theme="dark"] .accordion-item h3 {
    color: #ffffff;
}

[data-theme="dark"] .tool-category p,
[data-theme="dark"] .accordion-item p {
    color: #e0e7ff;
}

/* ===== ABOUT US SECTION - Enhanced ===== */
[data-theme="dark"] .about-section,
[data-theme="dark"] #about,
[data-theme="dark"] .about-content {
    background: transparent;
    color: #f1f5f9;
}

[data-theme="dark"] .about-section h2,
[data-theme="dark"] .about-content h2,
[data-theme="dark"] #about h2 {
    color: #ffffff;
}

[data-theme="dark"] .about-section p,
[data-theme="dark"] .about-content p,
[data-theme="dark"] .about-card p {
    color: #e2e8f0;
}

/* ===== CONTACT US SECTION - Enhanced ===== */
[data-theme="dark"] .contact-section,
[data-theme="dark"] #contact,
[data-theme="dark"] .contact-content {
    background: transparent;
    color: #f1f5f9;
}

[data-theme="dark"] .contact-section h2,
[data-theme="dark"] .contact-content h2 {
    color: #ffffff;
}

[data-theme="dark"] .contact-section p,
[data-theme="dark"] .contact-content p {
    color: #e2e8f0;
}

[data-theme="dark"] .contact-box,
[data-theme="dark"] .contact-card {
    background: linear-gradient(145deg, #1e293b, #334155);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .contact-box i,
[data-theme="dark"] .contact-card i,
[data-theme="dark"] .contact-icon {
    color: #ffffff;
}

[data-theme="dark"] .contact-box:hover,
[data-theme="dark"] .contact-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

/* ===== INPUTS / FORMS - Enhanced ===== */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: #1e293b;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #94a3b8;
}

/* ===== BUTTONS - Enhanced ===== */
[data-theme="dark"] button,
[data-theme="dark"] .btn,
[data-theme="dark"] .explore-btn,
[data-theme="dark"] .btn-hero {
    background: #334155;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

[data-theme="dark"] button:hover,
[data-theme="dark"] .btn:hover,
[data-theme="dark"] .explore-btn:hover,
[data-theme="dark"] .btn-hero:hover {
    background: #475569;
    transform: scale(1.05);
}

/* ===== FAQ SECTION - Enhanced ===== */
[data-theme="dark"] .faq-section,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .accordion-body {
    background: linear-gradient(145deg, #1e293b, #334155);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .faq-question,
[data-theme="dark"] .faq-question h3,
[data-theme="dark"] .faq-item summary,
[data-theme="dark"] .faq-item summary h3 {
    color: #ffffff;
}

[data-theme="dark"] .faq-answer,
[data-theme="dark"] .faq-answer p {
    color: #e2e8f0;
}

/* ===== FOOTER - Enhanced ===== */
[data-theme="dark"] footer,
[data-theme="dark"] .site-footer {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #f8fafc;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] footer a,
[data-theme="dark"] .site-footer a {
    color: #f8fafc;
}

[data-theme="dark"] footer a:hover,
[data-theme="dark"] .site-footer a:hover {
    color: #ffffff;
}

/* ===== ICONS - Enhanced ===== */
[data-theme="dark"] i,
[data-theme="dark"] .icon,
[data-theme="dark"] .social-icons i,
[data-theme="dark"] .social-icon {
    color: #f8fafc;
}

[data-theme="dark"] .social-icons i:hover,
[data-theme="dark"] .social-icon:hover {
    color: #ffffff;
    transform: scale(1.2);
}

/* ===== SMOOTH TRANSITIONS ===== */
body {
    transition: background 0.4s ease, color 0.4s ease;
}

/* 📱 RESPONSIVE FIXES */
@media (max-width: 768px) {
    [data-theme="dark"] h1 { 
        font-size: 22px; 
    }
    
    [data-theme="dark"] h2 {
        font-size: 20px;
    }
    
    [data-theme="dark"] p { 
        font-size: 15px; 
    }
    
    [data-theme="dark"] footer { 
        font-size: 14px; 
        padding: 20px 10px; 
    }
}

/* 🌈 Animated Blue–Pink Gradient for Hero Section */
.hero,
.hero-section,
.main-section {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-size: 400% 400%;
    animation: heroGradientMove 18s ease-in-out infinite;
    background-repeat: no-repeat;
    background-attachment: fixed;
    text-align: center;
    padding: 80px 20px;
    color: #333;
    transition: background 0.5s ease-in-out;
}

/* 💫 Smooth Gradient Animation Keyframes */
@keyframes heroGradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Optional: Light text shadow for clarity */
.hero-section h1,
.hero-section h2,
.hero h1,
.hero h2,
.hero-section p,
.hero p {
    color: #2c2c2c;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
}

/* Button Styling (Match the Theme) */
.hero-section .btn,
.hero-section button,
.hero-section .explore-btn,
.hero .btn,
.hero button,
.hero .explore-btn {
    background-color: #fff;
    color: #2575fc;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-section .btn:hover,
.hero-section button:hover,
.hero-section .explore-btn:hover,
.hero .btn:hover,
.hero button:hover,
.hero .explore-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* 🌈 Static Gradient for Category Boxes (Ensure Static) */
.tool-category,
.accordion-item,
.category-box {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
    color: #333;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: none !important;
    background-size: 100% 100% !important;
}

.tool-category:hover,
.accordion-item:hover,
.category-box:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* 🌇 Static Gradient for Footer (Ensure Static) */
footer,
.site-footer {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
    color: #333;
    text-align: center;
    padding: 30px 10px;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    animation: none !important;
    background-size: 100% 100% !important;
}

footer a,
.site-footer a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover,
.site-footer a:hover {
    color: #000;
    text-decoration: underline;
}

/* 📱 Mobile Responsive */
@media (max-width: 768px) {
    .hero,
    .hero-section {
        padding: 60px 10px;
    }
    
    .tool-category, .accordion-item {
        font-size: 16px;
        padding: 12px;
    }
    
    footer {
        font-size: 14px;
        padding: 20px 5px;
    }
}

/* 🌈 Sections keep plain background - gradient only on inner boxes */
.about-section,
#about,
.trending-section,
#trending,
.faq-section,
#faq,
.contact-section,
#contact {
    background: transparent;
    padding: 40px 25px;
    margin: 30px 0;
}

/* Headings inside these sections */
.about-section h2, 
.trending-section h2, 
.faq-section h2, 
.contact-section h2,
#about h2,
#trending h2,
#faq h2,
#contact h2 {
    color: #222;
    text-align: center;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Paragraphs & content text */
.about-section p,
.trending-section p,
.faq-section p,
.contact-section p,
#about p,
#trending p,
#faq p,
#contact p {
    color: #2c2c2c;
    font-size: 16px;
    line-height: 1.7;
}

/* Forms inside Contact Section */
.contact-section form input,
.contact-section form textarea,
#contact form input,
#contact form textarea {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 15px;
}

.contact-section form button,
#contact form button {
    background-color: #fff;
    color: #2575fc;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-section form button:hover,
#contact form button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* FAQ Accordion Styling */
.faq-section .faq-item,
#faq .faq-item {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.faq-section .faq-item:hover,
#faq .faq-item:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Sections remain plain - no hover effect on sections */

/* 🌈 Gradient Only for Inner Boxes */

/* About Us Box */
.about-box,
.about-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #2c2c2c;
    transition: all 0.3s ease;
}

.about-box:hover,
.about-card:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* FAQ Question Boxes */
.faq-item,
.faq-box {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.faq-item:hover,
.faq-box:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

/* Trending Finance Question Boxes */
.trending-item,
.trending-box {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.trending-item:hover,
.trending-box:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

/* Contact Us Cards (Email & WhatsApp) */
.contact-card,
.contact-box,
.contact-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 12px;
    padding: 25px 20px;
    color: #2c2c2c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover,
.contact-box:hover,
.contact-info:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Inner Headings/Text */
.about-box h2,
.about-card h2,
.about-card h3,
.faq-item h3,
.trending-item h3,
.contact-card h3,
.contact-box h3 {
    color: #222;
    font-weight: 700;
    margin-bottom: 10px;
}

/* 📱 Mobile Responsive for Sections */
@media (max-width: 768px) {
    .about-section, 
    .trending-section, 
    .faq-section, 
    .contact-section,
    #about,
    #trending,
    #faq,
    #contact {
        padding: 25px 15px;
    }
    
    .about-box, 
    .faq-item, 
    .trending-item, 
    .contact-card,
    .about-card,
    .contact-box {
        padding: 20px 15px;
    }
    
    .about-box h2, 
    .faq-item h3, 
    .trending-item h3, 
    .contact-card h3,
    .about-card h2,
    .about-card h3,
    .contact-box h3 {
        font-size: 18px;
    }
}

/* 🌙 FIX DARK MODE ICON ALIGNMENT */
.theme-toggle,
.dark-mode-toggle,
.mode-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-left: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover,
.dark-mode-toggle:hover,
.mode-switch:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Icon inside */
.theme-toggle i,
.dark-mode-toggle i,
.mode-switch i {
    font-size: 18px;
    color: #6a11cb;
    transition: color 0.3s ease;
}

/* Header alignment fix */
header,
.navbar,
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    flex-wrap: nowrap;
}

/* 📱 Mobile Responsive Fix */
@media (max-width: 768px) {
    .theme-toggle,
    .dark-mode-toggle,
    .mode-switch {
        position: relative;
        right: 0;
        top: 0;
        margin-left: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Ensure it stays inline with menu icon */
    .navbar-right,
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

/* 🌚 Optional: Active dark mode style */
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .dark-mode-toggle {
    background: #2c2c2c;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-toggle i,
[data-theme="dark"] .dark-mode-toggle i {
    color: #fdd835;
}

/* 🔥 PERFORMANCE OPTIMIZATIONS */

/* Optimize animations & rendering - use will-change only where needed */
.hero,
.hero-section,
.hero-content,
.hero-text-content,
.hero-title,
.hero-description,
.floating-icon,
.btn-hero {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Reduce animation lag for users with low performance devices */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ✅ Compress shadows for faster render */
.box,
.card,
.faq-item,
.tool-category,
.category-box {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ✅ Optimize images for mobile - prevent layout shift (already defined above) */

/* ✅ Mobile responsiveness optimization */
@media (max-width: 768px) {
    header,
    .navbar,
    .footer,
    .site-header,
    .site-footer {
        padding: 10px 15px;
    }
    
    /* Optimize hero section for mobile */
    .hero,
    .hero-section {
        background-size: cover;
        background-position: center;
        background-attachment: scroll; /* Better performance on mobile */
        padding: 60px 15px;
        min-height: 80vh;
        will-change: background-position;
        transform: translateZ(0);
    }
    
    /* Optimize spacing for mobile - reduce padding */
    .about-section,
    #about,
    .trending-section,
    #trending,
    .faq-section,
    #faq,
    .contact-section,
    #contact {
        padding: 25px 15px;
        margin: 20px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        min-height: 60px;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
}

/* ✅ GPU acceleration for smooth animations */
.hero,
.hero-section,
.tool-category,
.category-box,
.theme-toggle {
    transform: translateZ(0);
    will-change: transform;
}

/* ✅ Prevent Layout Shift - Fixed Dimensions */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea,
select {
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
}

button,
.btn,
.explore-btn {
    min-height: 44px;
    box-sizing: border-box;
}

/* ✅ Optimize icon sizes to prevent shift */
.floating-icon,
.theme-toggle i {
    width: 1em;
    height: 1em;
    display: inline-block;
}

/* 🌐 HEADER FIX FOR MOBILE & DESKTOP */
header,
.navbar,
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* 🧾 LOGO FIX */
header .logo,
.navbar .logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: #111827;
}

header .logo img {
    height: 28px;
    width: auto;
}

/* 🌙 DARK MODE TOGGLE FIX */
.theme-toggle,
.dark-mode-toggle,
.mode-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-left: 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

/* 🍔 HAMBURGER MENU FIX */
.menu-toggle,
.nav-toggle,
.hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 10px;
    cursor: pointer;
    z-index: 1000;
}

/* 📱 MOBILE VIEW FIX */
@media (max-width: 768px) {
    header,
    .navbar {
        padding: 8px 14px;
        justify-content: space-between;
    }

    header .logo {
        font-size: 1rem;
    }

    .navbar-right,
    .nav-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }

    .theme-toggle,
    .menu-toggle {
        width: 34px;
        height: 34px;
    }
}

/* 🌚 DARK MODE HEADER LOOK */
body.dark-mode header,
[data-theme="dark"] header,
body.dark-mode .navbar,
[data-theme="dark"] .navbar {
    background: linear-gradient(90deg, #1f2937 0%, #111827 100%);
}

/* 🌙 DARK MODE FALLBACK SUPPORT */
body.dark-mode {
    background: #121212;
    color: #eaeaea;
    transition: background 0.4s ease, color 0.4s ease;
}

body.dark-mode header,
body.dark-mode footer {
    background: #1c1c1c;
}

body.dark-mode .card,
body.dark-mode .tool-box,
body.dark-mode .tool-category,
body.dark-mode .accordion-item,
body.dark-mode .category-box {
    background: #232323;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
    color: #eaeaea;
}

body.dark-mode .nav-link,
body.dark-mode a {
    color: #eaeaea;
}

body.dark-mode .nav-link:hover,
body.dark-mode a:hover {
    color: #ffffff;
}

/* ---------- UNIVERSAL HEADER STYLING ---------- */
/* Logo styling */
header .logo,
.nav-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 20px;
    color: #111;
    text-decoration: none;
}

/* Desktop navigation menu - perfect spacing */
.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.nav-menu {
    gap: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important; /* Always visible on desktop */
}

/* Hide hamburger menu on desktop */
.hamburger,
.hamburger-menu {
    display: none !important;
}

/* Navigation links styling */
.nav-link {
    text-decoration: none;
    color: #222;
    font-size: 15.5px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0;
}

.nav-link:hover {
    color: #007bff;
}

/* ---------- RESPONSIVE SETTINGS ---------- */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 30px;
    }

    .navbar {
        gap: 22px;
    }

    .nav-menu {
        gap: 22px !important;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 25px;
    }

    /* Show hamburger icon on mobile */
    .hamburger,
    .hamburger-menu,
    .menu-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 26px !important;
        height: 22px !important;
        cursor: pointer !important;
        user-select: none !important;
        padding: 6px !important;
        position: relative !important;
        z-index: 10000 !important;
        gap: 3px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure hamburger spans are visible */
    .hamburger span,
    .menu-toggle span {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Hide nav menu on mobile by default */
    .nav-menu {
        display: none !important;
        flex-direction: column;
        align-items: flex-start;
        background: var(--bg-color, #fff);
        position: absolute;
        top: 60px;
        right: 20px;
        width: 200px;
        min-width: 200px;
        border: 1px solid #eee;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        padding: 15px;
        gap: 10px;
        z-index: 1000;
        transition: all 0.3s ease;
    }
    
    /* When active (on click) show the menu */
    .nav-menu.active {
        display: flex !important;
        animation: slideIn 0.3s ease-in-out;
    }
    
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Hamburger active/open state animation */
    .hamburger.active,
    .hamburger.open,
    .menu-toggle.active,
    .menu-toggle.open {
        transform: rotate(90deg);
    }
    
    .hamburger.active span:nth-child(1),
    .hamburger.open span:nth-child(1),
    .menu-toggle.active span:nth-child(1),
    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2),
    .hamburger.open span:nth-child(2),
    .menu-toggle.active span:nth-child(2),
    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3),
    .hamburger.open span:nth-child(3),
    .menu-toggle.active span:nth-child(3),
    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .nav-menu li a {
        display: block;
        padding: 10px 20px;
        width: 100%;
    }

    .nav-link {
        width: 100%;
        display: block;
        padding: 8px 0;
        font-size: 15px;
    }
}
/* ---------- END RESPONSIVE HEADER FIX ---------- */
