/*
 * Family Home Hub - FINAL, POLISHED Utility Dashboard CSS
 * Includes: High-Contrast Layout, Two-Column Grid, White Hover Icons, and Poppins/Roboto Typography
 */

/* --- Global Reset & Typography --- */
body {
    font-family: 'Roboto', sans-serif; /* Roboto for Body/Descriptions */
    background-color: #F8F8F8;
    color: #111111;
    margin: 0;
    line-height: 1.6;
    text-align: center;
}

a {
    text-decoration: none;
}

/* --- 1. Header & Branding --- */
.utility-header {
    background-color: #333333;
    color: white;
    padding: 30px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.utility-header h1 {
    font-family: 'Poppins', sans-serif; /* Poppins for main title */
    font-weight: 700;
    font-size: 2em; /* Final approved size */
    margin: 0;
}

/* --- 2. Main Grid Layout --- */
.dashboard-grid-container {
    display: flex;
    justify-content: center;
    max-width: 1200px; 
    margin: 30px auto 50px;
    padding: 0 20px;
    gap: 40px;
    text-align: left;
}

.media-stack {
    flex: 2;
    display: flex;
    flex-wrap: wrap; 
    gap: 15px;
}

.auxiliary-services {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- 3. Heading Alignment & Styling (Poppins Typography) --- */
.category-heading {
    font-family: 'Poppins', sans-serif; /* Poppins for section headings */
    color: #1F4E79;
    font-weight: 700;
    font-size: 1.5em;
    
    /* Alignment adjustment to match card content padding (20px) */
    padding: 0 0 10px 20px;
    margin: 0 0 20px -20px;
    width: calc(100% + 40px);
    
    border-bottom: 2px solid #EEEEEE; 
}

/* --- 4. Card Links & Hover States --- */
.service-card {
    background-color: white; 
    color: #111111; 
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    flex: 1 1 calc(50% - 10px); 
    min-width: 200px;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); 
    color: white; /* Text turns white on hover */
    background-color: #007ACC; /* Card background turns blue on hover */
}

/* --- 5. Typography Hierarchy --- */
.service-card h3 {
    font-family: 'Poppins', sans-serif; /* Poppins for service name */
    font-weight: 700; 
    font-size: 20px;
    margin: 0;
    line-height: 1.2;
}

.service-card p {
    font-weight: 400; 
    font-size: 14px;
    color: #666666; 
    margin: 5px 0 0 0;
}

.service-card:hover p {
    color: white; /* Description text turns white on hover */
}

/* --- 6. Icon Styling (Final Contrast Fix) --- */
.icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    
    /* Default icon color on white card: Accent Blue */
    color: #007ACC; 
    stroke: currentColor; 
    fill: none;
}

.service-card:hover .icon {
    /* When card is dark blue, icon color becomes WHITE for max contrast */
    color: white; 
}

/* --- 7. Footer Legibility --- */
.utility-footer {
    background-color: #F0F0F0;
    color: #444444;
    padding: 15px 0;
    font-size: 0.9em;
    font-weight: 400;
}

/* --- 8. Mobile Responsiveness --- */
@media (max-width: 900px) {
    .dashboard-grid-container {
        flex-direction: column;
        gap: 30px;
    }
    .media-stack {
        justify-content: space-around;
    }
    .service-card {
        flex: 1 1 100%;
    }
    .category-heading {
        padding: 0 0 10px 0;
        margin: 0 0 20px 0;
        width: 100%;
        text-align: center;
    }
}