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

/* ============== HERO SECTION STYLING ============== */
.hero {
    text-align: center;
    padding: 6rem 1.5rem; /* Extra vertical space */
    background-color: var(--card-bg); /* Use card background for a subtle lift */
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem auto; /* Center and provide bottom margin */
}


/* ============== TOOLS GRID SECTION STYLING ============== */
#tools {
    padding: 5rem 1.5rem; /* Vertical space */
}

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

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

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

.tools-grid {
    display: grid;
    /* On large screens, the featured card takes up 2 columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}


/* ============== FEATURED CARD STYLING ============== */
/* This makes the "Recipe Scaler" card stand out */

.featured-card {
    /* Spans the full width (both columns) of the grid */
    grid-column: 1 / -1;
    position: relative; /* Needed for the badge */
    
    /* Make it more visual */
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 2rem;
    background-color: #eef2ff; /* A very light, inviting lavender background */
    border-color: var(--primary-color);
}

.featured-card:hover {
    border-color: var(--secondary-color);
}

.featured-card .card-icon {
    font-size: 4rem;
    margin: 0;
}

/* Badge style for "Most Popular" */
.card-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}


/* ============== RESPONSIVE DESIGN FOR HOMEPAGE ============== */
@media (max-width: 768px) {
    /* On tablets and mobile, stack all cards in one column */
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        flex-direction: column;
        text-align: center;
        gap: 0;
    }
    
    .featured-card .card-icon {
        margin-bottom: 1.5rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}