:root{
  --bg: #f7f8f9;
  --card: #ffffff;
  --muted: #6b7280;
  --accent-1: #2fa6a8; /* accent */
  --accent-2: #1f6f6f; /* darker accent */
  --text: #0b0b0b;
  --max-width: 1100px;
  --radius: 12px;
  --glass: rgba(255,255,255,0.6);
  --transition: 220ms ease;
  --container-pad: 28px;
}

*{box-sizing:border-box}
html,body{height:100%}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(0deg, var(--bg), #ffffff);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-size:16px;
}

/* Header */
header{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
  padding: 36px 18px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  text-align:center;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 6px 18px rgba(31,111,111,0.12);
}
header h1{
  margin:0;
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  letter-spacing: -0.02em;
  font-weight: 700;
}
header p{
  margin:0;
  opacity: .95;
  font-size: 0.98rem;
  max-width: 880px;
}

/* Navigation */
nav{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:center;
  padding: 12px 10px;
  background: rgba(0,0,0,0.85);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
nav a{
  color: #fff;
  text-decoration:none;
  padding: 8px 12px;
  border-radius:8px;
  font-weight:600;
  font-size:0.95rem;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}
nav a:hover,
nav a:focus{
  background: rgba(255,255,255,0.06);
  color: #ffecb3; /* warm hover color */
  transform: translateY(-2px);
}

/* Page container */
.container{
  max-width: var(--max-width);
  margin: 28px auto;
  padding: var(--container-pad);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(40,50,60,0.06);
  border: 1px solid rgba(12,15,20,0.04);
}

/* Section heading */
.container > h2{
  margin-top:0;
  font-size: 1.25rem;
  margin-bottom: 18px;
  color: #111827;
}

/* Post grid */
.post-list{
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

/* Post card */
.post{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,250,0.98));
  border-radius: 10px;
  border: 1px solid rgba(14,18,20,0.04);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: default;
}
.post a{ color: inherit; text-decoration:none; }
.post strong{ display:block; font-size:1.05rem; color: #0f172a; margin-bottom:4px; }
.post p{ margin:0; color: var(--muted); font-size:0.95rem; }

/* Hover / focus */
.post:hover,
.post:focus-within{
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.08);
}

/* Featured first post slightly larger */
.post-list .post:first-child{
  border: 1px solid rgba(47,166,168,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(247,255,254,0.99));
}

/* Ad slot */
.ad-slot{
  margin: 20px auto;
  max-width: var(--max-width);
  min-height: 90px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(250,250,250,0.7), rgba(245,247,249,0.7));
  border: 1px dashed rgba(0,0,0,0.06);
  color: var(--muted);
  font-size:0.95rem;
}

