/* 
   IndiaToolHub - Custom Stylesheet 
   Premium, Modern, Glassmorphism Aesthetics
*/

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --bg-light: #0f172a;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Bootstrap Overrides for dark mode */
    --bs-body-bg: var(--bg-light);
    --bs-body-color: var(--text-dark);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Outfit', sans-serif;
}

/* Typography & Colors */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism Navigation */
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

[data-theme="dark"] .glass-nav .nav-link, 
[data-theme="dark"] .glass-nav .navbar-brand {
    color: var(--text-dark) !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    padding-top: 80px;
    background: var(--bg-light);
}

/* Background Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.3);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(236, 72, 153, 0.2);
}

/* Buttons */
.premium-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.search-box {
    width: 100%;
    max-width: 300px;
}

.search-box input:focus {
    box-shadow: none;
}

[data-theme="dark"] .search-box input {
    color: var(--text-dark);
}

[data-theme="dark"] .search-box input::placeholder {
    color: var(--text-muted);
}

/* Animations */
.float-anim {
    animation: float 6s ease-in-out infinite;
}

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

.main-hero-img {
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}

/* Cards Transition */
.transition-up {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transition-up:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

[data-theme="dark"] .category-card {
    background-color: var(--glass-bg) !important;
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .category-card h3 {
    color: var(--text-dark) !important;
}

[data-theme="dark"] .bg-light-subtle {
    background-color: var(--bg-light) !important;
}

/* ===== MODERN FOOTER STYLES ===== */
.footer-modern {
    background: linear-gradient(135deg, #1a1f35 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 60px 0 20px;
    position: relative;
    margin-top: 80px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    z-index: 10;
    width: 100%;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.footer-modern .container {
    position: relative;
    z-index: 20;
}

.footer-modern .row {
    position: relative;
    z-index: 2;
}

.footer-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.1;
    z-index: 1;
}

.blob-3 {
    bottom: 0;
    right: -5%;
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.4);
}

.footer-brand {
    position: relative;
    z-index: 2;
}

.footer-brand h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    line-height: 1.8;
    color: #cbd5e1;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 50%;
    color: #818cf8;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

/* Newsletter Section */
.footer-newsletter {
    position: relative;
    z-index: 2;
}

.footer-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 16px;
    border-radius: 8px 0 0 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.footer-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.footer-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.newsletter-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.newsletter-btn:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.newsletter-btn:active {
    transform: scale(0.98);
}

/* Footer Links */
.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.footer-link i {
    font-size: 0.75rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #818cf8;
    padding-left: 4px;
}

.footer-link:hover i {
    opacity: 1;
    transform: translateX(2px);
}

/* Back to Top Button */
.back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 6px;
    color: #818cf8;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-modern {
        padding: 40px 0 20px;
        margin-top: 60px;
    }

    .footer-input {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .newsletter-btn {
        border-radius: 8px;
        width: 100%;
    }

    .back-to-top {
        margin-top: 15px;
    }

    .footer-brand h4 {
        font-size: 1.25rem;
    }

    .social-links {
        margin-bottom: 20px;
    }
}

/* Dark Theme Footer */
[data-theme="dark"] .footer-modern {
    background: linear-gradient(135deg, #0a0f1f 0%, #1a1f35 50%, #16213e 100%);
    border-top-color: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .footer-link {
    color: #a0aec0;
}

[data-theme="dark"] .footer-link:hover {
    color: #93c5fd;
}

/* Utilities */
.icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Custom Utilities for Tools/Cards */
.tool-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

[data-theme="dark"] .tool-card {
    background: #1e293b;
    border-color: #334155;
}

.tool-input {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

[data-theme="dark"] .tool-input {
    background-color: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

.tool-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

/* Toast/Notification */
.copy-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.copy-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Search Results Dropdown */
.search-result-item:hover {
    background-color: var(--bs-light);
}
[data-theme="dark"] .search-result-item {
    color: var(--text-dark) !important;
}
[data-theme="dark"] .search-result-item:hover {
    background-color: var(--bg-light);
}

/* New Dashboard Styles */

/* Stats Section */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.stat-card {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    color: white;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Enhanced Category Cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

/* Popular Tools Section */
.tool-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

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

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

/* Update Cards */
.update-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.update-card:hover {
    transform: translateX(5px);
}

.update-icon {
    transition: transform 0.3s ease;
}

.update-card:hover .update-icon {
    transform: rotate(360deg);
}

/* Feature Highlights */
.feature-highlight {
    transition: transform 0.3s ease;
}

.feature-highlight:hover {
    transform: translateY(-5px);
}

/* Testimonials */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.avatar {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Newsletter Section */
.newsletter-illustration {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding-top: 60px;
    }
    
    .stat-card {
        padding: 1.5rem 0.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
    }
    
    .tool-card {
        margin-bottom: 1rem;
    }
    
    .testimonial-card {
        margin-bottom: 1rem;
    }
}

/* Dark mode enhancements for new elements */
[data-theme="dark"] .stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .update-card {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .testimonial-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .tool-card {
    background: var(--glass-bg);
    border-color: var(--glass-border) !important;
}

[data-theme="dark"] .bg-gradient-primary {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}
