/* ==========================================================================
   MySmartTools - Global CSS Design System
   ========================================================================== */

/* Import Premium Fonts */
@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');

/* CSS variables for a premium look */
:root {
    --primary: #2563eb;
    --primary-rgb: 37, 99, 235;
    --primary-light: #eff6ff;
    --primary-dark: #1d4ed8;
    
    --secondary: #475569;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    
    /* Premium Glassmorphism and Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 25px 50px -12px rgba(37, 99, 235, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s ease;

    --max-width: 1280px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-50);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    font-weight: 700;
    line-height: 1.25;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

/* Header & Sticky Navigation */
header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

header.scrolled {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

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

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

.logo svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    filter: drop-shadow(0 4px 6px rgba(37, 99, 235, 0.2));
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-normal);
}

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

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

/* Header Search Box */
.header-search {
    position: relative;
    width: 240px;
    transition: var(--transition-normal);
}

.header-search:focus-within {
    width: 300px;
}

.header-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    background-color: var(--gray-100);
    font-size: 0.875rem;
    transition: var(--transition-normal);
}

.header-search input:focus {
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.header-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--gray-400);
    pointer-events: none;
    transition: var(--transition-normal);
}

.header-search input:focus + svg {
    fill: var(--primary);
}

/* Mobile Toggle Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 4px;
    z-index: 1010;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background-color: var(--dark);
    transition: var(--transition-normal);
}

/* Massive Premium Mega Menu */
.has-mega-menu {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-normal);
    z-index: 999;
    padding: 40px 0;
    max-height: 75vh;
    overflow-y: auto;
}

header.scrolled .mega-menu {
    top: 100%;
}

.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mega-menu-category {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mega-menu-category h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 8px;
}

.mega-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mega-menu-list a {
    font-size: 0.875rem;
    color: var(--gray-600);
    display: inline-block;
    padding: 2px 0;
}

.mega-menu-list a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* Mega menu searching overlay inside menu */
.mega-menu-search-bar {
    grid-column: span 4;
    margin-bottom: 10px;
}

.mega-menu-search-bar input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--gray-50);
}

.mega-menu-search-bar input:focus {
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at 10% 20%, rgba(239, 246, 255, 0.7) 0%, rgba(255, 255, 255, 0) 90%);
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 60px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--gray-500);
    margin-bottom: 36px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

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

/* 3D Rotating Hero Illustration */
.hero-visual {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rotating-scene {
    width: 320px;
    height: 320px;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.center-shield {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(30, 58, 138, 0.3) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-premium), inset 0 0 20px rgba(255, 255, 255, 0.2);
    z-index: 5;
    animation: floatCenter 4s ease-in-out infinite;
}

.center-shield svg {
    width: 60px;
    height: 60px;
    fill: var(--primary);
    filter: drop-shadow(0 8px 16px rgba(37, 99, 235, 0.4));
}

.orbiting-icon {
    position: absolute;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition-normal);
}

.orbiting-icon svg {
    width: 32px;
    height: 32px;
}

.orbiting-icon:hover {
    transform: scale(1.15) !important;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.25);
}

/* Orbit position definitions and animations linked in animations.css */

/* Homepage Categories Grid */
.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.category-tab {
    padding: 10px 20px;
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition-fast);
}

.category-tab:hover, .category-tab.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Tool Cards */
.tool-card {
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-200);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

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

.tool-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 20px;
    flex-grow: 1;
}

.tool-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.tool-card-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: var(--transition-fast);
}

.tool-card:hover .tool-card-link svg {
    transform: translateX(4px);
}

/* Why Choose Us Section */
.features-section {
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 56px;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--gray-500);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-box {
    text-align: center;
    padding: 30px 20px;
}

.feature-box-icon {
    width: 64px;
    height: 64px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
}

.feature-box-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.feature-box h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.feature-box p {
    font-size: 0.95rem;
    color: var(--gray-500);
}

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 8px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.stat-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background-color: var(--white);
    padding: 36px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.testimonial-stars {
    color: #fbbf24;
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.testimonial-stars svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.testimonial-card p {
    color: var(--gray-600);
    font-style: italic;
    margin-bottom: 24px;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--gray-200);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: var(--primary);
}

.testimonial-info h4 {
    font-size: 1rem;
}