/* Footer */
footer{
  margin-top: 28px;
  padding: 26px 10px;
  background: #0b1720;
  color: #e6eef3;
  text-align:center;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
footer p{ margin:0 0 8px 0; opacity:0.95; }
footer a{
  color: #cfe9ec;
  text-decoration:none;
  margin: 0 8px;
  font-weight:600;
}
footer a:hover{ text-decoration:underline; }

/* Responsive: split grid on larger screens */
@media (min-width:720px){
  .post-list{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width:1000px){
  .post-list{ grid-template-columns: repeat(3, minmax(0,1fr)); gap:18px; }
  .container{ padding: 34px; }
}

/* Small screens: relaxed padding */
@media (max-width:420px){
  body{ font-size:15px; }
  .container{ margin: 18px 12px; padding:18px; border-radius:10px; }
  nav{ gap:8px; padding:10px; overflow-x:auto; }
  nav a{ padding:8px 10px; font-size:0.9rem; }
}

/* Accessibility: focus ring for keyboard users */
a:focus, button:focus {
  outline: 3px solid rgba(47,166,168,0.22);
  outline-offset: 3px;
  border-radius:8px;

  /*css for post2*/

      /* article-specific tweaks that don't alter your site CSS file */
    .post-article {
      max-width: 880px;
      margin: 16px auto;
      padding: 20px;
      background: transparent;
    }
    .post-article h1 {
      font-size: clamp(1.4rem, 3.2vw, 2rem);
      margin: 0 0 8px 0;
      color: #0b1720;
      letter-spacing: -0.01em;
    }
    .post-meta {
      color: var(--muted);
      font-size: 0.95rem;
      margin-bottom: 18px;
    }
    .hero-image {
      width:100%;
      border-radius: 12px;
      display:block;
      margin: 12px 0 18px;
      box-shadow: 0 8px 28px rgba(15,23,42,0.06);
    }
    .lead {
      font-size: 1rem;
      margin-bottom: 14px;
      color: #111827;
    }
    .content-section { margin: 16px 0; }
    .content-section h2 { margin-top: 0; font-size:1.05rem; color: #0f172a; }
    .exercise-grid {
      display:grid;
      gap:12px;
      grid-template-columns: 1fr;
    }
    @media(min-width:720px){
      .exercise-grid { grid-template-columns: repeat(2, 1fr); }
    }
    .exercise-card{
      padding:12px;
      border-radius:10px;
      background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,250,0.98));
      border: 1px solid rgba(14,18,20,0.04);
    }
    .back-link{
      display:inline-block;
      margin-top:18px;
      text-decoration:none;
      color: var(--accent-2);
      font-weight:600;
    }
  
    /*mobilefriendly css*/

    /* --- MOBILE IMPROVEMENTS (append this to style.css) --- */

/* 1) Responsive base font sizing */
html { font-size: 16px; }
@media (max-width: 420px) {
  html { font-size: 15px; } /* slightly smaller on tiny screens */
}

/* 2) Reduce header padding on small screens */
@media (max-width: 720px) {
  header {
    padding: 18px 12px;            /* smaller header */
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }
  header h1 { font-size: clamp(1.25rem, 5.6vw, 1.6rem); }
  header p  { font-size: 0.95rem; max-width: 100%; padding: 0 6px; }
}

/* 3) Make nav horizontally scrollable (keeps links accessible) */
nav {
 /* overflow-x: auto;*/
  padding: 8px 12px;   /* smaller padding so it fits */
  gap: 10px;
}
nav::-webkit-scrollbar { display: none; } /* hide scrollbar on mobile */

/* 4) Larger tap targets for nav links */
nav a { padding: 10px 12px; display: inline-block; }

/* 5) Container spacing on small screens */
@media (max-width:420px) {
  .container { margin: 14px 10px; padding: 16px; border-radius:10px; }
}

/* 6) Post card tweaks for small screens */
.post { padding: 12px; }
.post strong { font-size: 1rem; }
.post p { font-size: 0.94rem; }

/* 7) Ensure images never overflow */
img, .hero img, .post img { max-width:100%; height:auto; display:block; }

/* 8) Improved focus/tap outline on small screens */
a:focus, button:focus { outline: 3px solid rgba(47,166,168,0.22); outline-offset:3px; }

/* 9) Optional: collapse grid earlier if needed */
@media (max-width:720px) {
  .post-list { grid-template-columns: 1fr; } /* single column on phones */
}

/* 10) Optional: reduce hover-only motion on mobile */
@media (hover: none) {
  .post:hover, .post:focus-within { transform: none; box-shadow: none; }
}

}

/* ---- HOMEPAGE FEATURED CARD UPGRADE ---- */

.post-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  transition: transform .20s ease, box-shadow .20s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.post-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.post-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.post-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .28s cubic-bezier(.2, .6, .4, 1);
}

.post-card:hover .post-image-wrapper img {
  transform: scale(1.07);
}

.post-content {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex-grow: 1;
}

.post-meta {
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.post-category {
  background: #ecfdf5;
  color: #047857;
  padding: .2rem .5rem;
  border-radius: 900px;
  font-size: .7rem;
  letter-spacing: .05em;
}

.post-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: .15rem 0;
}

.post-excerpt {
  margin: 0;
  font-size: .9rem;
  color: #4b5563;
}

.post-read-more {
  margin-top: .6rem;
  font-size: .83rem;
  font-weight: 600;
  color: #0ea5e9;
}

.post-read-more::after {
  content: "→";
  margin-left: 4px;
}

/* GRID UPGRADE */
.post-list {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .post-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .post-list { grid-template-columns: repeat(3, 1fr); }
}
 
/* load more button styling*/
.load-more-btn {
  display: block;
  margin: 20px auto;
  padding: 12px 25px;
  font-size: 16px;
  background: #0073e6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.load-more-btn:hover {
  background: #005bb5;
}

/* ===============================
   Global Back Buttons – FIXED
================================ */

/* ---------- Floating Top-Left Button ---------- */
.floating-back-btn {
  position: fixed;
  top: 20px;              /* BELOW header/nav */
  left: 16px;
  z-index: 999;
  padding: 8px 12px;
  background: #007bff;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);

  /* hidden initially */
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* visible after scroll */
.floating-back-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hide floating button on mobile */
@media (max-width: 767px) {
  .floating-back-btn {
    display: none;
  }
}

/* ---------- Bottom Back Button ---------- */
.bottom-back-wrapper {
  margin: 48px 0 24px;
  display: flex;
  justify-content: flex-end;

  /* animation */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.bottom-back-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.bottom-back-btn {
  padding: 10px 18px;
  background: #f1f3f5;
  color: #222;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.bottom-back-btn:hover {
  background: #e9ecef;
}


