/* ==========================
   TOOL GRID
========================== */

.tool-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
    justify-content:center;
    gap:35px;
    margin-top:50px;
}

/* ==========================
   TOOL CARD
========================== */

.tool-card{
    position:relative;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:22px;
    padding:35px;
    text-align:center;
    overflow:hidden;

    min-height:620px;

    display:flex;
    flex-direction:column;
    justify-content:flex-start;

    transition:.35s;
}

.tool-card:hover{
    transform:translateY(-10px);
    border-color:#3b82f6;
    box-shadow:0 25px 60px rgba(37,99,235,.25);
}

.tool-card:hover{
    transform:translateY(-10px);
    border-color:#3b82f6;
    box-shadow:0 20px 50px rgba(0,0,0,.35);
}

.tool-card img{
    width:110px;
    height:110px;
    object-fit:contain;
    margin:20px auto;
    display:block;
    transition:.35s;
}

.tool-card:hover img{
    transform:scale(1.08);
}

.tool-card:hover img{
    transform:scale(1.08);
}

.tool-card h3{
    font-size:34px;
    margin:15px 0;
    font-weight:700;
}
.tool-card p{
    color:var(--text-secondary);
    font-size:18px;
    line-height:1.8;
    margin-bottom:25px;

    min-height:90px;
}

.tool-info{
    display:flex;
    justify-content:space-between;
    margin:25px 0;
    font-size:15px;
}

/* ==========================
   TOOL BUTTONS
========================== */

.tool-buttons{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:25px;
}

.tool-buttons .btn{
    width:100%;
    height:56px;

    display:flex;
    justify-content:center;
    align-items:center;

    border-radius:14px;

    font-size:18px;
    font-weight:700;

    text-align:center;
}

.btn-secondary{
    background:#3b475d;
    color:#fff;
}

.btn-secondary:hover{
    background:#4c5c78;
}

/* ==========================
   CATEGORY GRID
========================== */

.category-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:25px;
    margin-top:50px;
}

.categories-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,300px));
    justify-content:center;
    gap:30px;
    margin-top:40px;
}

/* ==========================
   CATEGORY CARD
========================== */

.category-card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:20px;
    padding:30px;
    text-align:center;
    transition:.35s;
}

.category-card:hover{
    transform:translateY(-8px);
    border-color:#3b82f6;
    background:var(--primary);
}

.category-icon{
    font-size:42px;
    margin-bottom:15px;
}

.category-card span{
    font-size:45px;
    display:block;
    margin-bottom:15px;
}

.category-card h3{
    color:var(--text);
    font-size:20px;
    margin-bottom:10px;
}

.category-card p{
    color:var(--text-secondary);
}

/* ==========================
   NEWS CARD
========================== */

.news-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:25px;
}

.news-card{
    background:var(--card);
    border-radius:20px;
    overflow:hidden;
    border:1px solid var(--border);
    transition:.35s;
}

.news-card:hover{
    transform:translateY(-8px);
    border-color:#3b82f6;
    box-shadow:0 20px 45px rgba(0,0,0,.35);
}

.news-card img{
    width:100%;
    height:220px;
    object-fit:cover;
    transition:.35s;
}

.news-card:hover img{
    transform:scale(1.05);
}

.news-content{
    padding:25px;
}

.news-date{
    display:block;
    color:#60a5fa;
    font-size:14px;
    margin-bottom:12px;
}

.news-content h3{
    font-size:22px;
    margin-bottom:15px;
    line-height:1.4;
}

.news-content p{
    color:var(--text-secondary);
    line-height:1.7;
    margin-bottom:20px;
}

/* ==========================
   FEATURED CARD
========================== */

.featured-card{
    display:grid;
    grid-template-columns:320px 1fr;
    gap:50px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:20px;
    padding:40px;
    align-items:center;
}

.featured-image img{
    width:100%;
    border-radius:16px;
    background:var(--text);
}

.featured-badge{
    display:inline-block;
    background:var(--primary);
    color:var(--text);
    padding:8px 18px;
    border-radius:30px;
    font-size:14px;
    margin-bottom:20px;
}

.featured-content h2{
    font-size:42px;
    margin-bottom:20px;
}

.featured-content p{
    color:#9ca3af;
    line-height:1.8;
    margin-bottom:30px;
}

.featured-meta{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
    margin-bottom:35px;
}

.featured-meta span{
    background:var(--surface);
    padding:10px 18px;
    border-radius:30px;
}

.featured-buttons{
    display:flex;
    gap:20px;
}

.favorite-btn{

    position:absolute;

    top:15px;

    right:15px;

    border:none;

    background:var(--card);

    color:var(--text);

    width:42px;

    height:42px;

    border-radius:50%;

    cursor:pointer;

    font-size:20px;

    transition:.3s;

}

.favorite-btn:hover{

    background:var(--primary);

    transform:scale(1.1);

}

/* ==========================
   PREMIUM TOOL CARD
========================== */

.tool-badge{

    position:absolute;

    top:18px;

    left:18px;

    background:#ef4444;

    color:var(--text);

    padding:6px 12px;

    border-radius:30px;

    font-size:12px;

    font-weight:600;

}

