*{box-sizing:border-box;margin:0;padding:0;font-family:Segoe UI,Arial,sans-serif}
:root{
--blue:#2f6fed;
--blue-dark:#2458c9;
--bg:#f5f7fb;
--text:#1f2937;
--border:#e5e7eb;
--green:#22c55e;
}
body{background:var(--bg);color:var(--text)}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:14px 24px;background:#fff;border-bottom:1px solid var(--border);flex-wrap:wrap}
.logo span{display:block;font-size:.75em;color:#6b7280}
.menu{display:flex;gap:20px;flex-wrap:wrap}
.menu a{text-decoration:none;color:var(--text);font-weight:500}
.signin{background:var(--green);color:#fff;border:none;padding:10px 18px;border-radius:8px;font-weight:600}
.hero{margin:24px;padding:48px;border-radius:16px;background:linear-gradient(135deg,var(--blue),var(--blue-dark));color:#fff}
.tabs{display:flex;gap:12px;padding:0 24px;flex-wrap:wrap}
.tab{padding:10px 18px;border-radius:10px;border:1px solid var(--border);background:#fff;cursor:pointer}
.tab.active{background:var(--blue);color:#fff;border:none}
.content{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px;padding:24px}
.card{background:#fff;padding:24px;border-radius:14px;box-shadow:0 6px 18px rgba(0,0,0,.08);display:flex;flex-direction:column}
.hidden{display:none}
.read-more{margin-top:16px;background:var(--blue);color:#fff;border:none;padding:10px 16px;border-radius:8px;cursor:pointer}
.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);justify-content:center;align-items:center}
.modal-content{background:#fff;padding:32px;border-radius:16px;max-width:520px;width:90%}
.close{float:right;font-size:1.5em;cursor:pointer}

/* Best Practices Footer (v3 theme) */
.bp-footer{
  background:#ffffff;
  margin-top:40px;
  padding:50px 24px 20px;
  border-top:1px solid var(--border);
}

.footer-grid{
  max-width:1200px;
  margin:auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:30px;
}

.footer-col h4{
  color:var(--blue);
  font-size:.95em;
  margin-bottom:14px;
  font-weight:600;
}

.footer-col a{
  display:block;
  color:var(--text);
  text-decoration:none;
  font-size:.85em;
  margin-bottom:10px;
  opacity:.85;
}

.footer-col a:hover{
  opacity:1;
  color:var(--blue);
}

.footer-bottom{
  text-align:center;
  margin-top:40px;
  font-size:.8em;
  color:#6b7280;
  border-top:1px solid var(--border);
  padding-top:15px;
}

/* Mobile */
@media(max-width:600px){
  .bp-footer{
    text-align:center;
  }
}

/* ===== Best Practices Modal (v3) ===== */

.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.55);
  backdrop-filter: blur(2px);
  justify-content:center;
  align-items:center;
  z-index:1000;
}

/* Modal box */
.modal-content{
  background:#ffffff;
  width:100%;
  max-width:560px;
  max-height:70vh;                 /* never exceed 70% of screen height */
  border-radius:14px;
  border:2px solid var(--blue);
  box-shadow:0 25px 50px rgba(0,0,0,.25);
  overflow:hidden;                /* prevents overflow outside modal */
  display:flex;
  flex-direction:column;          /* allows header/body/footer layout */
}


/* Header */
.modal-header{
  background:linear-gradient(135deg,var(--blue),var(--blue-dark)); /* Blue header */
  color:#ffffff;
  padding:16px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* Title */
.modal-header h2{
  font-size:1.1em;
  font-weight:600;
}

/* Close button */
.modal-close{
  background:rgba(255,255,255,.2);
  border:none;
  color:white;
  width:32px;
  height:32px;
  border-radius:8px;
  cursor:pointer;
  font-size:1.2em;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Body */
.modal-body{
  padding:24px;
  color:var(--text);
  line-height:1.6;
  border-top:1px solid var(--border);
  overflow-y:auto;                /* enable vertical scrolling */
  max-height:40vh;                /* body uses at most 40% of viewport */
}


/* Footer */
.modal-footer{
  padding:16px 24px;
  background:#f9fafb;
  border-top:1px solid var(--border);
  display:flex;
  justify-content:flex-end;
  gap:12px;
}

/* Buttons */
.modal-btn{
  padding:10px 18px;
  border-radius:8px;
  border:none;
  font-weight:600;
  cursor:pointer;
}

.modal-btn.primary{
  background:var(--blue);
  color:white;
}

.modal-btn.secondary{
  background:#e5e7eb;
  color:#374151;
}

.modal-body ul{
  margin:16px 0;
  padding-left:22px;
}

.modal-body li{
  margin-bottom:8px;
  line-height:1.5;
}

.modal-body h4{
  margin-top:16px;
  margin-bottom:8px;
  color:var(--blue);
}

/* Animation */
@keyframes modalPop{
  from{transform:scale(.92);opacity:0}
  to{transform:scale(1);opacity:1}
}

/* Mobile */
@media(max-width:600px){
  .modal-content{
    max-width:95%;
  }
}

/* Desktop / Tablet */
.read-more{
  align-self:flex-end;                 /* move button to right */
  margin-top:14px;
  background:var(--blue);
  color:white;
  border:none;
  padding:6px 14px;                    /* smaller on desktop */
  border-radius:6px;
  font-size:0.75rem;
  font-weight:600;
  cursor:pointer;
  transition:.2s ease;
}

.read-more:hover{
  background:var(--blue-dark);
}

/* Mobile – keep it large and touch friendly */
@media(max-width:600px){
  .read-more{
    align-self:stretch;                /* full width on mobile */
    padding:12px 16px;
    font-size:0.9rem;
    border-radius:8px;
  }
}

/* ===== Hero text fine-tuning (no height change) ===== */

.hero h1{
  line-height:1.25;   /* was too tight */
}

.hero p,
.hero .subtitle{
  line-height:1.55;   /* clean, readable */
}
