@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

/* Global Styling */
:root {
    --font-arabic: "Cairo", sans-serif;
    --font-base: "Cairo", "Poppins", sans-serif;
    
    /* Solid background colors - no gradients */
    --primary-gradient: #f5f5f5;
    --primary-color: #4682B4;
    
    /* Light mode colors */
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --background-tertiary: #e9ecef;
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    --input-background: #ffffff;
    --input-focus-background: #ffffff;
    
    /* Status colors */
    --status-success-bg: #d4edda;
    --status-error-bg: #f8d7da;
    --status-info-bg: #cce7ff;
    --status-warning-bg: #fff3cd;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-gradient: #000000 !important;
        --background-primary: rgba(0, 0, 0, 0.95) !important;
        --background-secondary: #1a1a1a !important;
        --background-tertiary: #333333 !important;
        --text-primary: #f9fafb !important;
        --text-secondary: #d1d5db !important;
        --border-color: #333333 !important;
        --border-light: #4a4a4a !important;
        --input-background: #1a1a1a !important;
        --input-focus-background: #333333 !important;
        --status-success-bg: #1e5128 !important;
        --status-error-bg: #5d1a1d !important;
        --status-info-bg: #1e3a8a !important;
        --status-warning-bg: #92400e !important;
    }
}

.dark-mode {
    --primary-gradient: #000000 !important;
    --background-primary: rgba(0, 0, 0, 0.95) !important;
    --background-secondary: #1a1a1a !important;
    --background-tertiary: #333333 !important;
    --text-primary: #f9fafb !important;
    --text-secondary: #d1d5db !important;
    --border-color: #333333 !important;
    --border-light: #4a4a4a !important;
    --input-background: #1a1a1a !important;
    --input-focus-background: #333333 !important;
    --status-success-bg: #1e5128 !important;
    --status-error-bg: #5d1a1d !important;
    --status-info-bg: #1e3a8a !important;
    --status-warning-bg: #92400e !important;
}

.dark-mode body {
    background: #000000 !important;
}

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

body {
    font-family: var(--font-base);
    background-color: var(--background-primary);
    color: var(--text-primary);
    text-align: center;
    margin: 0;
    padding: 0;
    padding-top: 100px; /* Account for fixed header - Updated per template */
    transition: background 0.3s ease, color 0.3s ease;
}

/* Visually hidden but accessible to screen readers */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Category Sections */
.category-section {
    margin-bottom: 20px;
}

