/* ================================================================
   TOOLS WEBSITE — WHITE + BLUE DESIGN SYSTEM
   Clean White (#FFFFFF) + Modern Blue (#2563EB)
   ================================================================ */

/* — Google Font — */
/* — Google Font loaded via <link> in layout head for performance — */

/* ================================================================
   CSS CUSTOM PROPERTIES
   ================================================================ */
:root {
    /* Backgrounds */
    --bg-body: #F8F9FB;
    --bg-primary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-surface: #F1F5F9;
    --bg-elevated: #FFFFFF;
    --bg-input: #FFFFFF;
    --bg-navbar: rgba(255, 255, 255, 0.98);

    /* Accent — Modern Blue */
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-dark: #1E40AF;
    --accent-glow: rgba(37, 99, 235, 0.15);
    --accent-soft: rgba(37, 99, 235, 0.05);
    --accent-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);

    /* Text */
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --text-inverse: #FFFFFF;

    /* Borders */
    --border-color: #E2E8F0;
    --border-light: #EDF2F7;
    --border-accent: var(--accent);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-accent: 0 10px 15px -3px rgba(37, 99, 235, 0.15);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.1s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ================================================================
   GLOBAL RESETS & BASE
   ================================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* Global Container & Row Fix for Shadow Clipping */
.container {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .row {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }
    
    [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}


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

a:hover {
    color: var(--accent-hover);
    text-decoration: none; /* Removed global hover underline for a cleaner look */
}

::selection {
    background: var(--accent);
    color: var(--text-inverse);
}

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: #CCD0DB;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar-custom {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 2px solid var(--accent); /* Subtle professional accent */
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-normal);
}

.navbar-custom .navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
}

.brand-logo {
    height: 38px; /* Professional standard navbar height */
    width: auto;
    object-fit: contain;
    transition: all var(--transition-normal);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
    border-radius: 50%;
    background: transparent;
}

.navbar-brand:hover .brand-logo {
    transform: scale(1.02);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

@media (max-width: 480px) {
    .brand-logo {
        height: 32px;
    }
}

.navbar-custom .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.5rem 0.9rem !important;
    margin: 0 0.15rem;
    border-radius: 6px;
    letter-spacing: -0.01em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    position: relative;
}

.navbar-custom .nav-link:hover {
    color: var(--accent) !important;
    background: rgba(37, 99, 235, 0.04);
    text-decoration: none !important;
}

.navbar-custom .nav-link.active {
    color: var(--accent) !important;
    background: var(--accent-soft);
}

/* Active State Indicator Dot */
.navbar-custom .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateX(-50%);
}

.navbar-custom .dropdown-menu {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    margin-top: 0.5rem;
    transition: opacity 0.15s ease;
}

.navbar-custom .dropdown-item {
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    text-decoration: none !important;
}

.navbar-custom .dropdown-item:hover {
    background: var(--accent-soft);
    color: var(--accent);
    text-decoration: none !important;
}

.navbar-custom .dropdown-item i {
    width: 22px;
    margin-right: 6px;
    color: var(--accent);
    opacity: 0.7;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
}

.navbar-toggler:focus {
    box-shadow: none;
    background: var(--accent-soft);
}

/* Navbar CTA Button */
.btn-navbar-cta {
    background: var(--accent);
    color: white !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.55rem 1.15rem !important;
    border-radius: 8px;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15); /* Professional inner-glow */
}

