/* 
   PROCESS ENGINEERING REFERENCE SHEETS - GLOBAL STYLES
   Author: MyEngineeringTools.com
   Version: 1.3 (2026) - Full Mobile Responsiveness Update
*/

/* 1. BASE STYLES */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: #ff6600;
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: #000066;
    text-decoration: underline;
}

/* 2. HEADER & IDENTITY */
.met-header {
    background-color: #ffffff;
    border-bottom: 4px solid #000066;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-flex {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    flex-shrink: 0; /* Prevents container from squishing if image is broken */
}

.logo-container img {
    height: 70px;
    width: auto;
    margin-right: 20px;
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-size: 28px;
    font-weight: 700;
    color: #000066;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.brand-sub {
    font-size: 15px;
    font-style: italic;
    color: #ff6600;
    font-family: "Georgia", serif;
    margin-top: 4px;
}

/* 3. LAYOUT GRID */
.main-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px; 
    gap: 30px;
}

/* 4. CONTENT CARDS */
.content-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

h1 {
    color: #000066;
    font-size: 34px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
}

h2 {
    color: #000066;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    margin-top: 45px;
    font-size: 26px;
}

h3 {
    color: #333;
    font-size: 20px;
    margin-top: 30px;
}

/* 5. ENGINEERING ELEMENTS */
.formula-box, .w3-table, table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
}

/* Force MathJax containers to allow horizontal scrolling on mobile */
mjx-container[jax="CHTML"][display="true"] {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
}

.formula-box {
    background-color: #f9f9f9;
    border-left: 6px solid #ff6600;
    padding: 25px;
    margin: 30px 0;
    text-align: center;
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 1.3em;
    color: #000;
    border-radius: 4px;
}

.example-box {
    background-color: #eef3f7;
    border: 1px solid #d1d9e1;
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
}

.example-box h2 {
    margin-top: 0;
    border-bottom-color: #d1d9e1;
}

/* 6. ADVERTISING SLOTS */
.ad-label {
    font-size: 10px;
    color: #bbb;
    text-align: center;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.ad-slot-top {
    min-height: 95px;
    text-align: center;
    margin-bottom: 25px;
}

.ad-slot-sidebar {
    min-height: 600px;
    position: sticky;
    top: 20px;
}

.ad-slot-mid {
    min-height: 250px;
    margin: 45px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 25px 0;
}

/* 7. INSPIRATION BLOCK */
.inspiration-box {
    margin-top: 50px;
    padding: 30px;
    border-top: 1px dashed #ccc;
    text-align: center;
}

.quote-text {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 1.2em;
    color: #555;
    display: block;
    margin-bottom: 8px;
}

.quote-author {
    font-weight: 700;
    color: #000066;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 8. FOOTER */
footer {
    background-color: #000066;
    color: #ffffff;
    padding: 60px 0 30px 0;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.footer-section h4 {
    color: #ff6600;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-disclaimer {
    font-size: 11px;
    line-height: 1.4;
    color: #abb5c4;
    text-align: justify;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: #abb5c4;
}

/* ========================================================
   📱 MOBILE & TABLET MEDIA QUERIES (THE FIX)
   ======================================================== */

@media (max-width: 992px) {
    /* Stack the sidebar under the main content on tablets/phones */
    .main-wrapper {
        grid-template-columns: 1fr; 
    }
    .sidebar {
        display: block; 
        margin-top: 30px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    /* Stack the header layout and center it */
    .header-flex {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }
    
    .logo-container img {
        margin-right: 0;
        margin-bottom: 10px;
        height: 55px; /* Slightly smaller logo for mobile */
    }
    
    .brand-main {
        font-size: 22px; /* Scale down title */
    }
    
    /* Reduce margins and padding to give text more room to breathe */
    .main-wrapper {
        padding: 0 10px;
        margin: 15px auto;
    }
    
    .content-card {
        padding: 20px 15px; /* Reclaims horizontal space! */
    }
    
    .example-box {
        padding: 20px 15px;
    }

    h1 {
        font-size: 24px;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 20px;
    }
}