.testimonial-info span {
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* FAQ Accordion */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    fill: var(--gray-500);
    transition: var(--transition-normal);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.05);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    fill: var(--primary);
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* high value for content expansion */
    padding: 0 24px 20px 24px;
    transition: max-height 0.5s cubic-bezier(1, 0, 1, 0), padding 0.3s ease;
}

/* Footer Section */
footer {
    background-color: var(--dark);
    color: var(--gray-300);
    padding: 80px 0 30px;
    border-top: 1px solid var(--gray-800);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-col .logo {
    color: var(--white);
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-400);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--gray-800);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    transition: var(--transition-normal);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Hover behaviors for social icons as requested */
.social-icon.facebook:hover {
    background-color: #1877F2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.5);
    transform: translateY(-3px);
}

.social-icon.x:hover {
    background-color: #000000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.social-icon.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    box-shadow: 0 0 15px rgba(228, 64, 95, 0.5);
    transform: translateY(-3px);
}

.social-icon.linkedin:hover {
    background-color: #0A66C2;
    box-shadow: 0 0 15px rgba(10, 102, 194, 0.5);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--gray-400);
    position: relative;
    padding-bottom: 2px;
    display: inline-block;
    width: fit-content;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary);
    transition: var(--transition-normal);
}

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

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

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

/* ==========================================================================
   Tool Page Layout and UI Elements
   ========================================================================== */

.tool-page-layout {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 40px;
    margin-top: 40px;
}

/* Tool Interface Wrapper */
.tool-interface-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    padding: 36px;
    margin-bottom: 40px;
}

.tool-header-info {
    margin-bottom: 30px;
}

.tool-header-info h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.tool-header-info p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

/* Common UI Drag and Drop Upload Area */
.drop-zone {
    border: 2.5px dashed var(--gray-300);
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.drop-zone-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.drop-zone-icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.drop-zone-text h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--gray-700);
}

.drop-zone-text p {
    font-size: 0.85rem;
    color: var(--gray-400);
}

.drop-zone-input {
    display: none;
}

/* Custom Tool Controls Forms */
.tool-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

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

.form-row-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 8px 0;
}

.form-row-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Custom Action Button */
.tool-action-btn {
    width: 100%;
    margin-top: 28px;
    padding: 14px;
    font-size: 1.05rem;
}

/* Results Visualizer */
.tool-result-box {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
    display: none; /* Shown dynamically via active JS states */
}

.tool-result-box.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out forwards;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.result-header h3 {
    font-size: 1.15rem;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

.textarea-result {
    width: 100%;
    height: 200px;
    font-family: monospace;
    font-size: 0.875rem;
    padding: 16px;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    resize: vertical;
}

/* Preview items (e.g. cropped/resized image) */
.preview-container {
    max-width: 100%;
    max-height: 400px;
    overflow: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background-color: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.preview-container img {
    max-height: 380px;
    object-fit: contain;
}

/* SEO Content Area below the interface */
.tool-seo-content {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 40px;
    margin-top: 40px;
}

.tool-seo-content h2 {
    font-size: 1.8rem;
    margin: 32px 0 16px;
}

.tool-seo-content h2:first-of-type {
    margin-top: 0;
}

.tool-seo-content h3 {
    font-size: 1.35rem;
    margin: 24px 0 12px;
}

.tool-seo-content h4 {
    font-size: 1.1rem;
    margin: 18px 0 8px;
}

.tool-seo-content p {
    font-size: 0.975rem;
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.8;
}

.tool-seo-content ul, .tool-seo-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.tool-seo-content li {
    font-size: 0.975rem;
    color: var(--gray-600);
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Static Pages Content Layout */
.static-page-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.static-page-header h1 {
    color: var(--white);
    font-size: 2.75rem;
    margin-bottom: 12px;
}

.static-page-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.static-content-wrapper {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    padding: 48px;
    margin: 40px 0 80px;
}

.static-content-wrapper h2 {
    margin: 32px 0 16px;
}

.static-content-wrapper p {
    margin-bottom: 18px;
    color: var(--gray-600);
}

.static-content-wrapper ul, .static-content-wrapper ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.static-content-wrapper li {
    margin-bottom: 10px;
    color: var(--gray-600);
}

/* Breadcrumbs navigation */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 24px;
}

.breadcrumbs a {
    color: var(--gray-500);
}

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

.breadcrumbs span {
    user-select: none;
}

/* Sidebar Ads/Links layout for Tool Pages */
.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 1.15rem;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 10px;
}

.related-tools-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-tool-item-icon {
    width: 36px;
    height: 36px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.related-tool-item-icon svg {
    width: 18px;
    height: 18px;
}

.related-tool-item-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.related-tool-item-info a:hover h4 {
    color: var(--primary);
}

.related-tool-item-info p {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ==========================================================================
   Blog Layout & Article Typography Styles
   ========================================================================== */
.blog-list-hero {
    background: radial-gradient(circle at 10% 20%, rgba(239, 246, 255, 0.5) 0%, rgba(255, 255, 255, 0) 90%);
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.blog-list-hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--dark);
}

.blog-list-hero p {
    font-size: 1.1rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 60px 0 80px;
}

.blog-card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

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

.blog-card-img-placeholder {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(37, 99, 235, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gray-100);
}

.blog-card-img-placeholder svg {
    width: 64px;
    height: 64px;
}

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

.blog-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.blog-card-tag {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
    width: fit-content;
}

.blog-card h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--dark);
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
    flex-grow: 1;
}

