/* ============================================
   TOOLS PAGE STYLES
   Consistent styling with education page
   ============================================ */

* {
    box-sizing: border-box;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px);
}

/* Page Heading */
main.container > h1,
main > h1 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: var(--primary-100);
    margin-top: clamp(30px, 5vw, 50px);
    margin-bottom: clamp(20px, 4vw, 40px);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(255, 122, 0, 0.15);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Section Spacing */
section {
    padding: clamp(40px, 7vw, 70px) 0;
}

#featured-tools {
    background: rgba(255, 255, 255, 0.3);
    border-radius: clamp(14px, 2vw, 20px);
    padding: clamp(30px, 5vw, 50px);
    backdrop-filter: blur(10px);
}

section h2 {
    text-align: center;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    color: var(--primary-100);
    margin-bottom: clamp(30px, 6vw, 50px);
    font-weight: 800;
    position: relative;
    padding-bottom: clamp(15px, 3vw, 20px);
    line-height: 1.3;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(80px, 15vw, 100px);
    height: 4px;
    background: linear-gradient(90deg, var(--primary-100), var(--primary-200));
    border-radius: 2px;
}

/* 2-Column Grid for Featured Tools */
.tools-grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(20px, 3.5vw, 30px);
    margin-bottom: clamp(40px, 6vw, 60px);
}

/* Featured Tool Cards */
.tool-card {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 250, 245, 1) 100%);
    padding: clamp(20px, 3.5vw, 28px);
    border-radius: clamp(14px, 2vw, 20px);
    text-align: center;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 2px solid rgba(255, 122, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    border-radius: clamp(14px, 2vw, 20px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 122, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    box-shadow:
        0 12px 40px rgba(255, 122, 0, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: rgba(255, 122, 0, 0.3);
}

.tool-card:hover::before {
    opacity: 0.08;
}

.tool-card:hover::after {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Tool Card Content */
.tool-card h3 {
    color: var(--primary-100);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    margin-bottom: clamp(10px, 2vw, 15px);
    font-weight: 700;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.tool-card p {
    line-height: 1.8;
    color: var(--text-300);
    margin-bottom: clamp(15px, 2.5vw, 20px);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    position: relative;
    z-index: 1;
    flex-grow: 1;
}

.tool-card .btn {
    display: inline-block;
    padding: clamp(10px, 2vw, 14px) clamp(24px, 4vw, 32px);
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.25);
    position: relative;
    z-index: 1;
    margin-top: auto;
}

.tool-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.35);
}

/* Other Tools Section */
section h3 {
    color: var(--primary-100);
    font-size: clamp(1.3rem, 2.8vw, 1.8rem);
    margin: clamp(30px, 5vw, 50px) 0 clamp(20px, 3.5vw, 30px);
    font-weight: 800;
    text-align: center;
}

.tool-item {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 250, 245, 0.95) 100%);
    padding: clamp(20px, 3.5vw, 28px);
    border-radius: clamp(14px, 2vw, 20px);
    margin-bottom: clamp(20px, 3.5vw, 30px);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 2px solid rgba(255, 122, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tool-item:hover {
    box-shadow:
        0 12px 40px rgba(255, 122, 0, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px) translateX(8px);
    border-color: rgba(255, 122, 0, 0.3);
}

.tool-item h3 {
    color: var(--primary-100);
    margin: 0 0 clamp(10px, 2vw, 15px);
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-weight: 700;
    text-align: left;
    line-height: 1.3;
}

.tool-item p {
    line-height: 1.8;
    color: var(--text-300);
    margin-bottom: clamp(12px, 2vw, 16px);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

.tool-item .btn {
    display: inline-block;
    padding: clamp(10px, 2vw, 14px) clamp(24px, 4vw, 32px);
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.25);
}

.tool-item .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.35);
}

/* Language Toggle Buttons */
.page-language-toggle {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 1.5vw, 12px);
    margin: clamp(20px, 3.5vw, 30px) 0 clamp(30px, 5vw, 40px);
}

.page-lang-btn {
    padding: clamp(10px, 2vw, 14px) clamp(24px, 4vw, 38px);
    border: 2px solid var(--primary-100);
    background: white;
    color: var(--primary-100);
    border-radius: 50px;
    cursor: pointer;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 700;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(255, 122, 0, 0.15);
}

.page-lang-btn.active {
    background: linear-gradient(135deg,
        var(--primary-100),
        var(--primary-200));
    color: white;
    box-shadow:
        0 6px 20px rgba(255, 122, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.08);
    border-color: var(--primary-200);
}

.page-lang-btn:hover:not(.active) {
    background: linear-gradient(135deg,
        var(--primary-200),
        #ff9d42);
    color: white;
    border-color: var(--primary-200);
    transform: scale(1.05);
    box-shadow:
        0 6px 20px rgba(255, 122, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-lang-btn:active {
    transform: scale(1.02);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    section {
        padding: 35px 0;
    }

    .tools-grid-2col {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .tool-card:hover,
    .tool-item:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 480px) {
    section {
        padding: 30px 0;
    }

    .tools-grid-2col {
        gap: 20px;
    }

    .tool-card,
    .tool-item {
        padding: 20px;
    }
}

/* Prevent text from being too small on any device */
@media (max-width: 360px) {
    .tool-card,
    .tool-item {
        padding: 20px !important;
    }

    .page-lang-btn {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
    }
}