.btn-navbar-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    color: white !important;
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero-section {
    padding: 7rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top right, #F0F7FF 0%, #FFFFFF 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-section h1 {
    font-size: clamp(2.2rem, 10vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    overflow-wrap: break-word;
    word-break: break-word;
}

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

.hero-section .lead {
    font-size: clamp(1rem, 4vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

@keyframes pulse-slow {
    from {
        transform: scale(1);
        opacity: 0.5;
    }

    to {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Hero Search */
.hero-search {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-search input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.8rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-normal);
}

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

.hero-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 15px 50px rgba(37, 99, 235, 0.15);
    background: #fff;
    transform: translateY(-2px);
}

.hero-search .search-icon {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

/* ================================================================
   CATEGORY SECTIONS
   ================================================================ */
.category-section {
    padding: 2rem 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-header .cat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.category-header .cat-icon.convert {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.category-header .cat-icon.compress {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.category-header .cat-icon.utils {
    background: rgba(168, 85, 247, 0.1);
    color: #A855F7;
}

.category-header .cat-icon.api {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.category-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.category-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ================================================================
   ELITE TOOL CARDS — REDESIGNED (V3)
   ================================================================ */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    min-width: 0;
}

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

.tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.05);
}

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

.tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    z-index: 1;
    position: relative;
}

.tool-card:hover .tool-icon {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.tool-body {
    flex-grow: 1;
    z-index: 1;
    position: relative;
}

.tool-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.3;
    transition: color 0.2s ease;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tool-card:hover .tool-name {
    color: var(--accent);
}

.tool-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.85;
}

.tool-arrow {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    transition: all 0.2s ease;
    z-index: 1;
    position: relative;
}

.tool-arrow i {
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-arrow i {
    transform: translateX(5px);
}

/* Tool Card Modern (Legacy Support) */
.tool-card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.tool-card-modern:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}

/* ================================================================
   COMPACT & PROFESSIONAL RELATED TOOLS CARDS
   ================================================================ */
.related-tools-section .tool-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card, #ffffff);
    height: 100% !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.015);
}

.related-tools-section .tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.05);
}

/* Eliminate gradient background mask on hover to maintain premium simplicity */
.related-tools-section .tool-card::before {
    display: none !important;
}

.related-tools-section .tool-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-soft, rgba(37, 99, 235, 0.06));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-bottom: 0 !important; /* Override vertical margin */
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.related-tools-section .tool-card:hover .tool-icon {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.related-tools-section .tool-body {
    flex-grow: 1;
    min-width: 0; /* Enable ellipsis truncation */
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.related-tools-section .tool-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin-bottom: 0 !important;
    line-height: 1.25;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-tools-section .tool-card:hover .tool-name {
    color: var(--accent);
}

.related-tools-section .tool-desc {
    font-size: 0.72rem;
    color: var(--text-secondary, #64748b);
    line-height: 1.3;
    margin-bottom: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.75;
}

/* Bulky arrow links are hidden for compact aesthetic */
.related-tools-section .tool-arrow {
    display: none !important;
}


#category-tools-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 1rem !important;
}

@media (max-width: 1200px) {
    #category-tools-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 992px) {
    #category-tools-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.875rem !important;
    }
}

@media (max-width: 768px) {
    #category-tools-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 576px) {
    #category-tools-grid {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 1rem !important;
    }
}

.cat-tool-item {
    width: auto !important;
    flex: none !important;
    max-width: none !important;
}


/* ================================================================
   PROFESSIONAL SIDEBAR (V2)
   ================================================================ */
.sidebar-professional {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav .nav-link {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.sidebar-nav .nav-link:hover {
    background: #f8fafc;
    color: #2563eb;
}

.sidebar-nav .nav-link.active {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-color: rgba(37, 99, 235, 0.1);
}

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.btn-back-hub {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    transition: all 0.2s ease;
}

.btn-back-hub:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}



/* ================================================================
   AD SLOT STYLING (FUTURE READY)
   ================================================================ */
.ad-slot-container {
    min-height: 90px;
    max-width: 728px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

/* ================================================================
   UPLOAD ZONE (TOOL PAGES)
   ================================================================ */
.upload-zone-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.upload-zone {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: #F5F9FF;
}

.upload-zone .upload-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--accent-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--accent);
    transition: all var(--transition-fast);
}

.upload-zone:hover .upload-icon,
.upload-zone.dragover .upload-icon {
    background: var(--accent);
    color: #fff;
}