.tool-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;

    margin:25px 0;
}

.category{

    background:var(--surface);

    padding:8px 14px;

    border-radius:30px;

    font-size:13px;

}

.rating{

    color:#fbbf24;

    font-weight:600;

}

.tool-price{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:10px 22px;

    margin-bottom:25px;

    border-radius:40px;

    background:#16a34a;

    font-size:15px;

    font-weight:700;
}

.tool-card{

    transition:.35s;

}

.tool-card:hover{

    transform:translateY(-12px);

    border-color:#3b82f6;

    box-shadow:0 25px 60px rgba(37,99,235,.25);

}

.favorite-btn{

    z-index:10;

}

/* ==========================
   PREMIUM CATEGORY CARD
========================== */

.category-card{

    position:relative;

    overflow:hidden;

    background:var(--card);

    border:1px solid rgba(255,255,255,.08);

    border-radius:20px;

    padding:35px;

    text-align:center;

    transition:.35s;

}

.category-card:hover{

    transform:translateY(-10px);

    border-color:#3b82f6;

    box-shadow:0 20px 50px rgba(59,130,246,.25);

}

.category-icon{

    width:80px;

    height:80px;

    margin:0 auto 20px;

    display:flex;

    align-items:center;

    justify-content:center;

    border-radius:50%;

    background:linear-gradient(135deg,var(--primary),#8b5cf6);

    font-size:36px;

    color:var(--text);

}

.category-card h3{

    margin-bottom:12px;

    font-size:22px;

}

.category-card p{

    color:var(--text-secondary);

    margin-bottom:20px;

    line-height:1.6;

}

.category-count{

    display:inline-block;

    padding:8px 18px;

    background:var(--surface);

    border-radius:30px;

    color:var(--primary);

    font-size:14px;

    font-weight:600;

}

/* ==========================
   TOOL CARD BUTTONS
========================== */

.tool-card-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    align-items: stretch;
}

.tool-card-buttons .btn {
    flex: 1 1 0;
    width: 50%;
    min-width: 0;
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    line-height: 1.25;

    padding: 10px 12px;
    box-sizing: border-box;
}

/* Keep both buttons exactly the same size */
.tool-card-buttons .pro-access-btn,
.tool-card-buttons .btn-secondary {
    min-height: 68px;
    max-height: 68px;
}

/* Mobile */
@media (max-width: 600px) {

    .tool-card-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .tool-card-buttons .btn {
        width: 100%;
        height: 58px;
        min-height: 58px;
        max-height: 58px;
    }

}

@media (max-width: 600px) {

    .tool-card-buttons {
        flex-direction: column;
    }

    .tool-card-buttons .btn {
        width: 100%;
    }

}

/* ==================================================
   HOMEPAGE TOOL CARD BUTTONS
================================================== */

.tool-card {
    display: flex;
    flex-direction: column;
}

.tool-card-buttons {
    display: flex;
    width: 100%;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    align-items: stretch;
}

.tool-card-buttons .btn {
    flex: 1 1 0;
    width: calc(50% - 6px);
    min-width: 0;

    height: 64px;
    min-height: 64px;
    max-height: 64px;

    padding: 10px 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    line-height: 1.25;

    box-sizing: border-box;
}

/* Make both buttons exactly equal */

.tool-card-buttons .pro-access-btn,
.tool-card-buttons .btn-secondary {
    width: calc(50% - 6px);
    height: 64px;
    min-height: 64px;
    max-height: 64px;
}

/* Keep the secondary button color */

.tool-card-buttons .btn-secondary {
    background: #334155;
}

.tool-card-buttons .btn-secondary:hover {
    background: #475569;
}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 768px) {

    .tool-card-buttons {
        gap: 10px;
    }

    .tool-card-buttons .btn,
    .tool-card-buttons .pro-access-btn,
    .tool-card-buttons .btn-secondary {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        padding: 10px;
    }

}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 576px) {

    .tool-card-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .tool-card-buttons .btn,
    .tool-card-buttons .pro-access-btn,
    .tool-card-buttons .btn-secondary {
        width: 100%;
        height: 56px;
        min-height: 56px;
        max-height: 56px;
    }

}

/* ==================================================
   HOMEPAGE TOOL CARD BUTTONS
   FULL WIDTH - STACKED
================================================== */

.tool-card-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
}

.tool-card-buttons .btn,
.tool-card-buttons .pro-access-btn,
.tool-card-buttons .btn-secondary {
    width: 100%;
    height: 56px;
    min-height: 56px;
    max-height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    padding: 10px 16px;

    text-align: center;
    line-height: 1.2;

    flex: none;
}

/* Get Pro Access */

.tool-card-buttons .pro-access-btn {
    background: #3b82f6;
    color: #ffffff;
}

.tool-card-buttons .pro-access-btn:hover {
    background: #2563eb;
}

/* Learn More */

.tool-card-buttons .btn-secondary {
    background: #3b4a63;
    color: #ffffff;
}

.tool-card-buttons .btn-secondary:hover {
    background: #475a78;
}