/* ==========================================================================
   theme-sharp.css  -  Mindware India
   The "sharp" layer: high-contrast crimson blocks, square-ish cards, and the
   short underline accent used on india.gov.in. Colour tokens live in
   custom.css :root - this file only applies them.

   Load order: custom.css -> theme-sharp.css -> mobile-fixes.css
   ========================================================================== */

/* --- 1. Tricolour hairline across the very top of every page ------------- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 100000;
    background: linear-gradient(to right,
        var(--accent-saffron) 0 33.33%,
        #ffffff 33.33% 66.66%,
        var(--accent-green) 66.66% 100%);
}

/* --- 2. Section headings with the short crimson underline --------------- */
.section-header h2,
.mw-sharp-title {
    position: relative;
    padding-bottom: 16px;
    color: var(--secondary-color);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.section-header h2::after,
.mw-sharp-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 76px;
    height: 4px;
    background: var(--primary-color);
}

.section-header,
.section-header h2 {
    text-align: left;
}

.section-header.text-center h2::after,
.mw-sharp-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* --- 3. Buttons: solid crimson, tight corners, confident -------------- */
.btn-primary-custom,
.btn-primary,
.mw-btn-sharp {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: var(--transition-smooth);
}

.btn-primary-custom:hover,
.btn-primary-custom:focus,
.btn-primary:hover,
.btn-primary:focus,
.mw-btn-sharp:hover,
.mw-btn-sharp:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-outline-custom,
.mw-btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
    font-weight: 700;
}

.btn-outline-custom:hover,
.mw-btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* --- 4. Solid crimson feature block (the "Online Services" panel) ------ */
.mw-sharp-block {
    background: var(--primary-color);
    color: #fff;
    padding: 44px 40px;
    border-radius: 6px;
}

.mw-sharp-block h2,
.mw-sharp-block h3 {
    color: #fff;
    font-weight: 800;
    margin: 0 0 6px;
    position: relative;
    padding-bottom: 16px;
}

.mw-sharp-block h2::after,
.mw-sharp-block h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 76px;
    height: 4px;
    background: rgba(255, 255, 255, 0.85);
}

/* Stat tiles inside the crimson block */
.mw-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.mw-stat {
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 4px;
    padding: 22px 14px;
    text-align: center;
}

.mw-stat .mw-stat-num {
    display: block;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.mw-stat .mw-stat-label {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
}

/* --- 5. Crimson square icon tiles (the category rows) ----------------- */
.mw-icon-tile {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 6px;
    background: var(--primary-soft);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.mw-icon-tile.is-solid {
    background: var(--primary-color);
    color: #fff;
}

/* --- 6. Cards: crisper edges, crimson on hover ------------------------ */
.mw-sharp-card {
    background: #fff;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 24px;
    height: 100%;
    transition: var(--transition-smooth);
}

.mw-sharp-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.mw-sharp-card h3,
.mw-sharp-card h4 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-top: 14px;
}

/* --- 7. Chips / pills ------------------------------------------------- */
.mw-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
}

/* --- 8. Accessibility: visible keyboard focus ------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* --- 9. Mobile spacing for the sharp block ---------------------------- */
@media (max-width: 767px) {
    .mw-sharp-block {
        padding: 28px 20px;
    }

    .mw-stat .mw-stat-num {
        font-size: 26px;
    }

    .section-header h2::after,
    .mw-sharp-title::after {
        width: 56px;
    }
}