.upload-zone h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.upload-zone .browse-link {
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px dashed var(--accent);
}

.upload-zone .file-info {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* File selected state */
.upload-zone.has-file {
    border-color: var(--accent);
    border-style: solid;
}

.upload-zone .selected-file {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    margin-top: 1.25rem;
}

.upload-zone.has-file .selected-file {
    display: flex;
}

.selected-file .file-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    flex-shrink: 0;
}

.selected-file .file-details {
    text-align: left;
    flex: 1;
    min-width: 0;
}

.selected-file .file-details .name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-file .file-details .size {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.selected-file .remove-file {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.08);
    color: #EF4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.selected-file .remove-file:hover {
    background: #EF4444;
    color: #fff;
}

/* ================================================================
   PROGRESS & PROCESSING
   ================================================================ */
.progress-section {
    display: none;
    max-width: 720px;
    margin: 2rem auto 0;
}

.progress-section.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

.progress-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-header .status-text {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-header .status-text .spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.progress-header .percent-text {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
}

.progress-bar-custom {
    height: 10px;
    background: var(--bg-surface);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 5px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 106, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 106, 0, 0);
    }
}

/* ================================================================
   RESULT SECTION
   ================================================================ */
.result-section {
    display: none;
    max-width: 720px;
    margin: 2rem auto 0;
}

.result-section.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.result-card .success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    margin: 0 auto 1.25rem;
}

.result-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.result-stats .stat {
    text-align: center;
}

.result-stats .stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.result-stats .stat .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.result-stats .stat .value.green {
    color: var(--accent);
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-accent {
    background: var(--accent-gradient);
    color: #fff !important;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.btn-accent:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    opacity: 0.98;
}

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

.btn-accent-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-outline-custom {
    background: transparent;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
}

.btn-outline-custom:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    background: var(--accent-soft);
}

.btn-process {
    display: none;
    margin: 1.5rem auto 0;
}

.btn-process.active {
    display: inline-flex;
}

/* ================================================================
   SEO CONTENT SECTIONS (TOOL PAGES)
   ================================================================ */
.seo-section {
    padding: 2.5rem 0;
}

.seo-section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.step-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.step-card .step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.2);
}

.step-card h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.5;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.feature-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.feature-item .f-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.feature-item h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.feature-item p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* FAQ Accordion */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

.faq-section .accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-section .accordion-button {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1.1rem 1.5rem;
    box-shadow: none !important;
}

.faq-section .accordion-button:not(.collapsed) {
    background: var(--bg-surface);
    color: var(--accent);
}

.faq-section .accordion-body {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 1rem 1.5rem 1.25rem;
    line-height: 1.7;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: #F8FAFC;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1.2fr repeat(auto-fit, minmax(130px, 1fr));
        gap: 1.5rem;
    }
}

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

    .footer-brand-section {
        grid-column: span 3;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1.5rem;
    }
}

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

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

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-logo {
    height: 64px; /* Scaled down for professional balance */
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

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

.site-footer h6 {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

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

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

.footer-links a:hover {
    color: var(--accent);
    text-decoration: none !important;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.footer-social a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ================================================================
   TOOL OPTIONS PANEL
   ================================================================ */
.tool-options-container {
    display: none;
    max-width: 720px;
    margin: 2rem auto 0;
    animation: fadeInUp 0.4s ease;
}

.tool-options-container.active {
    display: block;
}

.options-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.options-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.options-card h4 i {
    color: var(--accent);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.option-group {
    margin-bottom: 0;
}

.option-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.option-group select,
.option-group input[type="text"],
.option-group input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-fast);
}

.option-group select:focus,
.option-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Slider Style */
.slider-group {
    padding: 0.25rem 0;
}

.option-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-surface);
    border-radius: 5px;
    outline: none;
    margin: 1rem 0 0.5rem;
}

.option-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s ease;
}

.option-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-value {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.95rem;
}

