/*
 Theme Name:   Astra Child
 Description:  Custom Child Theme for University Helper
 Author:       University Helper
 Template:     astra
 Version:      1.0.3
*/

/* ==========================================================================
   1. GLOBAL COLOR SYSTEM & BASE
   ========================================================================== */
:root {
    --primary-navy: #0F2B46;
    --soft-navy: #1E3A5F;
    --accent-yellow: #F4B63D;
    --accent-yellow-hover: #E8A90F;
    --bg-light: #F4F6F9;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --white: #ffffff;
    --border-color: #e5e7eb;
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
}

a {
    text-decoration: none;
    transition: 0.2s ease;
}

/* Hide Astra Default Layout Elements */
.main-header-bar,
.ast-primary-header-bar,
.ast-mobile-header-wrap,
.site-footer {
    display: none !important;
}

/* ==========================================================================
   2. UNIFIED CONTAINERS
   ========================================================================== */
.uh-container {
    max-width: 1280px !important;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ==========================================================================
   3. TOP TICKER
   ========================================================================== */
.uh-top-bar {
    background: #d32f2f;
    color: #fff;
    height: 35px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.uh-ticker-label {
    background: #000;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 11px;
}

.uh-ticker-content a {
    color: #fff;
    font-size: 13px;
    margin-right: 30px;
}

/* ==========================================================================
   4. MAIN HEADER
   ========================================================================== */
.uh-main-header {
    background: var(--primary-navy);
    position: relative;
    z-index: 1000;
}

.uh-header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 72px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.uh-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.uh-logo img {
    height: 44px;
    width: auto;
}

.uh-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.uh-menu-list {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.uh-menu-list a {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.uh-menu-list a:hover {
    color: var(--accent-yellow);
}

.uh-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    height: 100%;
}

.tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-yellow);
    color: #000 !important;
    padding: 10px 20px;
    height: 40px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: 0.2s ease;
}

.tg-btn:hover {
    background: var(--accent-yellow-hover);
    transform: translateY(-1px);
}

.uh-mobile-toggle {
    display: none;
}

/* ==========================================================================
   5. SUB HEADER
   ========================================================================== */
.uh-sub-header {
    background: #f1f1f1;
    border-bottom: 2px solid #0073aa;
    padding: 12px 0;
}

.uh-sub-header .uh-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uh-search-box form {
    display: flex;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.uh-search-box input {
    border: none;
    padding: 8px 15px;
    width: 300px;
    font-size: 14px;
}

.uh-search-box button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 0 18px;
    font-weight: bold;
}

.uh-trending span {
    font-weight: bold;
    color: #d32f2f;
}

.uh-trending a {
    margin-left: 10px;
    color: #0073aa;
}

/* ==========================================================================
   6. HOMEPAGE & COMPACT HERO SECTION
   ========================================================================== */
.uh-home {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8ecf4 100%);
}

.uh-hero.compact-hero {
    padding: 50px 0 40px !important; 
    background: linear-gradient(rgba(15,43,70,0.92), rgba(30,58,95,0.92)), url('images/hero-bg.jpg') center/cover;
    color: var(--white);
    width: 100%;
}

.hero-content.centered-content {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 16px !important;
}

.hero-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem) !important;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    color: var(--white) !important;
}

.hero-sub {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    color: var(--white) !important;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-yellow);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(244, 182, 61, 0.3);
}

.hero-cta-group.justify-center {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin-top: 10px;
}

.cta-btn {
    background: var(--accent-yellow);
    color: var(--primary-navy) !important;
    padding: 18px 48px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.15rem;
    box-shadow: 0 10px 30px rgba(244,182,61,0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 45px rgba(244,182,61,0.7);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white) !important;
    box-shadow: none;
}

.secondary-btn:hover {
    background: var(--white);
    color: var(--primary-navy) !important;
}

/* ==========================================================================
   7. TRUST BANNER & SECTIONS
   ========================================================================== */
.uh-trust-banner {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.trust-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: var(--text-dark);
}

.trust-icon { font-size: 24px; }

.uh-section {
    padding: 100px 0;
    width: 100%;
}

.alt-bg {
    background: var(--white);
    box-shadow: 0 10px 50px rgba(0,0,0,0.08);
    border-radius: 24px;
    margin: 50px 0;
}

.section-header { margin-bottom: 50px; }
.section-header.center { text-align: center; }

.section-header.center .section-title {
    border-left: none;
    padding-left: 0;
}

.section-header.center .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 6px;
    background: var(--accent-yellow);
    margin: 15px auto 0;
    border-radius: 3px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    background: linear-gradient(135deg, var(--primary-navy), var(--soft-navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    border-left: 8px solid var(--accent-yellow);
    padding-left: 32px;
    margin-bottom: 60px;
}

.section-desc {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: -40px;
    margin-bottom: 30px;
}

/* ==========================================================================
   8. GRIDS & BUTTONS
   ========================================================================== */
.quick-center {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.uh-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px;
    width: 100%;
    margin: 30px 0;
}

.home-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 30px 0;
    width: 100%;
}

.grid-col {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    width: 100%;
}

.grid-head {
    background: var(--primary-navy);
    color: #fff;
    padding: 12px;
    text-align: center;
    font-weight: 700;
}

.grid-links {
    list-style: none;
    margin: 0;
    padding: 10px 15px;
}

.grid-links li { font-size: 14px; margin-bottom: 6px; }

.grid-links a {
    display: block;
    padding: 6px 0;
    color: var(--text-dark);
    border-bottom: 1px solid #f3f4f6;
}