.blog-card-link {
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    margin-top: 12px;
}

.blog-card-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: var(--transition-fast);
}

.blog-card:hover .blog-card-link svg {
    transform: translateX(4px);
}

.blog-article-hero {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 60px 0 40px;
}

.blog-article-hero-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-article-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.blog-article-hero h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    color: var(--dark);
}

.blog-article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-800);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-article-body p {
    margin-bottom: 8px;
}

.blog-article-body h2 {
    font-size: 1.8rem;
    margin-top: 24px;
    color: var(--dark);
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 8px;
}

.blog-article-body h3 {
    font-size: 1.35rem;
    margin-top: 16px;
    color: var(--dark);
}

.blog-article-body ul, .blog-article-body ol {
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-article-body li strong {
    color: var(--dark);
}

.blog-article-body blockquote {
    border-left: 4px solid var(--primary);
    background-color: var(--gray-50);
    padding: 16px 24px;
    font-style: italic;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.blog-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}

.blog-comparison-table th, .blog-comparison-table td {
    border: 1px solid var(--gray-200);
    padding: 12px 16px;
    text-align: left;
}

.blog-comparison-table th {
    background-color: var(--gray-50);
    font-weight: 600;
    color: var(--dark);
}

.blog-comparison-table tr:nth-child(even) td {
    background-color: rgba(249, 250, 251, 0.5);
}

.blog-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.blog-feature-card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.blog-feature-card h4 {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.blog-feature-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
}

.blog-feature-card span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--success);
    margin-top: auto;
}

/* ==========================================================================
   Global Interactive Search Dropdown UI (Glassmorphism & Interactive)
   ========================================================================== */
.header-search {
    position: relative;
}

.mega-menu-search-bar {
    position: relative;
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
    max-height: 380px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    flex-direction: column;
    padding: 6px;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.search-results-dropdown.show {
    display: flex;
}

/* Scrollbar styles */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}
.search-results-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.search-results-dropdown::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 3px;
}

.search-dropdown-header {
    font-size: 0.725rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    font-weight: 700;
    padding: 8px 12px 6px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 4px;
}

.search-empty-state {
    padding: 20px 16px;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.search-empty-state strong {
    color: var(--gray-800);
    font-weight: 600;
}

/* Individual Result Item */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s ease;
    margin: 2px 0;
    border-left: 3px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    border-left-color: var(--primary);
    transform: translateX(2px);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
    transition: all 0.2s ease;
}

.search-result-item:hover .search-result-icon,
.search-result-item.selected .search-result-icon {
    transform: scale(1.05);
}

.search-result-content {
    flex-grow: 1;
    min-width: 0; /* Important for text truncation */
    display: flex;
    flex-direction: column;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.search-result-item:hover .search-result-title,
.search-result-item.selected .search-result-title {
    color: var(--primary);
}

.search-result-desc {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.search-result-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    margin-left: 12px;
    flex-shrink: 0;
}

.search-result-item:hover .search-result-badge,
.search-result-item.selected .search-result-badge {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary);
}

/* For Mega menu search alignment */
.mega-menu-search-bar .search-results-dropdown {
    left: 0;
    right: auto;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.05);
}
