/* =====================================================
   PUBLIC BLOG - SHARED STYLESHEET
   Home Tuition Academy | Responsive: mobile, tablet, desktop
   ===================================================== */

:root {
    --dark: #1e1e2f;
    --dark-deep: #141423;
    --accent: #FF6B6B;
    --accent-hover: #ee5252;
    --muted: #b3b3cc;
    --bg: #f4f6f9;
    --border: #e8e8e8;
    --radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg);
    color: #333;
    line-height: 1.6;
}

a { text-decoration: none; }
img { max-width: 100%; display: block; }

/* #desktopBlocker markup still exists in some page includes for
   backward compatibility, but it is never shown anymore — the site
   now renders a real layout at every screen size instead of asking
   desktop/tablet visitors to switch to a phone. */
#desktopBlocker { display: none !important; }

/* =====================================================
   NAVIGATION
   ===================================================== */
nav.blog-nav {
    background-color: var(--dark);
    padding: 16px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}

nav.blog-nav .logo {
    font-size: 19px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 0.5px;
}
nav.blog-nav .logo span { color: var(--accent); }

nav.blog-nav .nav-icon-link {
    color: var(--muted);
    font-size: 18px;
}

/* =====================================================
   HERO
   ===================================================== */
.blog-hero {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
}
.blog-hero h1 { font-size: 24px; color: var(--dark); margin-bottom: 8px; }
.blog-hero p { color: #666; font-size: 14px; }

/* =====================================================
   CATEGORY FILTER CHIPS
   ===================================================== */
.category-scroller {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 16px 20px 16px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.category-scroller::-webkit-scrollbar { display: none; }

.category-chip {
    flex: 0 0 auto;
    background: #fff;
    color: var(--dark);
    border: 1px solid var(--border);
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: 0.2s;
}
.category-chip.active,
.category-chip:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* =====================================================
   BLOG GRID / CARDS
   ===================================================== */
.blog-container { max-width: 600px; margin: 0 auto; padding: 0 16px 50px 16px; }

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.blog-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.blog-card:active { transform: scale(0.98); }

.card-image-box {
    height: 190px;
    width: 100%;
    position: relative;
    border-bottom: 1px solid #eee;
    background-color: #eef0f4;
    overflow: hidden;
}
.card-image-box img { width: 100%; height: 100%; object-fit: cover; }

.image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8888a3;
    font-size: 13px;
    gap: 8px;
}

.category-badge {
    position: absolute;
    top: 13px;
    left: 13px;
    background-color: rgba(30, 30, 47, 0.85);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    z-index: 2;
}

.card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-body h2 { font-size: 18px; color: var(--dark); margin-bottom: 10px; line-height: 1.4; }
.card-body p { color: #666; font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; flex-grow: 1; }

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: #777;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}
.card-meta i { margin-right: 4px; color: #888; }

.read-more-btn {
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
}

.empty-box, .empty-state {
    background: #fff;
    padding: 40px 20px;
    border-radius: var(--radius);
    text-align: center;
    color: #777;
    font-size: 15px;
}
.empty-state i { font-size: 40px; color: #ccc; margin-bottom: 14px; display: block; }

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 16px;
    text-decoration: none;
    background: var(--dark);
    color: #fff;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
}

.back-feed-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
}

/* =====================================================
   SINGLE ARTICLE PAGE
   ===================================================== */
.article-wrapper { max-width: 600px; margin: 20px auto; padding: 0 16px 60px 16px; }

.main-article-box {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    margin-bottom: 25px;
}

h1.article-title { font-size: 24px; color: var(--dark); margin-bottom: 14px; line-height: 1.35; font-weight: 700; }

.article-meta-strip {
    font-size: 12.5px;
    color: #777;
    margin-bottom: 22px;
    display: flex;
    gap: 16px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
    flex-wrap: wrap;
}
.article-meta-strip span { display: flex; align-items: center; gap: 5px; }
.article-meta-strip i { color: var(--accent); font-size: 13px; }

.article-subheading {
    font-size: 16px;
    color: #4a5568;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
}

.article-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 12px;
    margin: 0 auto 24px auto;
    border: 1px solid #eee;
    background: #eef0f4;
}
.article-image-container img { width: 100%; height: 100%; object-fit: cover; }

.article-content-text { font-size: 15px; color: #445; letter-spacing: 0.1px; line-height: 1.8; }
.article-content-text img { border-radius: 8px; margin: 10px 0; }

/* =====================================================
   SECTION PANELS (Reviews / Comments)
   ===================================================== */
.section-panel {
    background: white;
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    margin-bottom: 25px;
}
.section-panel h3 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-panel h3 i { color: var(--accent); }

.input-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }

.form-control {
    width: 100%;
    padding: 13px;
    border: 1px solid #dcdce6;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background-color: #fafbfe;
    transition: all 0.2s;
    color: #333;
}
.form-control:focus {
    border-color: var(--accent);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}
textarea.form-control { resize: vertical; min-height: 100px; }

.rating-box-wrapper {
    background: #fafbfe;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #dcdce6;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rating-box-wrapper span { font-size: 13.5px; font-weight: 600; color: #556; }
.star-rating-selector { display: flex; flex-direction: row-reverse; gap: 8px; justify-content: flex-end; }
.star-rating-selector input { display: none; }
.star-rating-selector label { font-size: 26px; color: #d0d0e1; cursor: pointer; transition: color 0.1s; }
.star-rating-selector input:checked ~ label,
.star-rating-selector label:hover,
.star-rating-selector label:hover ~ label { color: #FFD700; }

.submit-action-btn {
    background-color: var(--dark);
    color: white;
    border: none;
    padding: 13px 24px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}
.submit-action-btn:hover { background-color: var(--accent); }
.submit-action-btn.comment-btn { background-color: #007BFF; }
.submit-action-btn.comment-btn:hover { background-color: #0062cc; }

/* Existing reviews / comments list */
.feedback-list { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.feedback-item {
    background: #fafbfe;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}
.feedback-item .fb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.feedback-item .fb-name { font-weight: 600; color: var(--dark); font-size: 13.5px; }
.feedback-item .fb-date { font-size: 11.5px; color: #999; }
.feedback-item .fb-stars { color: #FFD700; font-size: 13px; margin-bottom: 6px; }
.feedback-item .fb-text { font-size: 13.5px; color: #555; line-height: 1.6; }

/* =====================================================
   FOOTER
   ===================================================== */
footer.blog-footer {
    background-color: var(--dark-deep);
    color: var(--muted);
    text-align: center;
    padding: 26px 20px;
    font-size: 12.5px;
    margin-top: 20px;
}
footer.blog-footer span { color: var(--accent); }

/* =====================================================
   FLOATING CONTACT BUTTONS
   ===================================================== */
.floating-btns {
    position: fixed;
    right: 16px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 60;
}
.floating-btns a {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.whatsapp-btn { background: #25D366; }
.call-btn { background: #007bff; }

/* Small phones */
@media (max-width: 360px) {
    .blog-hero h1 { font-size: 21px; }
    h1.article-title { font-size: 21px; }
}

/* =====================================================================
   TABLET  (768px – 1199px)
   Everything below 768px (phones) is completely untouched.
   ===================================================================== */
@media (min-width: 768px) {

    nav.blog-nav { padding: 18px 6%; }
    nav.blog-nav .logo { font-size: 21px; }

    .blog-hero { padding: 56px 20px 48px; margin-bottom: 32px; }
    .blog-hero h1 { font-size: 30px; }
    .blog-hero p { font-size: 15px; }

    .category-scroller {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
        padding: 0 24px 28px;
    }

    .blog-container { max-width: 760px; padding: 0 24px 60px; }

    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }

    .blog-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
    .blog-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 32px rgba(30,30,47,0.12);
    }
    .card-image-box { height: 180px; }

    .article-wrapper { max-width: 720px; margin: 32px auto; padding: 0 24px 70px; }
    .main-article-box, .section-panel { padding: 34px; }
    h1.article-title { font-size: 30px; }
    .article-image-container { height: 320px; }
    .article-content-text { font-size: 16px; }

    .input-row { grid-template-columns: repeat(2, 1fr); }
    .submit-action-btn { width: auto; padding: 13px 34px; }

    footer.blog-footer { padding: 32px 20px; font-size: 13px; }
}

/* =====================================================================
   DESKTOP  (1200px and up)
   Wider canvas, multi-column grid, roomier typography — a proper
   desktop experience instead of a stretched phone layout.
   ===================================================================== */
@media (min-width: 1200px) {

    nav.blog-nav {
        padding: 20px max(6%, calc((100% - 1180px) / 2));
    }
    nav.blog-nav .logo { font-size: 23px; }
    nav.blog-nav .nav-icon-link { font-size: 20px; transition: color 0.2s; }
    nav.blog-nav .nav-icon-link:hover { color: var(--accent); }

    .blog-hero { padding: 72px 20px 60px; margin-bottom: 40px; }
    .blog-hero h1 { font-size: 38px; }
    .blog-hero p { font-size: 16px; }

    .category-scroller { max-width: 1180px; margin: 0 auto; gap: 12px; }
    .category-chip { padding: 10px 22px; font-size: 13.5px; }
    .category-chip:hover { cursor: pointer; }

    .blog-container { max-width: 1180px; padding: 0 20px 80px; }
    .blog-grid { grid-template-columns: repeat(3, 1fr); gap: 30px; }

    .card-image-box { height: 200px; }
    .card-body h2 { font-size: 19px; }
    .read-more-btn { transition: gap 0.2s; }
    .read-more-btn:hover { gap: 10px; }

    /* Article page: centered readable column, not full-bleed 1180px text */
    .article-wrapper {
        max-width: 820px;
        margin: 40px auto;
        padding: 0 20px 90px;
    }
    .main-article-box, .section-panel { padding: 44px 48px; }
    h1.article-title { font-size: 36px; line-height: 1.3; }
    .article-subheading { font-size: 18px; }
    .article-image-container { height: 400px; border-radius: 16px; }
    .article-content-text { font-size: 16.5px; line-height: 1.85; }

    .back-btn:hover, .submit-action-btn:hover { cursor: pointer; }

    .section-panel h3 { font-size: 20px; }
    .feedback-list { gap: 16px; }

    footer.blog-footer {
        padding: 38px 20px;
        font-size: 13px;
    }

    .floating-btns { right: 32px; bottom: 32px; }
}
