/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.4 (Top Alignment Fix)
*/

/* --- 1. GENERATEPRESS WRAPPER CENTERING FIXES (WIDER DESKTOP) --- */

/* Reset basics for clean layout */
html, body { height: 100%; margin: 0; padding: 0; box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

/* Ensure site root wrappers are centered and constrained */
/* INCREASED max-width from 1200px to 1400px for a wider feel */
.site, .site-content, .content-area, .inside-article, .wrap, .container {
    max-width: 1400px !important; /* WIDER LAYOUT */
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 5px !important;  
    padding-right: 5px !important;
}

/* Make primary page container a centered flex/column */
.site-main.edtech-homepage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0; 
}

/* Constrain hero copy and center its contents - MAX WIDTH ADJUSTED TO MATCH WIDER LAYOUT */
.hero {
    width: 100%;
    max-width: 1400px; 
    margin-left: auto;
    margin-right: auto;
}
.hero-copy {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* Center the features grid and make cards fill nicely */
.features-grid {
    width: 100%;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

/* CTA button centered */
.cta-button {
    display: block; 
    margin: 30px auto 20px;
}

/* Safety: remove floats that might break centering */
.category-card, .hero-copy, .features-grid {
    float: none !important;
}

/* --- 2. HOMEPAGE SPECIFIC STYLES (Adjusted for Top Alignment) --- */

.edtech-homepage {
    background: linear-gradient(180deg, #071027 0%, #07182b 60%);
    color: #e8eef8;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
    min-height: 100%;
    padding: 0;
}
.page-header { margin-bottom: 0; }
/* Reduced top padding on .hero from 32px to 10px to push content up */
.hero { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; padding: 10px 0 32px; }
/* Removed padding-top here to ensure content sits high */
.hero-copy { padding-top: 0; } 
.hero-title { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; margin: 0 0 14px; font-weight: 700; color: #ffffff; }
.hero-description { color: #ffffff; font-size: clamp(16px, 2vw, 17px); margin: 0 0 24px; line-height: 1.5; opacity: 0.9; }
.ad-safe-buffer-top { margin-top: clamp(40px, 5vw, 60px) !important; }

/* Features Grid details */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 32px auto; padding: 0; }
.category-card { background: linear-gradient(135deg, #0f6ef0, #7bd389); color: #ffffff; padding: 24px; border-radius: 10px; box-shadow: 0 4px 15px rgba(2, 6, 23, 0.2); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; display: flex; flex-direction: column; height: 100%; border: 1px solid rgba(255,255,255,0.1); min-height: 160px; }
.category-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(2, 6, 23, 0.4); border: 1px solid #7bd389; }
.category-card a.category-full-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.category-title { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: #051025; }
.category-desc { margin: 0; color: rgba(0, 0, 0, 0.65); font-size: 13px; line-height: 1.4; flex-grow: 1; }
.category-link { margin-top: 12px; }
.category-archive-link { background: rgba(255,255,255,0.7); color: #051025; padding: 8px 12px; border-radius: 6px; font-weight: 700; text-decoration: none; display: block; text-align: center; font-size: 12px; transition: all 0.2s ease; border: 1px solid rgba(255,255,255,0.9); backdrop-filter: blur(10px); }
.category-archive-link:hover { background: rgba(255,255,255,0.9); color: #051025; }

/* CTA Button */
.cta-button { background: #0f6ef0; color: #ffffff; padding: 14px 24px; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: 15px; transition: background-color 0.2s ease; text-align: center; border: none; cursor: pointer; }
.cta-button:hover { background: #0d5ed6; color: #ffffff; }

/* --- 3. RESPONSIVE ADJUSTMENTS (REDUCED MOBILE PADDING) --- */

@media (max-width: 1024px) {
    .hero { gap: 32px; }
    .features-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (max-width: 768px) {
    /* Reduced padding for tablets/smaller viewports from 20px to 15px */
    .container, .wrap, .site, .site-main.edtech-homepage {
        padding-left: 10px !important; 
        padding-right: 10px !important;
    }
    
    .cta-button { width: 100%; padding: 12px 18px; }
    /* Reduced hero top padding on mobile from 20px to 10px */
    .hero { padding: 10px 0 24px; gap: 24px; }
    .features-grid { grid-template-columns: 1fr; gap: 12px; }
    .category-card { padding: 10px; }
}

@media (max-width: 480px) {
    /* Tighter padding for small phones, reduced from 16px to 10px */
    .container, .wrap, .site, .site-main.edtech-homepage {
        padding-left: 5px !important; 
        padding-right: 5px !important;
    }

    .hero-title { font-size: 26px; margin-bottom: 12px; }
    .hero-description { font-size: 15px; }
    .category-title { font-size: 15px; }
    .category-desc { font-size: 12px; }
    .category-archive-link { padding: 10px 14px; font-size: 13px; }
}
