/*
* HOMEPAGE STYLES FOR UNIQUE UTILITY TOOLS PLUGIN
* Enqueued via unique-utility-tools.php (unt_enqueue_homepage_styles function)
* Designed for professional layout on WordPress pages (GeneratePress Theme).
* This version contains extremely aggressive overrides to force layout for the homepage.
*/

/* Universal Box Sizing for better layout control (Good practice, helps with width calculations) */
*, *::before, *::after {
    box-sizing: border-box !important;
}

/* ==========================================================================
   1. CORE THEME LAYOUT OVERRIDES (Force Wide Content Area on Homepage)
   ========================================================================== */

/* Hide the default WordPress page title specifically on the homepage */
body.home .page-header,
body.home .entry-header,
body.home h1.entry-title {
    display: none !important;
}

/* Target GeneratePress's main content wrappers to remove max-width and padding */
/* These selectors go from outermost to innermost container, forcing full width */
body.home .site-container,
body.home .grid-container,
body.home #primary,
body.home #content {
    max-width: none !important; /* CRITICAL: Allow to stretch to full theme width */
    padding-left: 0 !important; /* Remove any default horizontal padding */
    padding-right: 0 !important; /* Remove any default horizontal padding */
}

/* Specific to GeneratePress for individual article/page content area.
   This is often the main wrapper around your content block. */
body.home .inside-article {
    padding: 0 !important; /* Remove any default padding */
    margin: 0 !important; /* Remove any default margins */
}

/* Target the main entry-content (where your HTML is pasted).
   This is often the container directly around your Custom HTML block. */
body.home .entry-content {
    max-width: none !important; /* CRITICAL: Ensure it expands to fill available width */
    padding: 0 !important; /* Remove any default padding */
    margin: 0 !important;
    width: 100% !important; /* Ensure it takes full available width */
}

/* Add some top/bottom spacing around your main homepage container, applies to site content wrapper */
body.home .site-content {
    padding-top: 40px !important; /* Space above your custom container */
    padding-bottom: 40px !important; /* Space below your custom container */
    background-color: #f0f2f5 !important; /* Apply the page background to the full content area */
}


/* ==========================================================================
   2. HOMEPAGE CUSTOM CONTAINER STYLES (Enlarged & Centered within new width)
   ========================================================================== */

/* This targets YOUR main homepage content container */
.unt-homepage-container {
    background-color: #ffffff !important; /* Force background */
    padding: 40px !important; /* Force padding */
    border-radius: 25px !important; /* Force rounded corners */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; /* Force shadow */
    text-align: center !important; /* Force center alignment */
    font-family: Arial, sans-serif !important; /* Force font */
    border: none !important; /* Ensure no border interferes */
    
    /* Force wide layout */
    max-width: 1200px !important; /* Maximum width for desktop, adjust if needed */
    width: 90% !important; /* Responsive width (90% of its parent's now forced 100% width) */
    margin: 0 auto !important; /* CRITICAL: Centered horizontally */
    float: none !important; /* Ensure no floats interfere */
    overflow: hidden !important; /* Prevents potential horizontal scrollbar due to padding/margins */
    display: block !important; /* Ensure it behaves as a block */
}

