/* Custom CSS for Multi-Tools Website */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Smooth scrolling */

html {
    scroll-behavior: smooth;
}

/* Custom gradient backgrounds */

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

/* Hero Section */

.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Search Container */

.search-container .input-group {
    box-shadow: var(--shadow-lg);
    border-radius: 50px;
    overflow: hidden;
}

.search-container .form-control {
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

.search-container .btn {
    border: none;
    padding: 1rem 1.5rem;
}

/* Tool Cards */

.tool-item {
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
}

.tool-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.tool-item .card-body {
    padding: 2rem 1.5rem;
}

.tool-item i {
    transition: all 0.3s ease;
}

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

.tool-item .btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tool-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Category Filter */

.category-filter .category-btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-filter .category-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-filter .category-btn:hover {
    transform: translateY(-2px);
}

/* Navigation */

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */

footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

footer .social-links a {
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-3px);
}

/* Ad Banners */

.ad-banner {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
}

.ad-placeholder {
    border-radius: 8px;
    overflow: hidden;
}

/* Responsive Design */

@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .search-container .input-group {
        margin-bottom: 1rem;
    }
    .category-filter {
        text-align: left;
    }
    .category-filter .category-btn {
        margin-bottom: 0.5rem;
        display: inline-block;
        width: auto;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .tool-item .card-body {
        padding: 1.5rem 1rem;
    }
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Loading Animation */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Utility Classes */

.text-light-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Tool Page Specific Styles */

.tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px;
}

.tool-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

/* Form Controls */

.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Buttons */

.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Results Area */

.results-area {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid #e9ecef;
}

/* Progress Bar */

.progress {
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Sidebar Ad */

.sidebar-ad {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

/* Dark mode support */

@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8f9fa;
        --light-color: #343a40;
    }
}

/* Print styles */

@media print {
    .navbar,
    .footer,
    .ad-banner,
    .sidebar-ad {
        display: none !important;
    }
    .tool-container {
        max-width: 100%;
        padding: 0;
    }
}

/* Enhanced Header and Footer Styles */

.social-link {
    transition: all 0.3s ease;
    display: inline-block;
}

.social-link:hover {
    transform: translateY(-3px);
    color: #007bff !important;
}

.footer-link {
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #007bff !important;
    padding-left: 5px;
}

.newsletter-signup .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Dropdown Menu Enhancements */

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Back to Top Button */

#backToTop {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

#backToTop:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* Mobile Menu Improvements */

@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        border: none;
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }
    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
    }
    .navbar-nav .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    .input-group {
        width: 100% !important;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
}

/* Dark Mode Support */

[data-bs-theme="dark"] {
    --bs-body-bg: #121212;
    --bs-body-color: #ffffff;
}

[data-bs-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .tool-item {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .tool-item:hover {
    background-color: #2a2a2a;
    border-color: #007bff;
}

/* Enhanced Responsive Design */

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .tool-card .card-body {
        padding: 1rem;
    }
    .category-btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    .navbar-brand {
        font-size: 1.1rem;
    }
    .social-links a {
        margin-right: 1rem !important;
        margin-bottom: 0.5rem;
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .footer .col-md-6 {
        text-align: center !important;
        margin-bottom: 1rem;
    }
    .newsletter-signup {
        margin-top: 2rem;
    }
}

/* Loading Animation */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Smooth Scrolling */

html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */

.btn:focus,
.form-control:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Print Styles */

@media print {
    .navbar,
    .footer,
    #backToTop,
    .ad-banner,
    .ad-placeholder {
        display: none !important;
    }
    .container {
        max-width: none !important;
    }
}