/* ============================================
   AIOU SERVICES — Fully Responsive CSS
   Desktop layout on PC, scaled on mobile
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #e8702a;
  --dark:   #1a1a1a;
  --blue:   #1155cc;
  --green:  #25d366;
  --white:  #ffffff;
  --text:   #222222;
  --light:  #f8f8f8;
  --bg:     #f0f0f0;
}

html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; color: #c00; }
img { max-width: 100%; display: block; }

/* ============ WRAPPER ============ */
#outer-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 16px rgba(0,0,0,0.18);
}

/* ============ HEADER ============ */
#header-wrapper {
  width: 100%;
  border-bottom: 4px solid var(--orange);
  line-height: 0;
  overflow: hidden;
}
#header-wrapper a { display: block; width: 100%; }
#header-wrapper img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center top;
}

/* ============ HAMBURGER — hidden on desktop ============ */
#menu-toggle {
  display: none;
  width: 100%;
  background: var(--dark);
  color: #ccc;
  border: none;
  border-bottom: 2px solid var(--orange);
  padding: 13px 16px;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
}
#menu-toggle span { float: right; font-size: 20px; }

/* ============ NAV ============ */
.tabs-outer {
  background: var(--dark);
  border-bottom: 4px solid var(--orange);
}
.tabs-inner {
  display: flex;
  flex-wrap: nowrap;
}
.tabs-inner a {
  flex: 1;
  color: #ccc;
  padding: 11px 6px;
  display: block;
  font-size: 12.5px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  border-right: 1px solid #333;
  transition: background 0.2s;
  white-space: nowrap;
}
.tabs-inner a:last-child { border-right: none; }
.tabs-inner a:hover, .tabs-inner a.active {
  background: var(--orange); color: #fff; text-decoration: none;
}

/* ============ LAYOUT — SIDE BY SIDE ============ */
#content-wrapper { display: flex; align-items: flex-start; }

#main-content {
  flex: 1;
  padding: 18px 20px;
  border-right: 2px solid #e0e0e0;
  min-width: 0;
}

