/* ======================================================== */
/* ==== HOMEPAGE-SPECIFIC STYLES (homepage.css) ==== */
/* ======================================================== */

/* ============== HERO SECTION STYLING ============== */
.hero {
    text-align: center;
    padding: 7rem 1.5rem; /* More vertical space for impact */
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5rem); /* Bigger, bolder font */
    font-weight: 700;
    letter-spacing: -2px; /* A modern touch */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero .subtitle {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}


/* ============== TOOLS GRID SECTION STYLING ============== */
#tools {
    padding: 5rem 1.5rem;
    background-color: var(--card-bg); /* White background for this section */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* --- The Tool Card Styles --- */
.tools-grid {
    display: grid;
    /* On large screens, shows 4 cards; on medium, 2; on small, 1 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2.5rem;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative; /* Needed for the badge */
}

.tool-card:hover { 
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.07);
    border-color: var(--primary-color);
}

.card-icon {
    font-family: var(--font-mono); /* Use the mono font for icons like "Aa" & "123" */
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    background-color: var(--input-bg);
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* --- Featured Card (for Case Converter) --- */
.featured-card {
    /* Make it stand out by spanning two columns on larger screens */
    grid-column: span 2;
    background-color: #fefcbf; /* A light, attention-grabbing yellow */
    border-color: #facc15;
}

.featured-card:hover {
    border-color: #eab308;
}

.featured-card .card-icon {
    background-color: #fde68a;
    color: #ca8a04;
}

.card-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: #facc15;
    color: #422006;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}


/* ============== RESPONSIVE ADJUSTMENTS ============== */
@media (max-width: 820px) {
    /* On medium screens, stop the featured card from spanning two columns */
    .featured-card {
        grid-column: auto;
    }
}