/* Checkbox Style */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

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

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

/* ================================================================
   TOOL PAGE LAYOUT
   ================================================================ */
.tool-page-header {
    text-align: center;
    padding: 3rem 0 1rem;
}

.tool-page-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.25;
}

.tool-page-header h1 .highlight {
    color: var(--accent);
}

.tool-page-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.tool-content {
    padding: 2rem 0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
    .navbar-expand-lg .navbar-toggler {
        display: block !important;
    }

    .navbar-expand-lg .navbar-collapse {
        display: none !important;
    }

    .navbar-expand-lg .navbar-collapse.show {
        display: block !important;
    }

    .navbar-expand-lg .navbar-nav {
        flex-direction: column;
        padding-top: 1rem;
    }

    .navbar-expand-lg .nav-link {
        padding: 0.75rem 0 !important;
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 5rem 1rem 3rem;
    }

    .hero-section h1 {
        letter-spacing: -0.02em;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

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

    .ad-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 1rem 2rem;
    }

    .tool-page-header h1 {
        font-size: 1.5rem;
    }

    .upload-zone {
        padding: 2.5rem 1.25rem;
    }

    .result-stats {
        gap: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

@media (max-width: 576px) {
    .hero-search input {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 1rem;
    }

    .hero-search .search-icon {
        left: 1rem;
    }

    .upload-zone {
        padding: 2rem 1rem;
    }

    .upload-zone .upload-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }

    .result-actions {
        flex-direction: column;
        width: 100%;
    }

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

/* ════════════ LIVE PREVIEW / INTERACTIVE ════════════ */
.live-preview-container {
    max-width: 800px;
    margin: 0 auto 2rem;
    animation: fadeIn 0.4s ease-out;
}

.preview-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.preview-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
}

.preview-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.preview-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

#preview-canvas-wrapper {
    position: relative;
    max-width: 100%;
    overflow: auto;
    border: 1px dashed var(--border-color);
    background: var(--bg-body);
    border-radius: var(--radius-md);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#preview-canvas {
    display: block;
    max-width: 100%;
    cursor: crosshair;
}

#crop-overlay {
    position: absolute;
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    display: none;
}

.color-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    width: 100%;
    border: 1px solid var(--border-color);
}

.color-swatch-large {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    border: 3px solid #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.color-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.color-value {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.d-none {
    display: none !important;
}

/* ================================================================
   NEW UNIFIED INTERACTIVE TOOLS (CALCULATORS, ETC)
   ================================================================ */
.interactive-tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

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

    .result-panel {
        position: static;
        margin-top: 1.5rem;
        max-width: 100%;
    }
}

.calculator-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.calculator-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.calculator-header h4 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.calculator-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.tool-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--accent-gradient);
    color: #fff;
    flex-shrink: 0;
}

.result-panel {
    position: relative;
    top: 0;
}

.result-card-v2 {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.result-card-v2 .result-main-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0.5rem 0 1.5rem;
}

.result-card-v2 .result-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.result-sub-stats {
    display: flex;
    justify-content: space-around;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-light);
    margin-bottom: 1.25rem;
    gap: 1rem;
}

@media (max-width: 576px) {
    .result-sub-stats {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .result-sub-stats .stat-item {
        text-align: center;
    }
}

.result-sub-stats .stat-item {
    text-align: left;
    flex: 1;
}

.result-sub-stats .stat-item .stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    font-weight: 600;
}

.result-sub-stats .stat-item .stat-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Form Styles */
.form-label-custom {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
    word-break: break-word;
}

.form-control-custom {
    display: block;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #fff;
    transition: all var(--transition-fast);
}

.form-control-custom:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

.input-group-custom {
    display: flex;
}

