/* Toolverse - Main Stylesheet */

: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;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header Styles */
.header {
    z-index: 1000;
    position: relative;
}

.navbar {
    padding: 15px 0;
    min-height: 70px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.navbar-light .navbar-brand,
.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-brand:hover {
    color: #f8f9fa !important;
    text-decoration: none;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.navbar-light .navbar-brand i,
.navbar-brand i {
    color: #ffd700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-light .nav-link,
.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    color: #ffffff !important;
    margin: 0 8px;
    padding: 8px 16px !important;
    border-radius: 6px;
}

.nav-link:hover {
    color: #ffd700 !important;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.navbar-nav .nav-item {
    margin: 0 5px;
}

.navbar-nav .nav-item.active .nav-link {
    background-color: rgba(255, 215, 0, 0.2);
    color: #ffd700 !important;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-top: 10px;
}

.dropdown-item {
    padding: 12px 20px;
    transition: all 0.3s ease;
    color: #ffffff;
    border-radius: 8px;
    margin: 2px 8px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    transform: translateX(5px);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
    justify-content: center;
}

/* Ad Banner Styles */
.ad-banner-top {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 15px 0;
}

.ad-banner-bottom {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 20px 0;
    margin-top: 3rem;
}

.ad-placeholder {
    background: #fff;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ad-placeholder:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
    transform: scale(1.02);
}

.ad-content {
    text-align: center;
}

.ad-size {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 5px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 0;
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero-section h1 {
    color: white !important;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

.search-container .form-control {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-container .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

/* Tool Cards */
.tool-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card .card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.tool-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.tool-card .card-description {
    color: var(--secondary-color);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.tool-card .card-tags {
    margin-bottom: 0.75rem;
}

.tool-card .badge {
    font-size: 0.65rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    padding: 0.3rem 0.6rem;
}

.tool-card .btn {
    width: 100%;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.tool-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Smaller tool cards for Text Tools section */
#text-tools .tool-card {
    padding: 1rem !important;
}

#text-tools .tool-card .card-icon {
    font-size: 2rem !important;
    margin-bottom: 0.75rem !important;
}

#text-tools .tool-card .card-title {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
}

#text-tools .tool-card .card-description {
    font-size: 0.8rem !important;
    margin-bottom: 0.75rem !important;
}

#text-tools .tool-card .card-tags {
    margin-bottom: 0.75rem !important;
}

#text-tools .tool-card .badge {
    font-size: 0.65rem !important;
    padding: 0.3rem 0.6rem !important;
}

#text-tools .tool-card .btn {
    padding: 0.4rem 1rem !important;
    font-size: 0.85rem !important;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    margin-top: 0;
}

.footer h5, .footer h6 {
    color: var(--primary-color) !important;
}

.footer .text-primary {
    color: var(--primary-color) !important;
}

.footer .text-muted {
    color: #bdc3c7 !important;
}

.footer .text-white {
    color: #ffffff !important;
}

.footer a.text-muted {
    color: #bdc3c7 !important;
    transition: color 0.3s ease;
}

.footer a.text-muted:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.footer p {
    color: #bdc3c7 !important;
}

.footer li {
    color: #bdc3c7 !important;
}

.footer .list-unstyled {
    color: #bdc3c7 !important;
}

.footer .list-unstyled li {
    color: #bdc3c7 !important;
}

.footer .list-unstyled a {
    color: #bdc3c7 !important;
}

.footer .mb-0 {
    color: #bdc3c7 !important;
}

.footer .text-decoration-none {
    color: #bdc3c7 !important;
}

.footer .social-links a {
    color: #ffffff !important;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white !important;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    color: white !important;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

.footer .text-danger {
    color: #e74c3c !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .tool-card .card-icon {
        font-size: 2rem;
    }
    
    .ad-placeholder {
        min-height: 60px;
        padding: 15px;
    }
    
    .ad-banner-bottom {
        margin-top: 2rem;
        padding: 15px 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .search-container .input-group {
        flex-direction: column;
    }
    
    .search-container .btn {
        margin-top: 0.5rem;
        border-radius: 0.375rem;
    }
    
    .ad-banner-bottom {
        margin-top: 1.5rem;
        padding: 10px 0;
    }
    
    .ad-placeholder {
        min-height: 50px;
        padding: 10px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Search Highlight */
.highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Tool Status Indicators */
.tool-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.tool-status.online {
    background-color: var(--success-color);
}

.tool-status.offline {
    background-color: var(--danger-color);
}

.tool-status.maintenance {
    background-color: var(--warning-color);
}

/* Responsive Header */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-nav .nav-item {
        margin: 5px 0;
    }
    
    .nav-link {
        padding: 12px 20px !important;
        margin: 2px 0;
        text-align: center;
    }
    
    .dropdown-menu {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .ad-banner-top {
        padding: 10px 0;
    }
    
    .ad-placeholder {
        min-height: 60px;
        padding: 15px;
    }
    
    .hero-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-brand i {
        font-size: 1.2rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .search-container .input-group {
        max-width: 100% !important;
    }
    
    .nav-link {
        font-size: 0.95rem;
        padding: 10px 16px !important;
    }
}

/* Additional Header Enhancements */
.navbar.navbar-light.bg-white,
.navbar {
    padding: 15px 0;
    min-height: 70px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-collapse {
    justify-content: center;
}

/* Ensure proper spacing */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

/* Tool Cards */
.tool-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tool-status {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.tool-status.online {
    background-color: var(--success-color);
}

.tool-status.maintenance {
    background-color: var(--warning-color);
}

.tool-status.offline {
    background-color: var(--danger-color);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.card-description {
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.5;
}

.card-tags {
    margin-bottom: 20px;
}

.card-tags .badge {
    margin: 2px;
    font-size: 0.75rem;
}

.tool-card .btn {
    width: 100%;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.tool-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Animation */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.tool-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.tool-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern Home Page Enhancements */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .hero-content {
    position: relative;
    z-index: 2;
}

/* Stats Section */
.stat-item {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(102, 126, 234, 0.3);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Section Headers */
.section-header {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.section-header:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.2);
}

/* Feedback Cards */
.feedback-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feedback-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.3);
}

.avatar {
    transition: all 0.3s ease;
}

.feedback-card:hover .avatar {
    transform: scale(1.1);
}

/* CTA Section */
.cta-content {
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain2" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain2)"/></svg>');
    opacity: 0.3;
}

.cta-buttons .btn {
    transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
}

/* Enhanced Tool Cards */
.tool-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.tool-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .stat-item {
        margin-bottom: 1rem;
    }
    
    .feature-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
        margin: 10px;
        border-radius: 20px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Section Header Dropdown Toggle Styles */
.section-header .dropdown-toggle {
    transition: all 0.3s ease;
    cursor: pointer;
}

.section-header .dropdown-icon {
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
    color: #007bff;
}

.section-header .dropdown-toggle:hover {
    transform: scale(1.1);
    color: #0056b3;
}

.section-header .dropdown-toggle:focus {
    outline: none;
}

/* Smooth collapse animation */
.collapse {
    transition: all 0.3s ease-in-out;
}

.collapse:not(.show) {
    display: none;
}

.collapse.show {
    display: block;
}

/* Enhanced section header layout */
.section-header .d-flex {
    gap: 15px;
}

@media (max-width: 576px) {
    .section-header .d-flex {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .section-header .btn {
        align-self: center;
    }
}