/* ============ SIDEBAR ============ */
#sidebar-wrapper {
  width: 230px;
  flex-shrink: 0;
  padding: 14px 10px;
  background: var(--light);
  border-left: 1px solid #ddd;
}
.sidebar-section { margin-bottom: 16px; }
.sidebar-section h2 {
  font-size: 11.5px; font-weight: bold;
  background: var(--orange); color: #fff;
  padding: 7px 10px; margin-bottom: 8px;
  border-radius: 2px; text-transform: uppercase; letter-spacing: 0.5px;
}
.sidebar-section img {
  width: 100%; margin-bottom: 7px;
  border: 1px solid #ddd; border-radius: 2px; object-fit: cover;
}
.sidebar-section .pageviews {
  text-align: center; font-size: 24px;
  font-weight: bold; color: var(--orange); padding: 6px 0;
}
.follow-btn {
  display: block; background: var(--green); color: #fff;
  text-align: center; padding: 10px; border-radius: 4px;
  font-weight: bold; font-size: 13px; text-decoration: none;
}
.follow-btn:hover { background: #128c7e; text-decoration: none; }

/* ============ CONTENT ============ */
.banner-img {
  width: 100%; max-height: 200px; object-fit: cover;
  display: block; margin-bottom: 16px;
  border: 1px solid #ddd; border-radius: 3px; cursor: pointer;
}
.post-outer { border-bottom: 1px dashed #ccc; padding-bottom: 22px; margin-bottom: 22px; }
.post-title { font-size: 20px; font-weight: bold; color: var(--blue); margin-bottom: 4px; }
.post-date { font-size: 11px; color: #999; margin-bottom: 14px; }
.post-body { line-height: 1.75; font-size: 14px; }
.post-body p { margin-bottom: 10px; }
.post-body h3 { font-size: 15px; font-weight: bold; margin: 16px 0 8px; border-left: 4px solid var(--orange); padding-left: 9px; }
.post-body ul { margin: 6px 0 10px 24px; }
.post-body ul li { margin-bottom: 5px; }
.sep { border: none; border-top: 1px solid #e0e0e0; margin: 14px 0; }

/* ============ TABLES ============ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
table { border-collapse: collapse !important; width: 100% !important; margin: 12px 0 16px !important; font-size: 13px !important; border: 2px solid #888 !important; }
table th { background: #2c2c2c !important; color: #fff !important; font-weight: bold !important; padding: 9px 11px !important; text-align: left !important; border: 1px solid #555 !important; font-size: 12.5px !important; white-space: nowrap; }
table td { padding: 8px 11px !important; border: 1px solid #c0c0c0 !important; background: #fff !important; vertical-align: middle !important; font-size: 13px !important; }
table tr:nth-child(even) td { background: #f3f7ff !important; }
table tr:hover td { background: #fff8e8 !important; }

.important-links-table { border: 2px solid #1a73e8 !important; }
.important-links-table th { background: #1a73e8 !important; border-color: #1255b0 !important; }
.important-links-table td { background: #eaf3ff !important; border: 1px solid #aac8f0 !important; }
.important-links-table tr:nth-child(even) td { background: #d8eaff !important; }
.important-links-table td a { color: var(--blue) !important; }

.notice-table { border: 2px solid #e6a800 !important; }
.notice-table td { background: #fffbe6 !important; border: 1px solid #f5c842 !important; text-align: center !important; font-weight: bold !important; color: #7a5500 !important; padding: 10px !important; }

.thanks-table { border: 2px solid #28a745 !important; }
.thanks-table td { background: #eafbf0 !important; border: 1px solid #82d99a !important; text-align: center !important; font-weight: bold !important; color: #1a6e30 !important; padding: 10px !important; }

.date-table th { background: #333 !important; text-align: center !important; }
.date-table td:first-child { font-weight: bold; background: #f4f4f4 !important; }
.date-table td:last-child { color: #c00; font-weight: bold; }

.pdf-btn { display: inline-block; color: #c62828 !important; font-weight: bold !important; text-decoration: none !important; padding: 3px 9px; background: #fff0f0; border: 1px solid #e57373; border-radius: 3px; font-size: 12px; }
.pdf-btn:hover { background: #c62828 !important; color: #fff !important; }

.ad-banner { width: 100%; max-height: 150px; object-fit: cover; display: block; margin: 12px 0; border: 1px solid #ddd; border-radius: 3px; cursor: pointer; }

.whatsapp-btn { display: inline-block; background: var(--green); color: #fff !important; padding: 10px 20px; border-radius: 5px; font-weight: bold; font-size: 14px; text-decoration: none !important; margin: 8px 0; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.whatsapp-btn:hover { background: #128c7e !important; }

.page-header { font-size: 20px; font-weight: bold; color: #222; padding: 6px 0 10px; border-bottom: 3px solid var(--orange); margin-bottom: 18px; }

.post-footer { font-size: 12px; color: #888; border-top: 1px solid #eee; padding-top: 9px; margin-top: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.share-links a { font-size: 12px; margin-right: 5px; color: #1a73e8; background: #f1f1f1; padding: 3px 8px; border-radius: 3px; border: 1px solid #ddd; }
.post-labels a { font-size: 12px; background: #f1f1f1; border: 1px solid #ddd; padding: 3px 8px; border-radius: 3px; margin-right: 4px; color: #555; }

.comments-section { border-top: 2px solid var(--orange); margin-top: 18px; padding-top: 14px; }
.comments-section h4 { font-size: 15px; margin-bottom: 12px; color: #333; }
.comment-item { display: flex; gap: 10px; border-bottom: 1px solid #eee; padding: 10px 0; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: #ddd; flex-shrink: 0; border: 1px solid #ccc; }
.comment-body .author { font-weight: bold; color: #333; font-size: 13px; }
.comment-body .date { color: #999; font-size: 11px; margin-left: 6px; }
.comment-body p { margin-top: 3px; color: #444; font-size: 13px; }
.show-more { display: block; text-align: center; margin: 10px 0; font-size: 13px; color: var(--blue); cursor: pointer; padding: 8px; border: 1px solid #ddd; border-radius: 3px; background: #f9f9f9; }

.blog-pager { display: flex; justify-content: space-between; margin: 16px 0; font-size: 13px; }
.blog-pager a { color: var(--blue); padding: 6px 14px; border: 1px solid #ddd; border-radius: 3px; background: #f9f9f9; }
.blog-pager a:hover { background: var(--orange); color: #fff; text-decoration: none; }
.subscribe-bar { font-size: 12px; color: #888; margin: 10px 0; }
.subscribe-bar a { color: #1a73e8; }

.guess-card { border: 1px solid #ccc; border-left: 4px solid var(--orange); border-radius: 3px; padding: 14px 16px; margin-bottom: 14px; background: #fafafa; }
.guess-card h4 { font-size: 15px; color: var(--blue); margin-bottom: 6px; }
.guess-card p { font-size: 13px; color: #555; margin-bottom: 8px; }

#footer-wrapper { background: var(--dark); color: #aaa; text-align: center; font-size: 12px; padding: 14px; border-top: 4px solid var(--orange); }
#footer-wrapper a { color: var(--orange); }

#scroll-top { position: fixed; bottom: 24px; right: 24px; background: var(--orange); color: #fff; border: none; border-radius: 50%; width: 42px; height: 42px; font-size: 22px; cursor: pointer; display: none; z-index: 999; line-height: 42px; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,0.3); }

/* ============================================
   TABLET (768px - 1099px)
   ============================================ */
@media (max-width: 1099px) {
  #outer-wrapper { max-width: 100%; }
  .tabs-inner a { font-size: 11px; padding: 10px 4px; }
}

/* ============================================
   MOBILE (max 767px) — SAME LOOK, SCALES DOWN
   ============================================ */
@media (max-width: 767px) {

  body { font-size: 13px; }
  #outer-wrapper { box-shadow: none; }

  /* Header scales down */
  #header-wrapper img { height: 140px; }

  /* Show hamburger, hide nav by default */
  #menu-toggle { display: block; }
  .tabs-outer { border-bottom: none; }
  .tabs-inner { flex-direction: column; display: none; }
  .tabs-inner.open { display: flex; }
  .tabs-inner a {
    flex: none; width: 100%; text-align: left;
    border-right: none; border-bottom: 1px solid #333;
    padding: 12px 16px; font-size: 14px; white-space: normal;
  }

  /* MAIN + SIDEBAR SIDE BY SIDE ON MOBILE TOO */
  #content-wrapper {
    display: flex;
    flex-direction: row;   /* ← keeps sidebar on right */
    align-items: flex-start;
  }

  #main-content {
    flex: 1;
    padding: 12px 10px;
    border-right: 1px solid #e0e0e0;
    min-width: 0;
    font-size: 12px;
  }

  /* Sidebar — narrow on mobile but still visible */
  #sidebar-wrapper {
    width: 110px;
    flex-shrink: 0;
    padding: 8px 6px;
    border-left: 1px solid #ddd;
  }
  .sidebar-section h2 { font-size: 9px; padding: 5px 6px; letter-spacing: 0; }
  .sidebar-section img { margin-bottom: 5px; }
  .sidebar-section .pageviews { font-size: 14px; }
  .follow-btn { font-size: 10px; padding: 7px 4px; }

  /* Fonts scale down */
  .post-title { font-size: 15px; }
  .post-body { font-size: 12px; }
  .banner-img { max-height: 130px; }
  .ad-banner { max-height: 90px; }
  .page-header { font-size: 16px; }
  .whatsapp-btn { font-size: 12px; padding: 8px 14px; display: block; text-align: center; }

  /* Tables scroll sideways */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { font-size: 11px !important; min-width: 360px; }
  table th { padding: 6px 7px !important; font-size: 11px !important; }
  table td { padding: 6px 7px !important; font-size: 11px !important; }
  .pdf-btn { padding: 2px 5px; font-size: 10px; }

  .post-footer { flex-direction: column; }
  .blog-pager a { padding: 5px 8px; font-size: 11px; }
  #scroll-top { bottom: 14px; right: 14px; width: 36px; height: 36px; font-size: 19px; line-height: 36px; }
}

@media (max-width: 400px) {
  #sidebar-wrapper { width: 90px; }
  .sidebar-section h2 { font-size: 8px; }
  .sidebar-section .pageviews { font-size: 12px; }
}

/* ============================================
   MOBILE FIX — Hide sidebar, full width main
   ============================================ */
@media (max-width: 767px) {

  /* Stack vertically — no side scroll */
  #content-wrapper {
    flex-direction: column !important;
  }

  /* Main takes full width */
  #main-content {
    width: 100% !important;
    border-right: none !important;
    padding: 12px 12px !important;
  }

  /* Sidebar goes BELOW main content, full width */
  #sidebar-wrapper {
    width: 100% !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px !important;
    border-left: none !important;
    border-top: 2px solid #ddd;
  }
  .sidebar-section {
    margin-bottom: 0;
  }
  .sidebar-section h2 {
    font-size: 11px !important;
    padding: 6px 8px !important;
  }
  .sidebar-section img {
    max-height: 110px;
    object-fit: cover;
  }
  .sidebar-section .pageviews {
    font-size: 20px !important;
  }
  .follow-btn {
    font-size: 12px !important;
    padding: 9px !important;
  }

  /* No horizontal scroll on tables */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px;
    padding: 0 12px;
    width: calc(100% + 24px);
  }
}

@media (max-width: 480px) {
  #sidebar-wrapper {
    grid-template-columns: 1fr;
  }
}
