/* ====================================================
   1. CORE APP & SINGLE PORTAL STYLES (RESTORED STRUCTURE)
   ==================================================== */
.re-app-container { width: 100%; display: block; background: #ffffff; border-radius: 8px; border: 1px solid #e5e7eb; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow: hidden; }
.re-app-container * { box-sizing: border-box; }

.re-main-header { display: flex; align-items: center; gap: 15px; padding: 20px 30px; background: #ffffff; border-bottom: 1px solid #e5e7eb; }
.re-header-link { text-decoration:none; display:flex; align-items:center; gap:15px; width:100%; transition:0.3s; }
.re-logo { max-height: 48px; border-radius: 4px; }
.re-inst-title { margin: 0; font-size: 24px; font-weight: 700; color: #111827; letter-spacing: -0.5px;}

.re-news-ticker { display: flex; background: #f9fafb; border-bottom: 1px solid #e5e7eb; overflow: hidden; align-items: center; }
.re-ticker-lbl { background: #374151; color: #fff; padding: 8px 20px; font-weight: 600; font-size: 13px; z-index: 2; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.5px;}
.re-ticker-track { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.re-ticker-content { display: inline-block; animation: reMarquee 25s linear infinite; padding-left: 100%; }
.re-ticker-content:hover { animation-play-state: paused; }
.re-news-item { margin-right: 40px; font-size: 14px; font-weight: 500; color: #4b5563; }
@keyframes reMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* RESTORED: INTRO LEFT, TOC RIGHT */
.re-intro-toc-wrapper { display: flex; gap: 30px; padding: 30px 30px 0 30px; align-items: flex-start;}
.re-intro-content { flex: 3; min-width: 0; }
.re-toc-sidebar { flex: 1; min-width: 250px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px;}
.re-toc-fullwidth { flex: 100%; } 
.re-toc-vertical { display: flex; flex-direction: column; gap: 5px; }
.re-toc-v-btn { display: block; width: 100%; padding: 12px 15px; background: transparent; border: 1px solid transparent; color: #4b5563; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; transition: 0.2s; border-radius: 6px; }
.re-toc-v-btn:hover { background: #fff; border-color: #d1d5db; color: #111827; }
.re-toc-v-btn.active { background: #fff; color: var(--re-theme); border-color: var(--re-theme); font-weight: 600; box-shadow: 0 2px 4px rgba(0,0,0,0.02);}

.re-card-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 30px; font-size: 16px; color: #374151; line-height: 1.7;}

/* Typography Base */
.re-rich-text h1, .re-rich-text h2, .re-rich-text h3 { color: #111827; font-weight:700; margin-top:0; margin-bottom:15px; letter-spacing: -0.5px;}
.re-rich-text p { margin-bottom: 15px; color: #374151; }
.re-rich-text ul, .re-rich-text ol { padding-left: 20px; margin-bottom:15px; color: #374151;}

/* Segment Pane */
.re-segments-body { padding: 30px; }
.re-segment-pane { display: none; animation: reFadeIn 0.3s ease; }
.re-segment-pane.active { display: block; }
@keyframes reFadeIn { from{opacity:0;} to{opacity:1;} }

.re-seg-banner-box { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #f3f4f6; padding-bottom: 20px; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.re-seg-banner-left { display: flex; align-items: center; gap: 15px; }
.re-seg-banner-left h2 { margin: 0; font-size: 24px; font-weight: 700; color: #111827; letter-spacing: -0.5px; }
.re-seg-banner-middle { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.re-unit-pill { background: #f3f4f6; border: 1px solid #e5e7eb; padding: 4px 12px; border-radius: 4px; font-size: 13px; font-weight: 500; color: #374151; }

.re-status-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}
.badge-published { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-upcoming { background: #fefce8; color: #b45309; border: 1px solid #fde047; }
.badge-ongoing { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-expired { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* RESTORED: Countdowns and Info Cards */
.re-countdown-wrap { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px; display: flex; align-items: center; justify-content: center;}
.re-cd-boxes { display: flex; justify-content: space-between; gap: 10px; width: 100%; }
.re-cd-box { background: #fff; border-radius: 6px; flex: 1; padding: 10px 0; text-align: center; border: 1px solid #d1d5db; box-shadow: 0 2px 4px rgba(0,0,0,0.02);}
.re-cd-val { display: block; font-size: 20px; font-weight: 700; color: #111827; line-height:1; margin-bottom:4px;}
.re-cd-label { font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; }

.re-info-card { display: flex; align-items: center; gap: 15px; background: #fff; border: 1px solid #e5e7eb; padding: 20px; border-radius: 8px; }
.re-sc-icon { width: 40px; height: 40px; color: var(--re-theme); display: flex; justify-content: center; align-items: center; flex-shrink:0; background: #f9fafb; border-radius: 6px;}
.re-sc-icon svg { width: 24px !important; height: 24px !important; stroke-width: 1.5; }
.re-sc-data { display: flex; flex-direction: column; }
.re-sc-lbl { font-size: 12px; color: #6b7280; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.re-sc-val { font-size: 18px; color: #111827; font-weight: 700; margin-top:2px;}

.re-circular-chart { position: relative; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.re-circular-chart::before { content: ""; position: absolute; inset: 5px; background: #fff; border-radius: 50%; }
.re-chart-val { position: relative; z-index: 1; font-weight: 800; font-size: 13px; color: #0f172a; }

.re-layout-bottom { display: flex; flex-direction: column; gap: 30px; }

/* Feature Nav (Clean Tabs) */
.re-feature-nav { display: flex; gap: 20px; border-bottom: 1px solid #e5e7eb; margin-bottom: 30px; }
.re-feat-btn { background: none; border: none; padding: 0 0 12px 0; font-size: 15px; font-weight: 600; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; transition:0.2s;}
.re-feat-btn:hover { color: #111827; }
.re-feat-btn.active { color: var(--re-theme); border-bottom-color: var(--re-theme); }
.re-feat-pane { display: none; animation: reFadeIn 0.3s ease forwards; }
.re-feat-pane.active { display: block; }

/* Forms & Inputs */
.re-form-group { margin-bottom: 20px; }
.re-form-group label { display: block; font-weight: 600; margin-bottom: 8px; color:#374151; font-size: 14px;}
.re-form-group input, .re-form-group select { width: 100%; padding: 14px 16px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 15px; background:#fff; transition: 0.2s; color: #111827;}
.re-form-group input:focus, .re-form-group select:focus { border-color:var(--re-theme); outline:none; box-shadow: 0 0 0 3px var(--re-theme-light);}
.re-submit-btn { width: 100%; background: var(--re-theme); color: #fff; border: none; padding: 16px; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; transition:0.2s;}
.re-submit-btn:hover { filter: brightness(0.9); }

/* Steps */
.re-steps-grid { display: flex; flex-direction: column; gap: 15px; }
.re-step-card { background: #fff; border: 1px solid #e5e7eb; padding: 20px; border-radius: 8px; display: flex; gap: 20px; align-items: flex-start; }
.re-step-num { width: 32px; height: 32px; border: 1px solid #d1d5db; color: #374151; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size:14px; flex-shrink:0;}
.re-step-data strong { display: block; font-size: 16px; color: #111827; margin-bottom: 4px; margin-top:4px;}
.re-step-data p { margin: 0; color: #4b5563; font-size: 14px; line-height: 1.5; }

/* SMS Simulator (Pro Upgrade) */
.re-sms-simulator { background: #f9fafb; border: 1px solid #e5e7eb; padding: 30px; border-radius: 8px; }
.re-sms-input { width: 100%; padding: 14px 16px; border: 1px solid #d1d5db; border-radius: 6px; margin-bottom: 25px; font-size: 15px; }
.re-phone-screen { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
.re-phone-header { background: #f3f4f6; padding: 15px; text-align: center; font-weight: 600; font-size:14px; border-bottom: 1px solid #e5e7eb; color:#374151;}
.re-phone-body { padding: 25px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 15px; color:#111827;}

.re-sms-actions { display: flex; gap: 15px; margin-top: 20px; }
.re-action-btn { flex:1; display: inline-flex; align-items: center; justify-content:center; padding: 12px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration:none !important; cursor:pointer; border: 1px solid #d1d5db; background: #fff; color: #374151; transition: 0.2s;}
.re-action-btn:hover { background: #f9fafb; color: #111827; }
.re-btn-primary { background: var(--re-theme) !important; color: #fff !important; border-color: var(--re-theme) !important; }
.re-btn-primary:hover { filter: brightness(0.9); }

/* SLEEK NEXT PREV NAV (Text Links) */
.re-segment-mini-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 30px; border-top: 1px solid #e5e7eb; }
.re-nav-link { color: var(--re-theme); font-size: 15px; font-weight: 600; text-decoration: none !important; transition: 0.2s; padding: 8px 12px; border-radius:4px;}
.re-nav-link:hover { background: #f3f4f6; }

/* Bottom Instructions */
.re-bottom-instruction { background: #fefce8; border-left: 4px solid #fde047; padding: 20px 25px; margin-top: 30px; color: #854d0e; font-size: 15px; border-radius: 0 8px 8px 0; }

/* Global FAQ & Support */
.re-faq-support-wrapper { display: flex; gap: 40px; padding: 40px 30px; background: #f9fafb; border-top: 1px solid #e5e7eb; }
.re-faq-col { flex: 2; } .re-support-col { flex: 1; }
.re-fs-title { margin-top: 0; font-size: 18px; color: #111827; margin-bottom: 20px; font-weight: 700; letter-spacing: -0.5px;}

.re-faq-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; margin-bottom: 12px; transition:0.2s;}
.re-faq-q { padding: 15px 20px; font-weight: 600; color: #374151; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.re-faq-q:hover { color: var(--re-theme); }
.re-faq-q.active { color: var(--re-theme); border-bottom: 1px solid #f3f4f6; }
.re-faq-a { padding: 20px; color: #4b5563; display: none; font-size: 15px; line-height: 1.6; }

/* Share Buttons */
.re-share-box { margin-top: 25px; padding-top: 20px; border-top: 1px dashed #e2e8f0; }
.re-share-box h4 { font-size: 13px; color: #6b7280; text-transform: uppercase; margin: 0 0 15px 0; font-weight: 700; letter-spacing: 0.5px;}
.re-share-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.re-share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none !important; transition: 0.2s ease; border:none !important;}
.re-share-btn:hover { filter: brightness(1.1); transform: translateY(-2px);}
.re-share-btn.fb { background: #1877f2; }
.re-share-btn.wa { background: #25d366; }
.re-share-btn.tw { background: #1da1f2; }


/* ====================================================
   2. HOMEPAGE / NEWS PORTAL STYLES (CLEAN VIBE)
   ==================================================== */
.re-home-news-wrapper { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #fff;}

/* MODERN HERO WITH PRO SEARCH */
.re-news-header { background: #fff; padding: 80px 20px; text-align: center; border-bottom: 1px solid #e5e7eb; }
.re-nh-content h1 { font-size: 42px; font-weight: 800; color: #111827; margin: 0 0 15px 0; letter-spacing: -1px; }
.re-nh-content p { font-size: 18px; color: #4b5563; margin: 0 auto; max-width: 650px; line-height: 1.6; font-weight: 400;}

/* PROFESSIONAL SEARCH BAR */
.re-hero-search-box { position: relative; max-width: 650px; margin: 40px auto 0 auto; background: #fff; border-radius: 8px; display: flex; align-items: stretch; border: 1px solid #d1d5db; transition: 0.2s; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); height: 60px;}
.re-hero-search-box:focus-within { border-color: var(--home-theme); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.re-hero-search-box input { flex: 1; border: none; padding: 0 20px !important; font-size: 16px; outline: none; background: transparent; color: #111827; height: 100%; box-shadow:none !important; margin:0;}
.re-search-btn { background: var(--home-theme); color: #fff; border: none; padding: 0 25px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; height:100%; margin:0;}
.re-search-btn:hover { filter: brightness(0.9); }
.re-search-btn .dashicons { font-size: 24px; width: 24px; height: 24px; }

.re-news-container { display: flex; gap: 40px; padding: 40px 0; max-width: 1200px; margin: 0 auto; align-items: flex-start; }
.re-news-main { flex: 1; min-width: 0; }
.re-news-sidebar { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 30px; }

/* Filters */
.re-news-filters { display: flex; gap: 10px; margin-bottom: 30px; overflow-x:auto; white-space:nowrap; padding-bottom:5px;}
.re-hf-btn { background: #fff; border: 1px solid #d1d5db; padding: 8px 16px; font-size: 14px; font-weight: 600; color: #374151; cursor: pointer; border-radius: 30px; transition: 0.2s; }
.re-hf-btn:hover { border-color: #9ca3af; color: #111827;}
.re-hf-btn.active { background: var(--home-theme); color: #fff; border-color: var(--home-theme); }

/* PAPERCLIP STICKY ICON */
.re-pinned-badge { position: absolute; top: -10px; left: 20px; background: #fff; color: #111827; padding: 4px 10px; border: 1px solid #e5e7eb; border-radius: 4px; font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); z-index: 2;}
.re-pinned-badge .dashicons { font-size: 14px; width: 14px; height: 14px; color: var(--home-theme); transform: rotate(45deg);}

/* TINY SEGMENT TAGS */
.re-hc-seg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.re-seg-status-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight:500; display:inline-flex; align-items:center; background: #f3f4f6; color: #4b5563;}
.re-seg-status-tag strong { margin-left:4px; font-weight:700; color: #111827;}

/* VARIATION 1: MAGAZINE / CARDS */
.re-layout-magazine .re-news-feed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.re-news-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 25px; display: flex; flex-direction: column; transition: box-shadow 0.2s ease, transform 0.2s ease; position:relative;}
.re-news-card:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); transform: translateY(-2px);}
.re-nc-logo { width: 40px; height: 40px; margin-bottom:15px; border-radius:4px; overflow:hidden;}
.re-nc-logo img { max-width: 100%; max-height: 100%; }
.re-nc-title { font-size: 18px; font-weight: 700; color: #111827; margin: 0; line-height: 1.4; text-decoration: none;}
.re-news-card a { text-decoration: none; }
.re-news-card a:hover .re-nc-title { color: var(--home-theme); text-decoration:underline;}

.re-news-card.is-featured { grid-column: 1 / -1; border: 1px solid #cbd5e1; background: #f8fafc;}
.re-news-card.is-featured .re-nc-title { font-size: 22px; }

/* VARIATION 2: BULLETIN / NOTICE BOARD */
.re-layout-bulletin .re-news-feed { display: flex; flex-direction: column; gap: 15px; }
.re-bulletin-item { display: flex; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; transition: 0.2s; align-items: center; padding-right: 25px; position:relative;}
.re-bulletin-item:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border-color:#d1d5db;}
.re-bulletin-item.is-featured { border-left: 3px solid var(--home-theme); }

.re-bi-date { padding: 20px 25px; text-align: center; border-right: 1px solid #e5e7eb; display: flex; flex-direction: column; justify-content: center; align-self: stretch; background:#f9fafb;}
.re-bi-d { font-size: 24px; font-weight: 800; color: #111827; line-height: 1;}
.re-bi-m { font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; margin-top: 4px;}
.re-bi-content { flex: 1; padding: 20px 25px; }
.re-bi-title { font-size: 18px; font-weight: 700; color: #111827; text-decoration: none; display: block;}
.re-bi-title:hover { color: var(--home-theme); text-decoration:underline;}
.re-bi-btn { padding: 8px 16px; border: 1px solid #d1d5db; border-radius: 4px; color: #374151; font-weight: 600; text-decoration: none; font-size: 14px; transition:0.2s;}
.re-bi-btn:hover { background: #f3f4f6; color: #111827; }

/* SIDEBAR STYLES */
.re-ns-widget { margin-bottom: 30px; }
.re-ns-title { font-size: 14px; font-weight: 700; color: #6b7280; margin: 0 0 15px 0; text-transform: uppercase; letter-spacing: 0.5px; }

/* ====================================================
   3. MOBILE RESPONSIVENESS
   ==================================================== */
@media (max-width: 850px) {
    /* RESTORED: Single Portal Mobile Fixes */
    .re-intro-toc-wrapper { flex-direction: column-reverse; padding: 20px; gap: 20px;}
    .re-toc-sidebar { width: 100%; overflow: hidden; padding: 15px;}
    .re-toc-vertical { flex-direction: row; overflow-x: auto; padding-bottom: 5px; }
    .re-toc-v-btn { width: auto; white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; border-radius: 4px 4px 0 0;}
    .re-toc-v-btn.active { border-bottom-color: var(--re-theme); border-left-color:transparent; box-shadow:none;}
    
    .re-segment-mini-nav { flex-direction: column; gap:15px; }
    
    .re-faq-support-wrapper { flex-direction: column; padding: 30px 20px; }
    .re-flex-grid { display: flex !important; flex-direction: column !important; gap: 20px !important; }
    .re-seo-desc-box { order: 2 !important; }
    
    .re-segments-body { padding: 20px; }

    /* Homepage Mobile Adjustments */
    .re-news-header { padding: 40px 20px; }
    .re-nh-content h1 { font-size: 28px; }
    .re-hero-search-box { margin-top: 25px; height: 50px; }
    .re-hero-search-box input { padding: 0 15px !important; font-size:15px;}
    .re-search-btn { padding: 0 15px; }
    
    .re-news-container { flex-direction: column; padding: 20px; }
    .re-news-sidebar { width: 100%; }
    .re-layout-magazine .re-news-feed { grid-template-columns: 1fr; }
    
    .re-bulletin-item { flex-direction: column; align-items: flex-start; padding: 0 0 20px 0; }
    .re-bi-date { width: 100%; border-right: none; border-bottom: 1px solid #e5e7eb; padding: 15px 20px; flex-direction: row; gap: 10px; align-items: baseline; justify-content:flex-start;}
    .re-bi-content { padding: 20px; width:100%; box-sizing:border-box;}
    .re-bi-action { padding: 0 20px; width:100%; box-sizing:border-box;}
    .re-bi-btn { display:block; text-align:center;}
}