.input-group-custom .input-group-text {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0 0.85rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.input-group-custom .form-control-custom {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.text-accent {
    color: var(--accent) !important;
}

.fw-black {
    font-weight: 900 !important;
}

.letter-spacing-tight {
    letter-spacing: -0.05em !important;
}

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

    .result-panel {
        position: static;
        margin-top: 2rem;
    }

    .result-card-v2 {
        padding: 1.5rem;
    }

    .result-card-v2 .result-main-value {
        font-size: 2rem;
    }
}

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

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

/* ================================================================
   CATEGORY HUB GRID (HOME PAGE)
   ================================================================ */
.category-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 3.5rem auto 0;
    position: relative;
    z-index: 10;
    justify-content: center;
}

.cat-hub-card {
    background: #ffffff !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 1.5rem 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    height: 100% !important;
}

.cat-hub-card:hover {
    border-color: #2563EB !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.08), 0 4px 6px -2px rgba(37, 99, 235, 0.03) !important;
}

.cat-hub-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.cat-hub-card:hover .cat-hub-icon {
    transform: scale(1.05) rotate(2deg);
}

.cat-hub-icon.convert {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.cat-hub-icon.compress {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.cat-hub-icon.utils {
    background: rgba(168, 85, 247, 0.1);
    color: #A855F7;
}

.cat-hub-icon.api {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.cat-hub-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
}

.cat-hub-count {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 600;
    display: inline-block;
    background: #F3F4F6;
    padding: 0.2rem 0.75rem;
    border-radius: 50px;
}

@media (max-width: 768px) {
    .category-hub-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .cat-hub-card {
        padding: 1.25rem 0.75rem !important;
    }
}

@media (max-width: 380px) {
    .category-hub-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   PREMIUM ALARM DASHBOARD (Glassmorphism & Neon)
   ================================================================ */
.alarm-dashboard-v3 {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 1.5rem;
    color: #fff;
}

.glass-orb-container {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alarm-orb {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--orb-color);
    box-shadow: 0 0 40px var(--orb-color);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.orb-pulse-slow {
    animation: orb-glow 4s infinite alternate;
}

.orb-pulse-fast {
    animation: orb-glow 1s infinite alternate;
}

.orb-pulse-active {
    animation: orb-shake 0.1s infinite;
    border-width: 4px;
    box-shadow: 0 0 80px var(--orb-color);
}

@keyframes orb-glow {
    from {
        transform: scale(0.95);
        opacity: 0.6;
    }

    to {
        transform: scale(1.05);
        opacity: 1;
        box-shadow: 0 0 60px var(--orb-color);
    }
}

@keyframes orb-shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    50% {
        transform: translate(-2px, -2px) rotate(1deg);
    }

    100% {
        transform: translate(1px, 1px) rotate(0deg);
    }
}

.alarm-time-display {
    z-index: 2;
}

.digital-time {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.digital-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
}

.btn-dismiss-premium {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
    transition: all 0.3s;
    margin-top: 1rem;
    width: 100%;
}

.btn-dismiss-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.5);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================================================================
   ALERT OVERLAY
   ================================================================ */
#alert-overlay-glass {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.alarm-active {
    animation: flash-red 0.5s infinite;
}

@keyframes flash-red {
    0% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(239, 68, 68, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* ================================================================
   ANALOG & DIGITAL ALARM OVERHAUL (Reference Design)
   ================================================================ */
.alarm-design-wrapper {
    background: #fff;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.alarm-shell-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
    text-align: left;
}

.shell-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1px;
}

.navy-alarm-slate {
    background: #1a2233;
    border-radius: 30px;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.3);
}

.red-ring-center {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 6px solid #ff7a7a;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: radial-gradient(circle, rgba(255, 122, 122, 0) 60%, rgba(255, 122, 122, 0.05) 100%);
}

.clock-display-zone {
    text-align: center;
    z-index: 2;
}

.alarm-label-small {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.digital-clock-neon {
    font-size: 3.8rem;
    font-weight: 900;
    color: #fff;
    font-family: 'Outfit', -apple-system, sans-serif;
    letter-spacing: -1px;
    line-height: 1;
}

.btn-dismiss-pill {
    background: transparent;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 0.85rem 2.8rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-dismiss-pill i {
    font-size: 1rem;
}

.btn-dismiss-pill:hover {
    background: rgba(255, 77, 77, 0.05);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 77, 77, 0.1);
}

.btn-dismiss-pill:active {
    transform: scale(0.95);
}

/* Ringing Animation */
.alarm-active .red-ring-center {
    animation: pulse-red-ring 1s infinite alternate;
}

@keyframes pulse-red-ring {
    from {
        box-shadow: 0 0 10px rgba(255, 122, 122, 0.2);
        transform: scale(1);
    }

    to {
        box-shadow: 0 0 40px rgba(255, 122, 122, 0.6);
        transform: scale(1.02);
    }
}
/* ================================================================
   EXTENSION PROMOTION (Phase 2 & 3)
   ================================================================ */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.btn-extension-hero {
    background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
    color: white !important;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    box-shadow: 0 10px 25px rgba(233, 69, 96, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

.btn-extension-hero:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 35px rgba(233, 69, 96, 0.4);
    background: linear-gradient(135deg, #ff4d6d 0%, #ff8787 100%);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.1);
    color: #475569 !important;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

.btn-outline-white:hover {
    background: #fff;
    border-color: var(--accent);
    color: var(--accent) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .btn-extension-hero, .btn-outline-white {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
}

/* Navbar Extension Polish (Matching User Image) */
.btn-extension-nav {
    background: var(--accent);
    color: white !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem !important;
    border-radius: 50px; /* Pill shape from image */
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-extension-nav {
    background: var(--accent);
    color: white !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem !important;
    border-radius: 50px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-extension-nav span {
    text-decoration: none; /* Removed underline as per user request */
}

.btn-extension-nav:hover {
    background: var(--accent-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    color: white !important;
}

/* Prevent horizontal scroll while allowing dropdowns to be visible */
.navbar-collapse {
    overflow-x: visible;
}

/* Ensure no internal scrollbars on expanded navbar (Laptop/Desktop) */
@media (min-width: 1200px) {
    .navbar-expand-xl .navbar-collapse {
        overflow: visible !important;
    }
}

/* On mobile/tablet, limit height vertically to allow scrolling long lists */
@media (max-width: 1199px) {
    .navbar-collapse {
        max-height: 85vh; /* Prevents menu from exceeding screen height */
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* Responsive Polish: Prevent horizontal scroll by scaling navigation on large laptops */
@media (min-width: 1200px) and (max-width: 1400px) {
    .navbar-custom {
        padding: 0.5rem 0;
    }
    .navbar-custom .nav-link {
        padding: 0.5rem 0.5rem !important;
        font-size: 0.8rem !important;
    }
    .btn-extension-nav {
        padding: 0.45rem 1rem !important;
        font-size: 0.75rem !important;
    }
    .btn-extension-nav i {
        display: none; /* Hide arrow to save space on medium laptops */
    }
}

/* ================================================================
   REBUILT HEALTH TOOLS — SHARED OUTPUT CARD STYLES
   ================================================================ */
.output-card-themed {
    background: var(--tool-bg, #f8fafc);
    border: 2px solid color-mix(in srgb, var(--tool-color, #3b82f6) 20%, #e5e7eb);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.output-hero {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}

.output-hero-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #64748b;
}

.output-hero-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--tool-color, #1e293b);
    line-height: 1;
    margin: 0.5rem 0;
    letter-spacing: -2px;
}

.output-hero-unit {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
}

.stat-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
    border-color: var(--tool-color, #3b82f6);
    transform: translateY(-2px);
}

.stat-card-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
}

@media (max-width: 576px) {
    .output-hero-value {
        font-size: 2.5rem;
    }

    .stat-card {
        padding: 0.75rem 0.5rem;
    }

    .stat-card-value {
        font-size: 1.1rem;
    }
}
