/* ============================================
   OsTicket - Homepage-specific Styles
   Loaded only on index.php (section=home)
   Global header/nav/footer/forms -> client-global.css
   ============================================ */

/* Full-width layout for homepage — strip the card and all constraints */
body.section-home #content {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#landing_page { padding-top: 0; }

/* ---- Inner content wrapper ---- */
.home-content-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

/* ---- Hero Banner ---- */
.hero-banner {
    background: linear-gradient(135deg, #8b0000 0%, #cc0000 50%, #e53935 100%);
    padding: 72px 40px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-banner h1 {
    color: #fff !important;
    font-size: clamp(28px, 4vw, 48px) !important;
    font-weight: 700 !important;
    margin: 0 0 16px !important;
    letter-spacing: -0.5px;
    position: relative;
}
.hero-banner p.hero-subtitle {
    color: rgba(255,255,255,0.82) !important;
    font-size: clamp(15px, 2vw, 19px);
    margin: 0 auto 36px;
    max-width: 560px;
    line-height: 1.6;
    position: relative;
}

/* ---- Hero Search ---- */
.hero-search {
    position: relative;
    max-width: 560px;
    margin: 0 auto 40px;
}
.hero-search form {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.hero-search input.search {
    flex: 1;
    padding: 16px 24px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 15px;
    outline: none;
    color: #1a202c;
    background: #fff;
    width: auto !important;
}
.hero-search button {
    padding: 16px 28px !important;
    background: #f59e0b !important;
    color: #fff !important;
    border: none !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background .2s;
}
.hero-search button:hover { background: #d97706 !important; transform: none !important; }

/* ---- Hero CTA Buttons ---- */
.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}
.hero-cta a.btn-primary {
    background: #f59e0b;
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(245,158,11,0.35);
    transition: background .2s, transform .15s;
    display: inline-block;
}
.hero-cta a.btn-primary:hover { background: #d97706; transform: translateY(-2px); }
.hero-cta a.btn-outline {
    background: transparent;
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.6);
    transition: border-color .2s, background .2s, transform .15s;
    display: inline-block;
}
.hero-cta a.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* ---- Feature Cards Strip ---- */
.features-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0 0 28px;
}
.feature-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}
.feature-card .feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 22px;
}
.feature-card:nth-child(1) .feature-icon { background: #fff5f5; color: #cc0000; }
.feature-card:nth-child(2) .feature-icon { background: #f0fff4; color: #059669; }
.feature-card:nth-child(3) .feature-icon { background: #fffaf0; color: #d97706; }
.feature-card h3 { font-size: 15px; font-weight: 600; color: #1a202c; margin: 0 0 6px; }
.feature-card p  { font-size: 13px; color: #718096; line-height: 1.5; margin: 0; }

/* ---- Two-column layout ---- */
.home-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.home-main { flex: 1; min-width: 0; }

/* ---- Sidebar ---- */
.sidebar {
    float: none !important;
    width: 260px !important;
    flex-shrink: 0;
}
.front-page-button { margin-bottom: 16px; }
.front-page-button .flush-right { float: none !important; }
.front-page-button p { margin: 0 0 10px; }
.sidebar .content {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.sidebar .content section { padding: 0; }
.sidebar .content section + section { border-top: 1px solid #e2e8f0; }
.sidebar .content .header {
    background: #f7fafc;
    padding: 11px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #718096;
    border-bottom: 1px solid #e2e8f0;
}
.sidebar .content div a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #4a5568 !important;
    text-decoration: none;
    border-bottom: 1px solid #f7fafc;
    transition: background .12s, color .12s;
    line-height: 1.4;
}
.sidebar .content div a:hover { background: #fff5f5; color: #cc0000 !important; }
.sidebar .content div:last-child a { border-bottom: none; }

/* ---- Welcome / Thread body ---- */
.thread-body {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.thread-body h1 { font-size: 22px; font-weight: 700; color: #1a202c; margin: 0 0 12px; }
.thread-body h2 { font-size: 18px; font-weight: 600; color: #2d3748; }
.thread-body p  { color: #4a5568; line-height: 1.7; }

/* ---- Featured KB ---- */
.kb-section { margin-top: 0; }
.kb-section > h1 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 0 16px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.kb-section > h1::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #cc0000;
    border-radius: 2px;
    flex-shrink: 0;
}
.featured-category.front-page {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.featured-category.front-page > .icon-folder-open { color: #cc0000; font-size: 20px; margin-bottom: 6px; display: block; }
.featured-category.front-page > .category-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.article-headline { padding: 10px 0; border-bottom: 1px solid #f7fafc; }
.article-headline:last-child { border-bottom: none; }
.article-title a { font-size: 14px; font-weight: 500; color: #cc0000; text-decoration: none; }
.article-title a:hover { text-decoration: underline; color: #a80000; }
.article-teaser { font-size: 13px; color: #718096; margin-top: 3px; line-height: 1.5; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hero-banner  { padding: 48px 24px 56px; }
    .home-layout  { flex-direction: column-reverse; }
    .sidebar      { width: 100% !important; }
    .features-strip { grid-template-columns: 1fr 1fr; }
    .home-content-inner { padding: 24px 16px 36px; }
}
@media (max-width: 560px) {
    .features-strip { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-cta a { width: 100%; max-width: 280px; text-align: center; }
    .thread-body { padding: 20px 18px; }
}