.grid-links a:hover { color: #0073aa; }

.grid-more {
    display: block;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #0046ad;
}

.uh-btn {
    background: var(--accent-yellow);
    color: #000 !important;
    padding: 16px 20px;
    text-align: center;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.uh-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ==========================================================================
   9. COMMUNITY CTA & FOOTER
   ========================================================================== */
.uh-community-cta { padding: 60px 0; }

.community-box {
    background: linear-gradient(135deg, var(--primary-navy), var(--soft-navy));
    border-radius: 20px;
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    box-shadow: 0 15px 40px rgba(15, 43, 70, 0.2);
}

.community-text h2 { color: var(--accent-yellow); font-size: 2rem; margin: 0 0 10px 0; }
.community-text p { margin: 0; font-size: 1.1rem; opacity: 0.9; max-width: 600px; }
.large-tg { padding: 16px 32px; font-size: 16px; border-radius: 8px; }

.uh-custom-footer {
    background: var(--primary-navy);
    color: var(--white);
    padding: 48px 20px;
    font-size: 15px;
    line-height: 1.6;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.uh-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 320px;
    gap: 36px;
    align-items: start;
}

.footer-col--brand .footer-brand img {
    display: block;
    max-width: 100%;
    width: auto !important;
    height: auto !important;
    max-height: 65px;
    object-fit: contain;
    margin-bottom: 16px;
}

.footer-logo-text {
    display: inline-block;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 20px;
    color: var(--white);
}

.footer-desc { color: rgba(255,255,255,0.85); margin: 8px 0 18px; max-width: 360px; }

.footer-social { display: flex; gap: 16px; margin-top: 24px; align-items: center; }
.footer-social .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--accent-yellow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social .social-link svg { width: 20px; height: 20px; fill: currentColor; transition: fill 0.3s ease; }
.footer-social .social-link:hover {
    background: var(--accent-yellow);
    color: var(--primary-navy); 
    border-color: var(--accent-yellow);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(244, 182, 61, 0.25);
}

.footer-title { color: var(--white); font-weight: 700; margin-bottom: 12px; font-size: 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.88); transition: color .15s; }
.footer-links a:hover { color: var(--accent-yellow); }

.footer-small { color: rgba(255,255,255,0.9); margin-bottom: 10px; }
.footer-newsletter .newsletter-row { display: flex; gap: 8px; margin-top: 8px; }
.newsletter-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--white);
    outline: none;
}

.newsletter-input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-submit {
    background: var(--accent-yellow);
    color: #000;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.footer-meta { margin-top: 18px; color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-meta a { color: rgba(255,255,255,0.8); }
.site-copy { margin: 0 0 6px; }
.site-url { margin: 0; }

/* ==========================================================================
   10. ASTRA LAYOUT OVERRIDES (CRITICAL FIX)
   ========================================================================== */

/* Kill the ghost sidebar everywhere */
#secondary { display: none !important; }

/* Force the master outer wrappers to 100% width globally */
/* This ensures the Header, Footer, and Homepage stay edge-to-edge */
.site, 
#page,
.site-content,
.site-content > .ast-container,
#primary {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* POSTS & PAGES ONLY: Constrain the actual reading area, NOT the header */
/* This targets ONLY the blog post text so it reads beautifully */
.single #primary,
.archive #primary,
.page:not(.home) #primary {
    max-width: 900px !important; 
    margin: 50px auto !important; 
    padding: 0 24px !important; 
}

/* Fix Title spacing on Astra Single Posts */
.single .entry-header { margin-bottom: 30px; text-align: center; }
.single .entry-title { font-size: clamp(2rem, 4vw, 3rem); color: var(--primary-navy); font-weight: 800; }


/* ==========================================================================
   11. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1000px) {
    .uh-footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-col--contact { order: 3; }
}

@media (max-width: 991px) {
    .uh-header-container { height: 60px; }
    .uh-header-btn { display: none; }
    
    /* SLEEK MOBILE MENU BUTTON */
    .uh-mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px; 
        width: 44px; 
        height: 44px;
        background: transparent; 
        border: none; 
        cursor: pointer;
        z-index: 100000;
    }
    
    .uh-mobile-toggle span {
        width: 26px; 
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    }

    .uh-mobile-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .uh-mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .uh-mobile-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    /* DROPDOWN MENU */
    .uh-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        z-index: 99999;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .uh-navigation.active { display: block; }
    .uh-menu-list { flex-direction: column; gap: 0; }
    .uh-menu-list a { color: #111; padding: 15px 20px; border-bottom: 1px solid #eee; display: block; }
}

@media (max-width: 900px) {
    .uh-hero { padding: 100px 0 70px; }
    .uh-section { padding: 70px 0; }
    .uh-action-grid { grid-template-columns: repeat(2, 1fr); }
    .home-grid-wrapper { grid-template-columns: 1fr; }
    .uh-sub-header .uh-container { flex-direction: column; gap: 12px; }
    .uh-search-box, .uh-search-box form, .uh-search-box input { width: 100%; }
    
    .hero-cta-group.justify-center {
        flex-direction: column;
        max-width: 300px;
    }
    
    .community-box {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 30px 20px;
    }
}

@media (max-width: 640px) {
    .uh-footer-inner { grid-template-columns: 1fr; gap: 22px; text-align: left; }
    .footer-social { justify-content: flex-start; }
    .newsletter-row { flex-direction: column; }
    .newsletter-submit { width: 100%; }
}

@media (max-width: 544px) {
    .ast-container { padding-left: 20px !important; padding-right: 20px !important; }
}


