/* Tools Page Specific Styles - Enhanced Modern Design */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #4b56d2, #82c3ec);
    color: white;
    padding: 4rem 0;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -5%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Tools Section */
.tools-section {
    padding: 0 0 4rem;
    position: relative;
}

/* Enhanced Search Container */
.search-container {
    margin-bottom: 3rem;
    position: relative;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    transform: translateY(-35px);
}

.search-wrapper {
    display: flex;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    padding: 8px;
    position: relative;
}

.search-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 25px;
    padding: 2px; 
    background: linear-gradient(135deg, rgba(75, 86, 210, 0.4), rgba(130, 195, 236, 0.4)); 
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.search-wrapper:focus-within {
    box-shadow: 0 15px 40px rgba(75, 86, 210, 0.18);
    transform: translateY(-5px);
}

.search-wrapper input {
    flex-grow: 1;
    padding: 18px 25px;
    border: none;
    font-size: 1.15rem;
    outline: none;
    color: #333;
    width: 100%;
    background: transparent;
    font-weight: 500;
}

.search-wrapper input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

.search-wrapper button {
    background: linear-gradient(135deg, #4b56d2, #5b66e2);
    color: white;
    border: none;
    padding: 0 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 18px;
    margin-right: 2px;
}

.search-wrapper button:hover {
    background: linear-gradient(135deg, #3a44b1, #4b56d2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 86, 210, 0.2);
}

.search-wrapper button:active {
    transform: translateY(0);
}

.search-wrapper button svg {
    width: 22px;
    height: 22px;
}

.search-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.search-status p {
    font-size: 0.95rem;
    color: #555;
}

.search-status p strong {
    color: #4b56d2;
    font-weight: 600;
}

.clear-search {
    color: #4b56d2;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 20px;
    background: rgba(75, 86, 210, 0.1);
    transition: all 0.2s ease;
}

.clear-search:hover {
    color: white;
    background: #4b56d2;
    box-shadow: 0 5px 15px rgba(75, 86, 210, 0.2);
}

/* Tools Grid - enhanced styling */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.tools-grid::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(75, 86, 210, 0.03) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Enhanced Tool Cards */
.tool-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(75, 86, 210, 0.1);
}

.tool-header {
    padding: 2rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tool-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #4b56d2, #82c3ec);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(75, 86, 210, 0.2);
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-icon svg {
    width: 32px;
    height: 32px;
}

.tool-badges {
    display: flex;
    gap: 8px;
}

.badge {
    font-size: 0.7rem;
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.badge-new {
    background: linear-gradient(135deg, #4b56d2, #6e78e8);
    color: white;
}

.badge-popular {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.tool-content {
    padding: 1rem 2rem;
    flex-grow: 1;
}

.tool-name {
    font-size: 1.4rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tool-name a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tool-name a:hover {
    color: #4b56d2;
}

.tool-category {
    color: #4b56d2;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(75, 86, 210, 0.1);
    border-radius: 20px;
}

.tool-description {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.tool-tag {
    background-color: #f0f2ff;
    color: #4b56d2;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 15px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tool-tag:hover {
    background-color: #e6e9ff;
    transform: translateY(-2px);
}

.tool-footer {
    padding: 0 2rem 2rem;
}

.tool-button {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #4b56d2, #5a66e2);
    color: white;
    padding: 14px 20px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(75, 86, 210, 0.2);
}

.tool-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3a44b1, #4b56d2);
    transition: opacity 0.3s ease;
    opacity: 0;
    z-index: -1;
}

.tool-button:hover::before {
    opacity: 1;
}

.tool-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(75, 86, 210, 0.3);
}

/* No Tools Message */
.no-tools-message {
    padding: 5rem 2rem;
    text-align: center;
    background-color: white;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    max-width: 700px;
    margin: 3rem auto;
    position: relative;
    overflow: hidden;
}

.no-tools-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #4b56d2, #82c3ec);
}

.no-tools-message svg {
    width: 100px;
    height: 100px;
    color: #9ca3af;
    margin-bottom: 2rem;
}

.no-tools-message h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.2rem;
}

.no-tools-message p {
    color: #666;
    margin-bottom: 2.5rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-size: 1.1rem;
}

.btn-reset {
    display: inline-block;
    background: linear-gradient(135deg, #4b56d2, #6e78e8);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(75, 86, 210, 0.25);
}

.btn-reset:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(75, 86, 210, 0.4);
}

/* CTA Section */
.tools-cta {
    padding: 2rem 0 5rem;
}

.cta-content {
    background: linear-gradient(135deg, #f0f2ff, #e6f3ff);
    padding: 5rem 3rem;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.cta-content::before,
.cta-content::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(75, 86, 210, 0.05);
    z-index: 0;
}

.cta-content::before {
    width: 400px;
    height: 400px;
    top: -150px;
    right: -150px;
}

.cta-content::after {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -100px;
}

.cta-content h2 {
    font-size: 2.3rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.cta-content p {
    color: #4a5568;
    margin-bottom: 3rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    line-height: 1.7;
    font-size: 1.2rem;
}

.cta-button {
    display: inline-block;
    padding: 16px 45px;
    background: linear-gradient(135deg, #4b56d2, #6e78e8);
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 25px rgba(75, 86, 210, 0.25);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(75, 86, 210, 0.35);
}

/* Animation keyframes */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.search-wrapper.shake {
    animation: shake 0.4s ease-in-out;
}

.search-wrapper.focused {
    box-shadow: 0 15px 40px rgba(75, 86, 210, 0.2);
    transform: translateY(-5px);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 3rem 0;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .search-wrapper input {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .search-wrapper button {
        padding: 0 25px;
    }
    
    .tool-header, .tool-content, .tool-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .cta-content {
        padding: 3rem 2rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .search-wrapper {
        border-radius: 20px;
    }
    
    .search-wrapper input {
        padding: 12px 15px;
    }
    
    .search-wrapper button {
        padding: 0 20px;
        border-radius: 15px;
    }
    
    .search-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem;
    }
    
    .cta-content h2 {
        font-size: 1.6rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 14px 30px;
    }
}