.category-title {
    text-align: left;
    margin: 40px 0 15px 0;
    padding: 20px 25px;
    border-bottom: none;
    color: #2c3e50;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-title:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.dark-mode .category-title {
    background: #2d2d2d;
    border-color: #444;
    color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dark-mode .category-title:hover {
    background: #3d3d3d;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.category-title .title-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i:first-child {
    color: #007bff;
    font-size: 1.4rem;
}

.dark-mode .category-title i:first-child {
    color: #66d9ff;
}

.toggle-icon {
    color: #6c757d;
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.category-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    max-height: 1000px;
}

.category-content.collapsed {
    max-height: 0;
}

.coming-soon {
    background-color: #f8f9fa;
    color: #6c757d;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    min-height: 120px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.coming-soon:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.dark-mode .coming-soon {
    background-color: #2d2d2d;
    color: #adb5bd;
    border-color: #495057;
}

.dark-mode .coming-soon:hover {
    background-color: #3d3d3d;
    border-color: #6c757d;
}

/* Tool Grid Layout */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    padding: 25px 20px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.tool-card i {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.tool-card:hover i {
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 1.3rem;
    margin: 10px 0 8px 0;
    color: #2c3e50;
    font-weight: 600;
}

.tool-card p {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

.dark-mode .tool-card {
    background: #2d2d2d;
    border-color: #444;
    color: #f5f5f5;
}

.dark-mode .tool-card:hover {
    border-color: #66d9ff;
}

.dark-mode .tool-card i {
    color: #66d9ff;
}

.dark-mode .tool-card h3 {
    color: #f5f5f5;
}

.dark-mode .tool-card p {
    color: #a0aec0;
}


/* Tool Grid Layout */
.tool-grid, .featured-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.tool-card, .featured-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    padding: 25px 20px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
}

.tool-card:hover, .featured-tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.tool-card i, .featured-tool-card i {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.featured-tool-card i {
    font-size: 40px;
}

.tool-card:hover i, .featured-tool-card:hover i {
    transform: scale(1.1);
}

.tool-card h3, .featured-tool-card h3 {
    font-size: 1.3rem;
    margin: 10px 0 8px 0;
    color: #2c3e50;
    font-weight: 600;
}

.featured-tool-card h3 {
    font-size: 1.2rem;
}

.tool-card p, .featured-tool-card p {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

.coming-soon-card {
    background-color: #f8f9fa;
    color: #6c757d;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    min-height: 120px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.dark-mode .tool-card, .dark-mode .featured-tool-card {
    background: #2d2d2d;
    border-color: #444;
    color: #f5f5f5;
}

.dark-mode .tool-card:hover, .dark-mode .featured-tool-card:hover {
    border-color: #66d9ff;
}

.dark-mode .tool-card i, .dark-mode .featured-tool-card i {
    color: #66d9ff;
}

.dark-mode .tool-card h3, .dark-mode .featured-tool-card h3 {
    color: #f5f5f5;
}

.dark-mode .tool-card p, .dark-mode .featured-tool-card p {
    color: #a0aec0;
}

.dark-mode .coming-soon-card {
    background-color: #2d2d2d;
    color: #adb5bd;
    border-color: #495057;
}

/* Content Sections (About, How-to-Use) */
.content-section {
    padding: 30px 20px;
    border-bottom: 1px solid #e9ecef;
}

.content-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.how-to-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    text-align: center;
}

.how-to-step {
    padding: 20px;
}

.step-icon {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 15px;
    display: inline-block;
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    background-color: #e9f5ff;
    transition: all 0.3s ease;
}

.how-to-step:hover .step-icon {
    transform: scale(1.1);
    background-color: #d0eaff;
}

.how-to-step h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.dark-mode .content-section {
    border-color: #333;
}

.dark-mode .section-title {
    color: #f5f5f5;
}

.dark-mode .step-icon {
    background-color: #2a3a4a;
    color: #66d9ff;
}

.dark-mode .how-to-step:hover .step-icon {
    background-color: #3a506a;
}

.dark-mode .how-to-step h3 {
    color: #e0e0e0;
}

/* FAQ Section */
.faq-section {
    padding: 40px 20px;
    background-color: #f8f9fa;
}

.faq-section .section-title {
    text-align: center;
    margin-bottom: 30px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.faq-item[open] {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; /* Remove default marker */
}

.faq-question::-webkit-details-marker {
    display: none; /* Hide for Chrome/Safari */
}

.faq-question::after {
    content: '\f078'; /* Font Awesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
}

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

.faq-answer {
    padding: 0 20px 20px 20px;
    color: #6c757d;
    line-height: 1.6;
}

.dark-mode .faq-section {
    background-color: #1a1a1a;
}

.dark-mode .faq-item {
    background: #2d2d2d;
    border-color: #444;
}

.dark-mode .faq-item[open] {
    border-color: #66d9ff;
}

.dark-mode .faq-question {
    color: #f5f5f5;
}

.dark-mode .faq-answer {
    color: #a0aec0;
}

/* Static Content Page Styling */
.static-content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: left;
}

.static-content-container h1,
.static-content-container h2,
.static-content-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.static-content-container h1 {
    font-size: 2.5rem;
    text-align: center;
    border-bottom: none;
    margin-bottom: 10px;
}

.static-content-container .page-subtitle {
    text-align: center;
    color: #6c757d;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.static-content-container p,
.static-content-container li {
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
}

.static-content-container ul {
    padding-left: 20px;
}

.static-content-container a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.static-content-container a:hover {
    color: #0056b3;
}

/* Dark Mode for Static Content */
.dark-mode .static-content-container h1,
.dark-mode .static-content-container h2,
.dark-mode .static-content-container h3 {
    color: #f5f5f5;
    border-color: #444;
}

.dark-mode .static-content-container .page-subtitle {
    color: #a0aec0;
}

.dark-mode .static-content-container p,
.dark-mode .static-content-container li {
    color: #d1d5db;
}

.dark-mode .static-content-container a {
    color: #66d9ff;
}

.dark-mode .static-content-container a:hover {
    color: #4da8da;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 80px;
    width: 280px;
    height: calc(100vh - 80px);
    background: #ffffff;
    color: #333;
    z-index: 999;
    transform: translateX(0);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    border-right: 1px solid #e9ecef;
}

.sidebar.closed {
    transform: translateX(-100%);
}

.sidebar-content {
    padding: 20px;
    padding-top: 20px; /* No need for extra top padding since sidebar starts below header */
}

.sidebar h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.sidebar h3 i {
    color: #007bff;
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

.search-container {
    position: relative;
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #6c757d;
}

.search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: #e9ecef;
    color: #333;
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
}

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

.search-result-item h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #007bff;
}

.search-result-item p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
}

/* Category Navigation */
.category-nav {
    margin-bottom: 20px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #6c757d;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-list a:hover {
    background: #f8f9fa;
    color: #333;
    transform: translateX(5px);
}

.category-list a.active {
    background: #007bff;
    color: white;
}

.category-list a i {
    width: 16px;
    text-align: center;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: #3498db;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sidebar-toggle:hover {
    background: #2980b9;
    transform: translateY(-50%) scale(1.1);
}

.sidebar.closed + .sidebar-toggle {
    left: 20px;
}

.sidebar + .sidebar-toggle {
    left: 300px;
}

/* Main Content Layout */
.main-content {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.sidebar.closed ~ .main-content {
    margin-left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .sidebar.closed ~ .main-content {
        margin-left: 0 !important;
    }
    
    .sidebar + .sidebar-toggle {
        left: 20px;
    }
    
    .sidebar-toggle {
        left: 20px;
        top: 20px;
        transform: none;
    }
}

/* Games Link */
.games-link {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    background: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
    border-radius: 4px;
}

.header-left {
    position: relative;
    padding-left: 40px;
}

.games-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.dark-mode .games-link {
    color: rgba(255, 255, 255, 0.2);
}

.dark-mode .games-link:hover {
    color: #66d9ff;
    background: rgba(255, 255, 255, 0.05);
}

/* Adjust Logo Font and Icon Size for Balance */
.site-title {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title i {
    font-size: 2rem;
}

/* Header Styling */
.site-header {
    background-color: #007bff;
    color: white;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.site-header:hover {
    background-color: #0056b3;
    color: white;
}

/* Logo and Title Link */
.site-link {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.site-link:hover {
    color: #ffc107; /* Highlight on hover */
}

/* Center Section: Translate Label */
.translate-label {
    margin-right: 10px;
    font-size: 1rem;
    color: white;
    font-weight: 500;
    align-self: center;
}

/* Header Container */
.header-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Distribute content evenly */
    padding: 0 20px;
}

/* Left Section: Logo and Title */
.header-left .site-title {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Left Section: Logo and Title */
.header-left .site-title i {
    font-size: 2rem;
}

/* Center Section: Google Translate */
.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Right Section: Dark Mode Toggle */
.header-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-section {
    flex: 0 0 auto;
}

.nav-section {
    flex: 0 0 auto;
    padding: 10px;
}

/* Google Translate Widget */
#google_translate_element {
    visibility: visible;
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

.goog-te-gadget {
    font-family: var(--font-base) !important;
    color: white !important;
}

.goog-te-gadget .goog-te-combo {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    min-width: 150px !important;
}

.goog-te-gadget .goog-te-combo option {
    background-color: white;
    color: #333;
}

/* Hide Google branding */
.goog-logo-link {
    display: none !important;
}

.goog-te-gadget span {
    display: none !important;
}

/* Fix Google Translate banner */
.goog-te-banner-frame {
    display: none !important;
}

/* Dark Mode Adjustments for Text Readability */
.dark-mode {
    background-color: #121212; /* Dark background */
    color: #f5f5f5; /* Light text color */
}

.dark-mode .sidebar {
    background: #1e1e1e !important;
    color: #f5f5f5 !important;
    border-right: 1px solid #333 !important;
}

.dark-mode .sidebar h3 {
    color: #f5f5f5 !important;
}

.dark-mode .sidebar h3 i {
    color: #66d9ff !important;
}

.dark-mode .search-input {
    background: #2d2d2d !important;
    border-color: #444 !important;
    color: #f5f5f5 !important;
}

.dark-mode .search-input::placeholder {
    color: #adb5bd !important;
}

.dark-mode .search-input:focus {
    background: #333 !important;
    border-color: #66d9ff !important;
    box-shadow: 0 0 0 2px rgba(102, 217, 255, 0.25) !important;
}

.dark-mode .search-clear {
    color: #adb5bd !important;
}

.dark-mode .search-clear:hover {
    background: #444 !important;
    color: #f5f5f5 !important;
}

.dark-mode .search-results {
    background: #2d2d2d !important;
    border-color: #444 !important;
}

.dark-mode .search-result-item {
    border-bottom-color: #444 !important;
}

.dark-mode .search-result-item:hover {
    background: #333 !important;
}

.dark-mode .search-result-item h4 {
    color: #66d9ff !important;
}

.dark-mode .search-result-item p {
    color: #adb5bd !important;
}

.search-result-category {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.dark-mode .search-result-category {
    color: #a0aec0;
}

.dark-mode .category-list a {
    color: #adb5bd !important;
}

.dark-mode .category-list a:hover {
    background: #333 !important;
    color: #f5f5f5 !important;
}

.dark-mode .category-list a.active {
    background: #66d9ff !important;
    color: #121212 !important;
}
a {
    color: #66d9ff;
    text-decoration: none;
}
/* Adjust link colors to improve visibility in dark mode */
.dark-mode a {
    color: #66d9ff; /* Lighter blue for links */
    text-decoration: none;
}

.dark-mode a:hover {
    color: #4da8da; /* Slightly darker blue on hover */
}

/* Tooltip for Dark Mode */

.dark-mode-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffc107;
}


.header-right .about-link,
.header-right .contact-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    margin-left: 15px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.header-right .about-link:hover,
.header-right .contact-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Dark Mode Header */
.dark-mode .site-header {
    background-color: #0056b3; /* Darker blue for dark mode */
}

.dark-mode .site-link {
    color: #f5f5f5;
}

.dark-mode .site-link:hover {
    color: #66d9ff;
}

.dark-mode .translate-label {
    color: #a0aec0;
}

.dark-mode .goog-te-gadget .goog-te-combo {
    background-color: #2d2d2d !important;
    color: #f5f5f5 !important;
    border-color: #444 !important;
}

.dark-mode .dark-mode-toggle {
    color: #a0aec0;
}

.dark-mode .dark-mode-toggle:hover {
    background-color: #2d2d2d;
    color: #66d9ff;
}

.dark-mode .header-right .about-link,
.dark-mode .header-right .contact-link {
    color: #a0aec0;
}

.dark-mode .header-right .about-link:hover,
.dark-mode .header-right .contact-link:hover {
    background-color: #2d2d2d;
    color: #66d9ff;
}

/* Footer Styling */
body:has(.sidebar) .site-footer {
    margin-left: 280px;
}

.site-footer {
    background-color: #0056b3; /* Darker blue */
    color: #e0e0e0;
    padding: 40px 20px 0;
    text-align: left;
    border-top: 1px solid #004085;
    position: relative;
    z-index: 998; /* Below sidebar but above other content */
    transition: margin-left 0.3s ease;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.site-footer h3 {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.footer-about p, .footer-contact p {
    line-height: 1.7;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #e0e0e0;
}

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

.footer-links a,
.footer-email {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-email:hover {
    color: #ffffff;
}

.footer-bottom {
    background-color: #004085; /* Even darker blue for bottom bar */
    border-top: 1px solid #0056b3;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #e0e0e0;
}

/* Dark Mode Footer */
.dark-mode .site-footer {
    background-color: #004085;
    color: #e0e0e0;
    border-top-color: #0056b3;
}

.dark-mode .site-footer h3 {
    color: #f5f5f5;
}

.dark-mode .footer-links a,
.dark-mode .footer-email {
    color: #a0aec0;
}

.dark-mode .footer-links a:hover,
.dark-mode .footer-email:hover {
    color: #66d9ff;
}

.dark-mode .footer-bottom {
    background-color: #002c5c;
    border-top-color: #004085;
}

/* Code Block Styling */
.code-block-wrapper {
    position: relative;
    margin: 1rem 0;
}

pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    text-align: left;
}

code {
    font-family: 'Courier New', Courier, monospace;
}

.copy-code-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(-5px);
}

.code-block-wrapper:hover .copy-code-btn {
    opacity: 1;
    transform: translateY(0);
}

.copy-code-btn:hover {
    background-color: #f1f3f5;
    color: #007bff;
}

/* Hero Section CTA Styling */
.hero-cta-section {
    margin: 30px 0 20px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 180px;
    justify-content: center;
}

.cta-button.primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(70, 130, 180, 0.3);
}

.cta-button.primary:hover {
    background: #3a6b9c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(70, 130, 180, 0.4);
}

.cta-button.secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.cta-button.secondary:hover {
    background: var(--background-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-trust-links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.trust-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.trust-link:hover {
    color: var(--primary-color);
    background: var(--background-secondary);
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-cta-section {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }
    
    .hero-trust-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* About Section Styling */
.about-links {
    margin: 25px 0;
    text-align: center;
}

.internal-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.internal-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
}

.internal-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(70, 130, 180, 0.3);
}

.entity-attribution {
    margin-top: 30px;
    padding: 20px;
    background: var(--background-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.entity-attribution p {
    margin: 0;
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .internal-links {
        flex-direction: column;
        align-items: center;
    }
    
    .internal-link {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* Featured Tools Badge Styling */
.featured-tool-card {
    position: relative;
}

.tool-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tool-badge.new {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.tool-badge.popular {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
}

.tool-badge.updated {
    background: linear-gradient(135deg, #fd7e14, #e83e8c);
    color: white;
}

.tool-badge:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.copy-code-btn.copied {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Dark Mode Code Block Styling */
.dark-mode pre {
    background-color: #1a1a1a;
    border-color: #444;
    color: #f5f5f5;
}

.dark-mode .copy-code-btn {
    background-color: #2d2d2d;
    border-color: #444;
    color: #a0aec0;
}

.dark-mode .copy-code-btn:hover {
    background-color: #3d3d3d;
    color: #66d9ff;
}

.dark-mode .copy-code-btn.copied {
    background-color: #28a745;
    color: #ffffff;
    border-color: #28a745;
}


.sidebar.closed ~ .main-content,
.sidebar.closed ~ #footer .site-footer {
    margin-left: 0;
}

/* Dark mode variants */
.dark-mode .page-hero {
    background: linear-gradient(135deg, #1b2a3a 0%, #0f1720 100%);
    border-color: #284866;
}
.dark-mode .page-hero h1 { color: #66d9ff; }
.dark-mode .page-hero p { color: #cbd5e1; }

.dark-mode .content-section,
.dark-mode .card {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.dark-mode .content-section h2 { color: #9bd7ff; }
.dark-mode .contact-form label { color: #d1d5db; }
.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
    background: #141414;
    color: #f5f5f5;
    border-color: #333;
}
.dark-mode .btn-primary { background: #66d9ff; color: #0b1220; }
.dark-mode .btn-primary:hover { background: #4da8da; }
