/* Main Content and Footer Styles */

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #555;
    --light-gray: #f4f6f9;
    --border-color: #e1e4e8;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

body {
    background-color: #FFFFFF;
    color: var(--text-color);
}

main {
    padding: 40px 0;
}

.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-header {
    text-align: center;
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.intro-text {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.category-header {
    text-align: center;
    margin: 40px 0 20px;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.tool-category {
    margin-bottom: 50px;
    background: var(--light-gray);
    padding: 30px;
    border-radius: 16px;
}

.tool-category h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.tool-category h3 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.category-description {
    font-size: 1rem;
    color: #6c757d;
    max-width: 800px;
    margin-bottom: 25px;
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.tool-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.tool-card h4 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.tool-card.tool-card-view-all {
    background: linear-gradient(135deg, var(--primary-color), #5dade2);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.tool-card.tool-card-view-all h4 {
    color: white;
    font-size: 1.4rem;
}

.tool-card.tool-card-view-all a {
    color: white;
    border: 1px solid white;
    padding: 8px 16px;
    border-radius: 20px;
}

.tool-card.tool-card-view-all a:hover {
    background: white;
    color: var(--primary-color);
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    height: 40px;
}

.tool-card h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.tool-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tool-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.tool-link:hover {
    color: #2980b9;
}

.tool-link .fas {
    transition: transform 0.2s ease;
}

.tool-link:hover .fas {
    transform: translateX(4px);
}

/* FAQ Section */
.faq-section {
    margin: 60px 0;
    padding: 40px;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.faq-item {
    margin-bottom: 20px;
}

.faq-item h4 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

/* Feedback Section */
.feedback-section {
    text-align: center;
    padding: 40px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 12px;
    margin-bottom: 40px;
}

.feedback-section h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.feedback-section p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 25px;
}

.feedback-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.feedback-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.feedback-links a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.feedback-links a i {
    margin-right: 8px;
}

/* Header Layout Updates */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    height: 70px;
    position: relative;
}

.logo {
    flex-shrink: 0;
    margin-right: 20px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    justify-content: center;
}

.nav-menu .nav-item {
    position: relative;
    margin: 0 15px;
}

.nav-menu .nav-link {
    color: white;
    text-decoration: none;
    padding: 15px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu .nav-link:hover {
    color: var(--primary-color);
}

/* Enhanced Search Styles */
.search-container {
    position: relative;
    margin-left: 20px;
}

.search-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 350px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow: hidden;
}

.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-dropdown form {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.search-dropdown input {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-dropdown input:focus {
    border-color: var(--primary-color);
}

.search-submit {
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 12px 15px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: #2980b9;
}

.search-suggestions {
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestion {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.search-suggestion:hover {
    background: rgba(52, 152, 219, 0.1);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion .suggestion-icon {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.search-suggestion .suggestion-text {
    color: black;
    flex: 1;
}

.search-suggestion .suggestion-category {
    font-size: 12px;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Footer */
.site-footer {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 20px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.footer-column a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-about .footer-logo {
    max-width: 180px;
    margin-bottom: 20px;
}

.footer-about p {
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    transition: all 0.2s ease-in-out;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.subscribe-form {
    display: flex;
    position: relative;
}

.subscribe-form input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
    transition: border-color 0.3s;
}

.subscribe-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.subscribe-form input:focus {
    border-color: var(--primary-color);
}

.subscribe-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: color 0.3s;
}

.subscribe-form button:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-left: 15px;
}

.hamburger-icon {
    position: relative;
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    bottom: -8px;
}

.navbar.mobile-menu-active .hamburger-icon {
    background: transparent;
}

.navbar.mobile-menu-active .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar.mobile-menu-active .hamburger-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .navbar {
        flex-wrap: wrap;
    }

    .navbar-actions {
        order: 2;
        margin-right: 0;
        margin-left: auto;
    }

    .nav-menu {
        order: 4;
        width: 100%;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--secondary-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.23, 1, 0.32, 1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: flex-start;
    }

    .navbar.mobile-menu-active .nav-menu {
        max-height: 100vh;
    }

    .nav-menu .nav-item {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu .nav-link {
        padding: 18px 20px;
        width: 100%;
        justify-content: space-between;
    }

    .menu-toggle {
        display: flex;
        order: 3;
    }

    .search-container {
        order: 5;
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    .search-dropdown {
        position: fixed;
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto;
        max-width: none;
    }

    .search-toggle {
        width: 100%;
        border-radius: 8px;
        height: 40px;
        justify-content: flex-start;
        padding-left: 20px;
    }

    .search-toggle::after {
        content: 'Search tools...';
        margin-left: 10px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 10px;
        height: auto;
        min-height: 60px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .logo {
        margin-right: 15px;
    }

    .search-dropdown {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 20px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-about p {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-icons {
        justify-content: center;
    }
}

.search-section-title {
    padding: 10px 15px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-suggestion.active {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

/* Enhanced Core Web Vitals Optimizations */
img {
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px;
}

/* Service Worker Registration Support */
.offline-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #f39c12;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10000;
    display: none;
}

.offline-indicator.show {
    display: block;
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px;
    border-radius: 8px;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.install-prompt.show {
    display: flex;
}

.install-prompt button {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.install-prompt .close-btn {
    background: transparent;
    color: white;
    font-size: 20px;
    padding: 0;
    width: 30px;
    height: 30px;
}

@media print {
    .navbar,
    .search-container,
    .feedback-section,
    .site-footer {
        display: none;
    }
    
    .main-title,
    .tool-category h3 {
        color: black !important;
    }
    
    .tool-link {
        color: blue !important;
        text-decoration: underline !important;
    }
}