/* Hero Section */
.unt-homepage-container .hero-section h1 {
    color: #333 !important;
    font-size: 2.8em !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    line-height: 1.2 !important;
}
.unt-homepage-container .hero-section p {
    color: #666 !important;
    font-size: 1.2em !important;
    line-height: 1.6 !important;
    margin-bottom: 30px !important;
    max-width: 700px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Value Proposition Section */
.unt-homepage-container .value-prop-section {
    margin-top: 40px !important;
    padding-top: 30px !important;
    border-top: 1px solid #eee !important;
}
.unt-homepage-container .value-prop-section h2 {
    color: #4a4a4a !important;
    font-size: 2em !important;
    font-weight: 600 !important;
    margin-bottom: 25px !important;
}
/* Force Grid for value props items */
.unt-homepage-container .value-props-grid {
    display: grid !important; /* FORCE GRID */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; /* Responsive columns */
    gap: 20px !important;
    margin-bottom: 40px !important;
    justify-content: center !important; /* Center the grid items */
}
.unt-homepage-container .value-prop-item {
    background-color: #f7f7f7 !important;
    padding: 15px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    font-weight: bold !important;
    color: #007bff !important;
    font-size: 1.1em !important;
    display: flex !important; /* Force flex for alignment */
    flex-direction: column !important;
    align-items: center !important; /* Center items */
    justify-content: center !important; /* Center items */
    min-height: 120px !important; /* Consistent height */
}
.unt-homepage-container .value-prop-item span {
    display: block !important;
    font-size: 2em !important;
    margin-bottom: 10px !important;
}


/* ==========================================================================
   3. TOOL SHOWCASE GRID STYLES (Force Grid & Card Appearance)
   ========================================================================== */

.unt-homepage-container .tool-showcase-section {
    margin-top: 50px !important;
    padding-top: 30px !important;
    border-top: 1px solid #eee !important;
}
.unt-homepage-container .tool-showcase-section h2 {
    color: #4a4a4a !important;
    font-size: 2em !important;
    font-weight: 600 !important;
    margin-bottom: 30px !important;
}
.unt-tools-grid {
    display: grid !important; /* FORCE GRID for tool cards */
    grid-template-columns: repeat(2, 1fr) !important; /* EXPLICITLY 2 columns on wider screens */
    gap: 25px !important;
    margin-bottom: 40px !important;
    justify-content: center !important; /* Center the grid items */
    align-items: stretch !important; /* Ensure cards stretch to fill grid area */
}

.unt-tool-card {
    background-color: #ffffff !important;
    padding: 20px !important;
    border-radius: 15px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    text-align: center !important; /* Center all card content */
    display: flex !important; /* Force flex for vertical alignment */
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 280px !important; /* Consistent card height */
    float: none !important; /* Ensure no floats interfere with grid */
}

.unt-tool-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.unt-tool-card .tool-icon {
    font-size: 2.5em !important;
    margin-bottom: 10px !important;
    text-align: center !important;
}

.unt-tool-card .tool-title {
    font-size: 1.4em !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 10px !important;
    text-align: center !important;
}

.unt-tool-card .tool-description {
    font-size: 0.95em !important;
    color: #777 !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    flex-grow: 1 !important;
    text-align: center !important;
}

.unt-tool-card .go-to-tool-btn {
    display: inline-block !important;
    width: auto !important;
    margin-top: auto !important;
    background-color: #007bff !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background-color 0.3s ease !important;
    align-self: center !important;
}

.unt-tool-card .go-to-tool-btn:hover {
    background-color: #0056b3 !important;
}

/* Additional Text Content Section */
.homepage-bottom-content-section {
    margin-top: 50px !important;
    padding-top: 30px !important;
    border-top: 1px solid #eee !important;
    text-align: left !important; /* Keep text left-aligned in this content block */
}
.homepage-bottom-content-section h2,
.homepage-bottom-content-section h3 {
    color: #4a4a4a !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    text-align: center !important; /* Center these headings within this section */
}
.homepage-bottom-content-section h2 {
    font-size: 2em !important;
    margin-bottom: 30px !important;
}
.homepage-bottom-content-section h3 {
    font-size: 1.5em !important;
    margin-top: 30px !important;
}
.homepage-bottom-content-section p,
.homepage-bottom-content-section ul {
    color: #666 !important;
    font-size: 1.05em !important;
    line-height: 1.7 !important;
    margin-bottom: 20px !important;
}
.homepage-bottom-content-section ul {
    list-style-type: disc !important;
    margin-left: auto !important; /* Center list */
    margin-right: auto !important; /* Center list */
    max-width: 700px !important; /* Constrain list width */
    text-align: left !important; /* Keep list items left-aligned */
    padding-left: 20px !important;
}
.homepage-bottom-content-section ul li {
    margin-bottom: 10px !important;
}
.homepage-bottom-content-section a {
    color: #007bff !important;
    text-decoration: none !important;
    font-weight: bold !important;
}
.homepage-bottom-content-section a:hover {
    text-decoration: underline !important;
}


/* Call to Action Footer (within your custom container) */
.unt-homepage-container .call-to-action-footer {
    margin-top: 30px !important;
    padding-top: 20px !important;
    border-top: 1px solid #eee !important;
    font-size: 1em !important;
    color: #666 !important;
}
.unt-homepage-container .call-to-action-footer a {
    color: #007bff !important;
    text-decoration: none !important;
}
.unt-homepage-container .call-to-action-footer a:hover {
    text-decoration: underline !important;
}


/* ==========================================================================
   4. RESPONSIVE ADJUSTMENTS (WITH !important)
   ========================================================================== */

@media (max-width: 1024px) { /* Laptops and larger tablets */
    .unt-homepage-container {
        max-width: 90% !important; 
        padding: 35px !important;
    }
    .unt-tools-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Explicitly 2 columns on medium-wide screens */
    }
    .unt-tool-card {
        min-height: 260px !important;
    }
}

@media (max-width: 768px) { /* Tablets */
    .unt-homepage-container {
        padding: 30px 20px !important;
        border-radius: 20px !important;
    }
    .unt-homepage-container .hero-section h1 {
        font-size: 2.2em !important;
    }
    .unt-homepage-container .hero-section p {
        font-size: 1.0em !important;
    }
    .unt-homepage-container .value-props-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
        gap: 15px !important;
    }
    .unt-tools-grid {
        grid-template-columns: 1fr !important; /* FORCE 1 column on tablets and smaller */
        gap: 15px !important;
    }
    .unt-tool-card {
        min-height: 250px !important;
    }
    .unt-tool-card .tool-title {
        font-size: 1.3em !important;
    }
    .unt-tool-card .tool-description {
        font-size: 0.9em !important;
    }
}

@media (max-width: 480px) { /* Small phones */
    .unt-homepage-container {
        padding: 20px 15px !important;
    }
    .unt-homepage-container .hero-section h1 {
        font-size: 1.6em !important;
    }
    .unt-homepage-container .hero-section p {
        font-size: 0.9em !important;
    }
    .unt-homepage-container .value-props-grid {
        grid-template-columns: 1fr !important;
    }
    .unt-tools-grid {
        grid-template-columns: 1fr !important; /* Single column on very small screens */
        gap: 15px !important;
    }
    .unt-tool-card {
        min-height: 220px !important;
    }
    .unt-tool-card .tool-title {
        font-size: 1.2em !important;
    }
    .unt-tool-card .tool-description {
        font-size: 0.85em !important;
    }
}