/*
 Theme Name:   GeneratePress Exam Ready
 Theme URI:    https://generatepress.com
 Description:  Child theme to unify the custom header and footer across all posts.
 Author:       Exam Ready MCQ
 Template:     generatepress
 Version:      1.0.0
*/

:root {
    --brand: #0d9488;
    --brand-dark: #115e59;
    --accent: #2dd4bf;
    --dark: #0f172a; 
    --text: #334155; 
    --bg: #f8fafc; 
    --border: #e2e8f0;
}

/* ================= HEADER STYLES ================= */
.er-site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.er-header-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; height: 70px; display: flex; justify-content: space-between; align-items: center; }
.er-logo { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 800; color: var(--dark); transition: transform 0.2s; text-decoration: none; }
.er-logo:hover { transform: scale(1.02); }
.er-logo-icon { color: #eab308; }

.er-nav-links { display: flex; gap: 20px; }
.er-nav-links a { font-weight: 600; color: #64748b; font-size: 0.95rem; background: rgba(0,0,0,0.03); padding: 8px 16px; border-radius: 12px; transition: 0.2s; text-decoration: none; }
.er-nav-links a:hover { background: var(--brand); color: white; }
.er-hamburger { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--dark); }

/* ================= FOOTER STYLES ================= */
.er-site-footer { background: #0f172a; color: #cbd5e1; padding: 60px 0 20px; margin-top: 60px; border-top: 4px solid var(--brand); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.er-footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; }
.er-footer-brand h3 { color: white; font-size: 1.5rem; margin: 0 0 15px; font-weight: 800; }
.er-footer-brand p { font-size: 1rem; line-height: 1.6; margin: 0 0 15px; }
.er-social-icons { display: flex; gap: 10px; margin-top: 10px; }
.er-social-icons a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: #1e293b; border-radius: 50%; color: white; font-size: 0.8rem; font-weight: bold; transition: 0.2s; text-decoration: none; }
.er-social-icons a.telegram:hover { background: #24A1DE; }
.er-social-icons a.youtube:hover { background: #FF0000; }
.er-footer-links-col h4 { color: white; margin-bottom: 15px; font-size: 1.2rem; }
.er-footer-links-col a { display: block; color: #94a3b8; margin-bottom: 10px; transition: 0.2s; text-decoration: none; }
.er-footer-links-col a:hover { color: white; }
.er-footer-bottom { text-align: center; border-top: 1px solid #1e293b; padding-top: 20px; font-size: 0.9rem; }

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {
    .er-nav-links { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: white; flex-direction: column; padding: 20px; gap: 10px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .er-nav-links.active { display: flex; }
    .er-hamburger { display: block; }
    .er-footer-grid { grid-template-columns: 1fr; text-align: center; }
    .er-social-icons { justify-content: center; }
}
/* Hide Featured Image on Single Posts */
body.single .featured-image, 
body.single .page-header-image-single { 
    display: none !important; 
}
/* ================= AWESOME POST HEADINGS & TYPOGRAPHY ================= */

/* 1. Main Post Title (H1) */
body.single h1.entry-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--dark, #0f172a);
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

/* 2. Post Meta (Author, Date below H1) */
body.single .entry-meta {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

/* 3. Section Headings (H2) */
body.single .entry-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark, #0f172a);
    margin-top: 50px;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border, #e2e8f0);
    position: relative;
}

/* The cool brand-colored accent line under H2 */
body.single .entry-content h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px; /* overlaps the gray border */
    width: 70px;
    height: 3px;
    background-color: var(--brand, #0d9488);
    border-radius: 2px;
}

/* 4. Sub-section Headings (H3) */
body.single .entry-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand-dark, #115e59);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 4px solid var(--brand, #0d9488);
}

/* 5. Improve standard text readability */
body.single .entry-content p, 
body.single .entry-content li {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text, #334155);
    margin-bottom: 20px;
}
/* ================= AWESOME CENTERED POST HEADINGS ================= */

/* 1. Main Post Title (H1) */
body.single h1.entry-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--dark, #0f172a);
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    text-align: center; /* Centers the main title */
}

/* 2. Post Meta (Author, Date below H1) */
body.single .entry-meta {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    text-align: center; /* Centers the date/author to match */
}

/* 3. Section Headings (H2) */
body.single .entry-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark, #0f172a);
    margin-top: 50px;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border, #e2e8f0);
    position: relative;
    text-align: center; /* Centers the H2 text */
}

/* The centered brand-colored accent line under H2 */
body.single .entry-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px; /* overlaps the gray border */
    left: 50%; /* Moves the start of the line to the middle */
    transform: translateX(-50%); /* Pulls it back exactly half its width to center it */
    width: 70px;
    height: 3px;
    background-color: var(--brand, #0d9488);
    border-radius: 2px;
}

/* 4. Sub-section Headings (H3) */
body.single .entry-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand-dark, #115e59);
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center; /* Centers H3 to match the flow */
}

/* 5. Improve standard text readability (Left-aligned is best for reading paragraphs) */
body.single .entry-content p, 
body.single .entry-content li {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text, #334155);
    margin-bottom: 20px;
}

/* ================= SINGLE POST GLOBAL LAYOUT ================= */

/* 1. Force the entire post container to match the plugin's 800px width */
body.single .site-main,
body.single .inside-article {
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* 2. Center the Main Post Title (H1) */
body.single h1.entry-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 15px;
    margin-top: 30px; /* Gives some breathing room from the top menu */
    letter-spacing: -0.02em;
    text-align: center; 
}

/* 3. Center the Author & Date */
body.single .entry-meta {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center; 
}

/* 4. Style standard WordPress Images to match the premium UI */
body.single .entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 12px; /* Adds a modern soft corner to your images */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); /* Adds a very light shadow matching your boxes */
}

/* 5. Mobile Adjustments for H1 */
@media (max-width: 768px) {
    body.single h1.entry-title {
        font-size: 2.2rem;
        margin-top: 20px;
    }
}

/* ================= BACK TO TOP BUTTON ================= */
.er-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 48px;
    height: 48px;
    background-color: #4f46e5; /* Indigo brand */
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.er-back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.er-back-to-top:hover {
    background-color: #312e81; /* Indigo dark */
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.45);
}

@media (max-width: 768px) {
    .er-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}