/* ==========================================================================
   STYLE V1.1.CSS  – CONSOLIDATED + FIXED
   --------------------------------------------------------------------------
   Objectives:
   ✔ Restore correct appearance from original mobile.css & related files
   ✔ Fix merge-induced layout & styling regressions
   ✔ Preserve safe modern improvements
   ✔ Prepare ground for flex/grid migration (future v2.0)
   ========================================================================== */


/* ========================================================================== */
/* === A. GLOBAL BASE STYLES (as per merge, mostly retained) ================ */
/* ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6; /* Overridden later for legacy layout */
    background-color: #478E75; /* original site background */
    color: #000;
}

a {
    text-decoration: none;
    color: #000099;
}

a:hover {
    color: #fecf37;
    border-color: #fecf37;
}


/* ========================================================================== */
/* === B. LEGACY TEXT & SPACING FIXES ======================================= */
/* ========================================================================== */

p, li {
    line-height: 1.4 !important;   /* original tighter spacing */
    padding-bottom: 10px;          /* restore bottom padding */
}

/* FIX WIDTH OVERFLOW IN LEGACY LAYOUT */
.content-holder-50,
.content-holder-33 {
    box-sizing: border-box;   /* include padding in width */
    overflow: hidden;         /* prevent scrollbars, but allow float layout */
    float: left;
}

/* Restore widths for desktop layout */

.content-holder-100 {
    box-sizing: border-box;
    width: 100% !important;
}


.content-holder-50 {
    width: 50% !important;
}

.content-holder-33 {
    width: 33% !important;
}


/* Two-column layout */
.content-holder-50 {
    width: calc(50% - 10px) !important;   /* Make room for spacing */
    margin-right: 10px;                   /* Gap between 2 columns */
}

/* Three-column layout */
.content-holder-33 {
    width: calc(33.33% - 10px) !important; /* Adjust to allow margin */
    margin-right: 10px;                    /* Gap between 3 columns */
}

/* Remove right-margin on last in row */
.content-holder-50:nth-child(2n),
.content-holder-33:nth-child(3n) {
    margin-right: 0;
}

/* Mobile override — full width, no gap */
@media (max-width: 600px) {
    .content-holder-50,
    .content-holder-33 {
        width: 100% !important;
        margin-right: 0 !important;
    }
}


/* ========================================================================== */
/* === C. PANEL & LAYOUT CONTAINERS ========================================= */
/* ========================================================================== */

/* contain floats (prevents layout collapse) */
#menu-panel,
.splash,
article,
#page-content {
    overflow: auto;
}

/* container structure */
#box-a {
    background-color: #478E75;
}

#box-b {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px;
    overflow: visible !important;
}


/* ========================================================================== */
/* === D. MENU PANEL & BUTTON RESTORATION =================================== */
/* ========================================================================== */

#menu-panel {
    background-color: #478E75;
    padding: 10px 0;
    border-radius: 10px;
}

#menu-panel ul {
    padding: 0;
    margin: 0;
}

#menu-panel li {
    list-style-type: none;
    float: left;
    width: 22%;
    margin: 0 1%;
}

#menu-panel a {
    background-color: #306354 !important;
    color: white !important;
    font-size: 20px !important;
    font-weight: bold;
    font-style: italic;
    text-align: center;
    display: block;
    height: 30px;
    line-height: 30px;
    border-radius: 10px;
}

#menu-panel a:hover {
    background-color: #9bcabb !important;
}


/* ========================================================================== */
/* === E. ARTICLE PANELS ==================================================== */
/* ========================================================================== */

article {
    background-color: #9bcabb !important;
    border: 5px outset #306354;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 10px;
}

/* article headers - restored */
article h2 {
    background-color: #478E75 !important;
    color: #000099 !important;
    border-radius: 5px 5px 0 0;
    padding: 5px 10px;
    margin: -10px -10px 10px -10px;
}

/* only use underline on top-level H1 outside article */
body > h1,
#page-content > h1 {
    font-size: 2rem;
    border-bottom: 3px solid #fecf37;
}


/* ========================================================================== */
/* === F. SPLASH MODULE (top hero) ========================================== */
/* ========================================================================== */

.splash {
    background-color: #fecf37 !important;
    border: 5px outset #fecf37;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 20px;
}

.splash-50pc-panel {
    float: left;
    width: 50%;
}

.splash-header {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}


/* ========================================================================== */
/* === G. RESPONSIVE HANDLING =============================================== */
/* ========================================================================== */

@media (max-width: 600px) {

    #menu-panel li,
    .splash-50pc-panel,
    .content-holder-50,
    .content-holder-33 {
        width: 100% !important;
        float: none !important;
        margin: 0 0 10px 0;
    }

    #menu-panel a {
        font-size: 18px;
        height: auto;
        line-height: normal;
        padding: 5px;
    }
}


/* ========================================================================== */
/* === H. SUPPORT UTILITIES ================================================== */
/* ========================================================================== */

.clear-left {
    clear: left;
}

img {
    max-width: 100%;
    height: auto;
}


/* ========================================================================== */
/* === I. FUTURE UPGRADE HOOKS (unused now, ready for flex/grid) ============ */
/* ========================================================================== */
/*
article, #menu-panel ul {
    // display: flex;           <-- enable in v2.0
    // flex-wrap: wrap;
}
*/

