/* 
 * Multi-Tool Design System 
 * Modern, Premium, and Responsive
 */

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

:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;

    /* Light Theme */
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Dark Theme Variables (will be overridden) */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --header-bg: rgba(15, 23, 42, 0.8);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

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

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

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

h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
}

h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

h3 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
}

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

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

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.logo img {
    height: 52px;
    width: auto;
    flex-shrink: 0;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.footer-logo img {
    height: 44px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
    padding: 1.5rem 0;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

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

/* Mobile Menu Button Styles */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
    z-index: 2001;
    border-radius: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 900px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    z-index: 1001;
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-column h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

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

.mega-links a {
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.mega-links a i {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mega-links a:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color) !important;
}

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

/* Universal Search Bar */
.nav-search {
    position: relative;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 1rem;
    height: 40px;
    width: 200px;
    transition: var(--transition);
}

.nav-search:focus-within {
    width: 300px;
    background: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.nav-search i {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.nav-search input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.nav-search input::placeholder {
    color: var(--text-muted);
}

/* Base Responsive styles for search */
@media (max-width: 991px) {
    .nav-search {
        display: none;
        /* Hide in header on tablet/mobile, move to mobile menu maybe? */
    }

    .nav-search.mobile-visible {
        display: flex;
        width: 100%;
        margin: 1rem 0;
    }
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 350px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-height: 480px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 2000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.search-results.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.search-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 0.95rem;
}

.search-item-info {
    display: flex;
    flex-direction: column;
}

.search-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.search-item-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-item:hover,
.search-item.selected {
    background: rgba(99, 102, 241, 0.05);
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dark Mode Search Adjustments */
[data-theme="dark"] .nav-search {
    background: rgba(255, 255, 255, 0.05);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Modern Hero Section */
.hero-modern {
    position: relative;
    padding: 1.5rem 0 1rem;
    overflow: hidden;
}

.hero-bg-accent {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
}

.hero-bg-accent.left {
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
}

.hero-bg-accent.right {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-content {
    max-width: 650px;
    z-index: 2;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

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

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

.floating {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes floatSlow {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-content h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
}

.hero-content p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

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

.hero-btn {
    font-size: 1.05rem;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
}

.stat-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.hero-visual {
    position: relative;
    z-index: 10;
}

.visual-wrapper {
    position: relative;
    width: 100%;
    border-radius: 24px;
    padding-bottom: 70%;
    /* landscape aspect to reduce height */
}

.hero-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 3;
    animation: float 6s ease-in-out infinite !important;
}

/* Wait, float animation uses transform Y, which conflicts with translate(-50%, -50%) */
/* So let's wrap it instead */
.visual-wrapper .hero-img {
    transform: none;
    top: 0;
    left: 0;
}

.glass-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    z-index: 1;
}

.orb-1 {
    top: -5%;
    right: -5%;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    opacity: 0.4;
}

.orb-2 {
    bottom: 5%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    opacity: 0.3;
}

.glass-card {
    position: absolute;
    bottom: -15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 4;
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

/* Tool Grid & Filtering */
.tools__filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.tag {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tag.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px -5px rgba(99, 102, 241, 0.4);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0 4rem;
}

@media (max-width: 480px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    /* Reduced from 2rem */
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    /* Ensure uniform height in grid */
    display: flex;
    flex-direction: column;
}

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

.tool-icon {
    width: 50px;
    /* Reduced from 60px */
    height: 50px;
    border-radius: 12px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    /* Reduced from 1.5rem */
    font-size: 1.5rem;
    /* Reduced from 1.8rem */
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    background: var(--primary-gradient);
    color: white;
}

.tool-card h3 {
    margin-bottom: 0.5rem;
    /* Reduced from 0.75rem */
    font-size: 1.15rem;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    /* Slightly smaller for compactness */
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

.tool-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass through to the link */
}

/* Ad Space Placeholder */
.ad-slot {
    width: 100%;
    max-width: 970px;
    height: 90px;
    margin: 2rem auto;
    background: rgba(0, 0, 0, 0.03);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

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

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-heading {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

/* Interactive Elements */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--card-bg);
    transition: var(--transition);
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.02);
}

.preview-container {
    margin-top: 2rem;
    display: none;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.preview-img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

/* Ensure all preview images and canvases in any tool fit the container */
.preview-container img,
.preview-container canvas {
    max-width: 100%;
    max-height: 70vh;
    /* Better than fixed 500px on small screens */
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

/* Format Selector UI */
.format-selection {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.format-selection label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.format-select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.format-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Unified Responsive Media Queries */

@media (max-width: 1200px) {
    .mega-menu {
        width: 800px;
    }

    .footer-grid {
        gap: 2rem;
    }
}

@media (max-width: 991px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 1.5rem 2rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        overflow-y: auto;
        gap: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-item {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item>a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.25rem 0.5rem;
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Transform Mega Menu into Accordion for Mobile */
    .mega-menu {
        position: static;
        transform: none;
        width: 100%;
        opacity: 1;
        visibility: visible;
        display: none;
        /* Toggle via JS or CSS class */
        grid-template-columns: 1fr;
        padding: 0 0 1rem 1rem;
        box-shadow: none;
        border: none;
        background: transparent;
        backdrop-filter: none;
        gap: 1rem;
    }

    .nav-item.active .mega-menu {
        display: grid;
    }

    .mega-column h4 {
        margin-top: 1rem;
        font-size: 0.75rem;
    }

    .mega-links a {
        padding: 0.75rem 0.5rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 1.5rem;
    }

    .footer-links {
        margin-bottom: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        width: 100%;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }
}

/* Premium Banner Styles */
.block__container {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    border: none;
    box-shadow: none;
}

.block__container:hover {
    box-shadow: none;
    border-color: transparent;
}

.banner-block {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.banner-block--container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.banner-block__image {
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.block__container:hover .banner-block__image {
    transform: scale(1.08) translateY(-10px) rotate(-2deg);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
}

.block__body {
    padding: 5rem 0;
    position: relative;
    z-index: 2;
}

.title1 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle1 {
    font-size: 1.15rem;
    color: #64748b;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.btn--premium {
    background: #1e293b;
    color: white !important;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 20px -5px rgba(30, 41, 59, 0.4);
}

.btn--premium:hover {
    background: #0f172a;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(30, 41, 59, 0.6);
}

.btn--premium svg path {
    fill: #fcd34d;
    /* Gold color for the crown */
}

/* Bootstrap-like Grid Helpers for the Banner */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

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

.col-xl-6,
.col-lg-7,
.col-md-12,
.col-lg-1,
.col-xl-5,
.col-lg-4 {
    padding: 0 15px;
    width: 100%;
}

@media (min-width: 992px) {
    .col-lg-1 {
        width: 8.33%;
    }

    .col-lg-7 {
        width: 58.33%;
    }

    .col-lg-4 {
        width: 33.33%;
    }
}

@media (min-width: 1200px) {
    .col-xl-6 {
        width: 50%;
    }

    .col-xl-5 {
        width: 41.66%;
    }
}

@media (max-width: 991px) {
    .banner-block {
        display: none;
    }

    .banner-block--mobile {
        height: 200px;
        background: url('../tools_advertisement.png') center/cover;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .block__body {
        padding: 3rem 2rem;
        text-align: center;
    }

    .subtitle1 {
        margin: 0 auto 2rem;
    }

    .title1 {
        font-size: 2rem;
    }
}

/* Banner Variants */
.block__container--indigo {
    background: transparent;
    border-color: transparent;
}

.block__container--indigo .title1 {
    color: #312e81;
}

.block__container--indigo .subtitle1 {
    color: #4338ca;
}

.block__container--indigo .btn--premium {
    background: #4338ca;
    box-shadow: 0 10px 20px -5px rgba(67, 56, 202, 0.3);
}

.block__container--indigo .btn--premium:hover {
    background: #3730a3;
}

.banner-block--left {
    right: auto;
    left: 0;
}

.banner-block--left .banner-block--container {
    justify-content: flex-start;
}

.block__container:hover .banner-block--left .banner-block__image {
    transform: scale(1.08) translateY(-10px) rotate(2deg);
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.2));
}

@media (max-width: 991px) {
    .block__container--indigo .banner-block--mobile {
        background: url('../iloveimg_style_banner.png') center/cover;
    }
}

/* Tool Page Layout with Sidebar */
.tool-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.tool-sidebar {
    position: sticky;
    top: 100px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

/* Custom Scrollbar for Sidebar */
.tool-sidebar::-webkit-scrollbar {
    width: 4px;
}

.tool-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.sidebar-group {
    margin-bottom: 2rem;
}

.sidebar-group h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-links a {
    font-size: 0.9rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    transition: var(--transition);
}

.sidebar-links a i {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sidebar-links a:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
}

.sidebar-links a.active {
    background: var(--primary-gradient);
    color: white;
}

.sidebar-links a.active i {
    color: white;
}

.tool-main-body {
    min-width: 0;
    /* Fix flex/grid overflow issues */
}

@media (max-width: 1200px) {
    .tool-page-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tool-sidebar {
        position: static;
        max-height: none;
        display: flex;
        overflow-x: auto;
        padding: 1rem;
        gap: 1.5rem;
        white-space: nowrap;
    }

    .sidebar-group {
        margin-bottom: 3rem;
        padding-right: 2rem;
    }

    .sidebar-links {
        flex-direction: row;
    }
}


/* Feedback & Suggestions Section */
.feedback-cta {
    margin: 6rem 0;
    padding: 4rem;
    background: var(--primary-gradient);
    border-radius: 32px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.feedback-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(60px);
}

.feedback-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.feedback-text h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.feedback-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

.feedback-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-feedback {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.btn-feedback:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-feedback i {
    font-size: 1.2rem;
    margin-right: 10px;
}

@media (max-width: 992px) {
    .feedback-content {
        flex-direction: column;
        text-align: center;
    }

    .feedback-cta {
        padding: 3rem 2rem;
    }

    .feedback-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .feedback-actions {
        flex-direction: column;
    }

    .btn-feedback {
        width: 100%;
        justify-content: center;
    }

    .feedback-text h2 {
        font-size: 1.8rem;
    }
}


/* Global Tool Feedback Form */
.tool-feedback-section {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.feedback-form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.feedback-form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.feedback-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

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

.feedback-input,
.feedback-select,
.feedback-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.feedback-select,
.feedback-input {
    min-width: 180px;
    /* Reduced to avoid overflow while maintaining usability */
}

.feedback-input:focus,
.feedback-select:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.feedback-textarea {
    min-height: 15rem;
    /* Increased from 120px to 15rem (~160px) */
    resize: vertical;
}

.feedback-submit {
    width: 100%;
    padding: 1rem;
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 12px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.feedback-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

/* Success Message Overlay */
.feedback-success-overlay {
    text-align: center;
    padding: 2rem;
    display: none;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #10b981;
    color: white;
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 768px) {
    .feedback-grid {
        grid-template-columns: 1fr;
    }

    .feedback-form-card {
        padding: 2rem;
    }
}


/* Feedback Form Enhancements */
.feedback-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.feedback-form-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feedback-form-group {
    margin-bottom: 1.5rem;
}

.feedback-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.feedback-input,
.feedback-select,
.feedback-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.feedback-input::placeholder,
.feedback-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.feedback-input:focus,
.feedback-select:focus,
.feedback-textarea:focus {
    outline: none;
    background: rgba(30, 41, 59, 0.3);
    border-color: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.feedback-select option {
    background: var(--card-bg);
    color: var(--text-color);
}

.btn-submit-feedback {
    width: 100%;
    padding: 1.2rem;
    background: white;
    color: var(--primary-color);
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-submit-feedback:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: #f1f5f9;
}

.feedback-success-state {
    text-align: center;
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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


/* Compact Feedback Row Layout */
.feedback-form-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
    width: 100%;
}

.feedback-form-horizontal .feedback-form-group {
    margin-bottom: 0;
    flex: 1 1 180px;
    /* Grow from 180px base */
}

.feedback-form-horizontal .feedback-form-group:nth-child(1),
.feedback-form-horizontal .feedback-form-group:nth-child(2) {
    flex: 1.2 1 180px;
}

.feedback-form-horizontal .feedback-form-group.flex-2 {
    flex: 2 1 180px;
}

.feedback-form-horizontal .feedback-textarea {
    min-height: 80px;
    height: 80px;
}

.feedback-form-horizontal .btn-submit-feedback {
    margin-top: 0;
    height: 48px;
    /* Standard input height */
    padding: 0 2rem;
    white-space: nowrap;
    width: auto;
}

.feedback-cta.compact-cta {
    padding: 1.5rem 3rem;
    margin: 3rem 0;
}

.feedback-grid.compact-grid {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    text-align: left;
    gap: 3rem;
    align-items: center;
}

.feedback-grid.compact-grid .feedback-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.feedback-grid.compact-grid .feedback-text p {
    font-size: 0.95rem;
    margin: 0;
}

@media (max-width: 1100px) {
    .feedback-form-horizontal {
        flex-direction: column;
        gap: 1rem;
    }

    .feedback-form-horizontal .feedback-form-group,
    .feedback-form-horizontal .feedback-form-group.flex-2 {
        width: 100%;
        flex: none;
    }

    .feedback-form-horizontal .btn-submit-feedback {
        width: 100%;
    }
}

/* Tool Page Layout (Restored) */
.tool-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Tool Hero Section - full-width breakout */
.tool-hero {
    text-align: center;
    padding: 2rem 2rem 1.5rem !important;
    background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(168,85,247,0.06) 100%);
    border-radius: 0;
    margin-bottom: 2rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);

    /* Break out of the middle grid column to span all 3 columns */
    width: calc(100% + 560px + 6rem);   /* +2 sidebars (280px each) + 2 gaps (3rem each) */
    margin-left: calc(-280px - 3rem);   /* pull left past sidebar + gap */
    position: relative;
    z-index: 2;                         /* render above sticky sidebar */
}

.tool-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.tool-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 1;                         /* stay below hero */
}

.tool-sidebar::-webkit-scrollbar {
    width: 6px;
}

.tool-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

.sidebar-group {
    margin-bottom: 2rem;
}

.sidebar-group:last-child {
    margin-bottom: 0;
}

.sidebar-group h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sidebar-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.sidebar-links a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.sidebar-links a.active {
    background: var(--primary-color);
    color: white;
}

.tool-main-body {
    min-width: 0;
}

@media (max-width: 1024px) {
    .tool-page-layout {
        grid-template-columns: 1fr;
    }

    .tool-sidebar {
        display: none;
    }
}

/* Professional Site Footer */
.site-footer {
    background: var(--card-bg);
    /* Use card background for slight elevation */
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

/* Optional subtle background glow for the footer */
.site-footer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.site-footer .container {
    position: relative;
    z-index: 1;
}

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

.footer-logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    letter-spacing: -0.05em;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 320px;
}

.footer-heading {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.footer-links {
    display: flex;
    flex-direction: column;

}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Base Footer (for pages lacking full site-footer HTML structure) */
footer:not(.site-footer) {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}   

/* How It Works Section */
.how-it-works-section {
    padding: 1rem 0;
    position: relative;
    background: transparent;
}

.hiw-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.hiw-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hiw-header h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hiw-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.hiw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}

.hiw-step {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Connecting Line */
.hiw-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px; /* Center of the 48px circle */
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(99, 102, 241, 0.2);
    z-index: -1;
}

.hiw-number {
    position: relative;
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.hiw-step h3 {
    font-size: 1.125rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hiw-step p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 991px) {
    .hiw-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 2rem;
    }
    
    .hiw-step:not(:last-child)::after {
        display: none; /* Hide connecting line on tablet and mobile */
    }
}

@media (max-width: 576px) {
    .hiw-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ===========================
   Horizontal Feedback Bar
   =========================== */
.feedback-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.12) 50%, rgba(99, 102, 241, 0.06) 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.feedback-section::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.feedback-section::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.feedback-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.feedback-field {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.feedback-field.message-field {
    flex: 2;
}

.feedback-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.feedback-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.feedback-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.feedback-btn {
    height: 44px;
    padding: 0 1.5rem;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    white-space: nowrap;
}

.feedback-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

@media (max-width: 1200px) {
    .feedback-bar {
        flex-wrap: wrap;
    }
    .feedback-field {
        min-width: 200px;
        flex: 1 1 200px;
    }
}

@media (max-width: 768px) {
    .feedback-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .feedback-field,
    .feedback-btn {
        width: 100%;
        min-width: 100%;
    }
    .feedback-field.message-field {
        flex: 1;
    }
    .feedback-btn {
        height: auto;
        padding: 0.75rem 1.25rem;
        justify-content: center;
    }
    .feedback-section {
        padding: 2rem 1rem;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .feedback-section {
        padding: 1.5rem 0.75rem;
        border-radius: 10px;
    }
    .feedback-bar {
        padding: 1rem;
        gap: 0.75rem;
    }
    .feedback-field label {
        font-size: 0.8rem;
    }
    .feedback-input {
        padding: 0.65rem 0.875rem;
        font-size: 0.9rem;
    }
}

/* ===========================
   Accordion FAQ Section
   =========================== */
.faq-section {
    padding: 4rem 0 5rem;
}

.faq-list {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    align-items: start;
}

@media (max-width: 768px) {
    .faq-list {
        grid-template-columns: 1fr;
    }
    .faq-section {
        padding: 2.5rem 0 3rem;
    }
    .faq-toggle {
        padding: 1rem 1.25rem;
    }
    .faq-body p {
        padding: 0.75rem 1.25rem 1rem;
    }
}

@media (max-width: 480px) {
    .faq-toggle span {
        font-size: 0.875rem;
    }
}

.faq-item {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: box-shadow var(--transition), border-color var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: rgba(99, 102, 241, 0.3);
}

.faq-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    text-align: left;
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    gap: 1rem;
}

.faq-toggle:hover {
    background: var(--bg-color);
}

.faq-toggle span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.faq-icon.open {
    transform: rotate(45deg);
    color: var(--primary-color);
}

.faq-body {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.faq-body p {
    padding: 1rem 1.5rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0;
}

/* ===================================
   COMPREHENSIVE RESPONSIVE FIXES
   =================================== */

@media (min-width: 1400px) {
    .hero-container {
        gap: 4rem;
    }
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 1199px) {
    .hiw-grid {
        gap: 1.5rem;
    }
    .feedback-section {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 991px) {
    .hiw-header {
        margin-bottom: 2.5rem;
    }
    .faq-section {
        padding: 3rem 0 4rem;
    }
    .how-it-works-section {
        padding: 0.5rem 0;
    }
}

@media (max-width: 768px) {
    .hero-modern {
        padding: 1rem 0 0.5rem;
    }
    .hero-content h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
    .hero-content p {
        font-size: 1rem;
    }
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.85rem;
    }
    .hiw-header {
        margin-bottom: 2rem;
    }
    .hiw-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hiw-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .hiw-step h3 {
        font-size: 1rem;
    }
    .hiw-badge {
        font-size: 0.75rem;
    }
}