:root{
--blue:#2f6bff;--orange:#FF8500;--saffron:#f4c430;
--dark:#013144;--light:#f8f8ff;
}

*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,Arial,sans-serif}
body{background:var(--dark);color:#fffefd;line-height:1.6}
/* 1) FIX: content container must never use negative calc paddings */
:root{
  --container: 1120px;
}

.content-wrap,
.container,
.wrap { /* keep whichever class you use */
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 28px);
}

/* 2) FIX: hero content clipping + overflow */
.hero,
.hero-section,
.page-hero {
  overflow: hidden; /* prevents weird horizontal scroll */
}

.hero .content-wrap,
.hero-section .content-wrap,
.page-hero .content-wrap{
  position: relative;
  z-index: 2;
}

/* 3) FIX: remove the “split background” on mobile */
@media (max-width: 820px){
  /* If your hero uses a split overlay/pseudo element */
  .hero::before,
  .hero::after,
  .hero-section::before,
  .hero-section::after,
  .page-hero::before,
  .page-hero::after{
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none !important;
  }

  /* If your hero is a 2-column grid/flex on desktop */
  .hero-grid,
  .hero-row,
  .hero-inner{
    display: block !important;
  }

  /* Better mobile typography so headings don’t blow out */
  .hero h1{
    font-size: clamp(30px, 7vw, 44px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em;
    margin-inline: 0 !important;
  }

  /* Make CTA buttons wrap cleanly */
  .hero-cta,
  .cta-row{
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .hero-cta a,
  .cta-row a,
  .hero-cta button{
    flex: 1 1 220px !important;
    min-width: 0 !important;
  }
}
/* LOADER */
#loader{position:fixed;inset:0;background:#016698;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:9999}
#loader img{width:120px;margin-bottom:20px}
.loader-bar{width:120px;height:4px;background:linear-gradient(90deg,var(--blue),var(--orange));animation:load 1.2s infinite}
@keyframes load{0%{width:0}100%{width:120px}}

/* NAV */
.header{position:fixed;top:0;width:100%;background:#016698;z-index:1000}
.nav{max-width:1200px;margin:auto;padding:15px;display:flex;justify-content:space-between;align-items:center}
.logo{height:40px}
.nav-links{display:flex;gap:25px;list-style:none}
.nav-links a{color:white;text-decoration:none;font-weight:500}
.nav-links a:hover{color:var(--orange)}
.menu-btn{display:none;font-size:26px;background:none;border:none;color:white}

/* HERO */
.hero{
  min-height:100vh;
  background:
    radial-gradient(900px 500px at 20% 30%, rgba(47,107,255,.35), transparent 60%),
    radial-gradient(700px 450px at 80% 20%, rgba(243,107,33,.28), transparent 55%),
    linear-gradient(to right, #013144, #0b0f1a);
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:110px 20px 60px; /* leave space for fixed header */
}

.hero-inner{max-width:900px;margin:auto}
.hero-badge{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  margin-bottom:16px;
  font-weight:700;
  opacity:.95;
}

.hero h1{font-size:3rem;line-height:1.1}
.hero span{color:var(--orange)}
.hero p{opacity:.9;margin:14px 0 22px}

.hero-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
/* ✅ HERO: prevent CTA rows from crowding/overlap */
.hero-actions,
.hero-cta-row{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top:16px;
}

/* Make buttons stable across widths */
.hero-actions a,
.hero-cta-row a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  white-space:nowrap;
}

/* Tablet: buttons become neat 2-per-row */
@media (max-width: 900px){
  .hero-actions a,
  .hero-cta-row a{
    width: min(260px, 100%);
  }
}

/* Mobile: full width buttons */
@media (max-width: 520px){
  .hero-actions a,
  .hero-cta-row a{
    width: 100%;
  }
}

.btn-primary{
  background:linear-gradient(45deg,var(--blue),var(--orange));
  padding:14px 34px;border-radius:40px;
  text-decoration:none;color:white;font-weight:700
}
.btn-secondary{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  padding:14px 30px;border-radius:40px;
  text-decoration:none;color:white;font-weight:700
}
.btn-secondary:hover{border-color:rgba(255,255,255,.35)}

.hero-stats{
  margin-top:26px;
  display:flex;
  gap:14px;
  justify-content:center;
  flex-wrap:wrap;
}
.stat{
  min-width:170px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.12);
}
.stat strong{display:block;font-size:1.05rem}
.stat span{opacity:.85}

/* SECTIONS */
.section{padding:90px 20px;max-width:1200px;margin:auto}
.light{background:var(--light);color:#013144}
.section h2{text-align:center;margin-bottom:40px;font-size:2.2rem}

.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:25px}

.card{
  background:#ffffff;
  padding:26px;
  border-radius:18px;
  transition:.25s;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  color:#013144;

  
}
.card:hover{transform:translateY(-8px)}

.feature-card h3{margin:10px 0 8px}
.feature-card p{opacity:.85}

.icon{
  width:44px;height:44px;
  display:flex;align-items:center;justify-content:center;
  border-radius:14px;
  background:linear-gradient(45deg,var(--blue),var(--orange));
  color:white;
  font-weight:900;
}

.mini-link{
  display:inline-block;
  margin-top:12px;
  text-decoration:none;
  font-weight:800;
  color:var(--blue);
}
.mini-link:hover{color:var(--orange)}


/* PORTFOLIO */
.portfolio-filters{text-align:center;margin-bottom:30px}
.portfolio-filters button{margin:8px;padding:10px 22px;border:none;border-radius:20px;background:var(--blue);color:white;cursor:pointer}
.portfolio-item{background:white;border-radius:15px;overflow:hidden;text-align:center;cursor:pointer;transition:.3s}
.portfolio-item img{width:100%;height:220px;object-fit:cover}
.portfolio-item:hover{transform:scale(1.04)}



/* ================================
   PORTFOLIO IMAGE FALLBACK
================================ */

/* Card still looks good without images */
.portfolio-item {
  display: block;
  background: linear-gradient(145deg, #0b2a3a, #0e3a52);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

/* Image area */
.portfolio-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* Fallback when image is missing */
.portfolio-item.no-image::before {
  content: "Preview coming soon";
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  background: linear-gradient(135deg, #0d3b55, #124e6d);
  color: rgba(255,255,255,.75);
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
}

/* Card body spacing remains intact */
.portfolio-item > div {
  padding: 16px;
}

/* Filter tabs */
.filter-btn{
  background:#2f66ff;        /* normal */
  color:#fff;                 /* keep readable always */
  border:1px solid transparent;
  padding:10px 16px;
  border-radius:999px;
  font-weight:600;
  cursor:pointer;
  transition:0.2s ease;
}

.filter-btn:hover{
  filter:brightness(0.95);
}

/* Active tab */
.filter-btn.active{
  background:#0b2a63;         /* darker active */
  color:#fff;                 /* stay white */
  border-color:rgb(255, 129, 10);
  box-shadow:0 6px 18px rgba(11,42,99,0.22);
}

/* Optional: keyboard accessibility */
.filter-btn:focus-visible{
  outline:3px solid rgba(47,102,255,0.35);
  outline-offset:2px;
}

/* LIGHTBOX */
#lightbox{position:fixed;inset:0;background:rgba(0,0,0,.9);display:none;align-items:center;justify-content:center;z-index:2000}
#lightbox img{max-width:90%;max-height:85%;border-radius:15px}

/* TESTIMONIALS */
.testimonial-box{max-width:600px;margin:auto;background:white;color:#111111;padding:40px;border-radius:20px;text-align:center;box-shadow:0 20px 40px rgba(0,0,0,.2)}
.testimonial-controls button{background:var(--orange);border:none;color:white;font-size:22px;margin:10px;padding:8px 16px;border-radius:50%}

/* CONTACT */
.contact-form{max-width:500px;margin:40px auto;display:flex;flex-direction:column;gap:15px}
.contact-form input,.contact-form textarea{padding:12px;border-radius:10px;border:none}
.contact-form button{background:var(--orange);border:none;padding:12px;border-radius:20px;color:white;font-weight:600}

/* FOOTER (UPGRADED) */
.footer{
  background:#016698;
  color:#fff;
  margin-top:80px;
  font-size:.95rem;
  text-align:left;
}

.footer-wrap{
  max-width:1200px;
  margin:0 auto;
  padding:50px 20px 25px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
}

.footer-col h4{margin-bottom:12px}
.footer-col p{opacity:.9;line-height:1.6}

.footer-list{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
  padding-left:0;
}
.footer-list a{
  color:#fff;
  text-decoration:none;
  opacity:.95;
}
.footer-list a:hover{opacity:1;text-decoration:underline}

.footer-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.badge{
  font-size:.85rem;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.18);
}

.footer-cta{
  display:inline-block;
  margin-top:16px;
  padding:10px 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:800;
  color:#0b0f1a;
  background:linear-gradient(45deg,var(--saffron),var(--orange));
}

.social{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
.social-btn{
  width:44px;height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  text-decoration:none;
  color:#fff;
  font-weight:900;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.25);
  transition:.2s;
}
.social-btn:hover{
  transform:translateY(-2px);
  background:rgba(0,0,0,.28);
}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,.22);
  text-align:center;
  padding:16px 14px;
  opacity:.95;
}

/* keep your back link */
.back-link{
  text-align:center;
  display:block;
  color:var(--blue);
  margin:40px;
}

/* RESPONSIVE */
@media(max-width:900px){
  .footer-wrap{grid-template-columns:1fr}
}

/* ANIMATIONS */
.animate{opacity:0;transform:translateY(40px);transition:.8s}
.animate.active{opacity:1;transform:translateY(0)}

/* MOBILE */
@media(max-width:800px){
  .nav-links{position:fixed;top:70px;right:-100%;background:#05070f;height:100vh;width:70%;flex-direction:column;padding:40px;transition:.3s}
  .nav-links.show{right:0}
  .menu-btn{display:block}
}

/* BLOG CARD LINKS (FIXED - removed typos that were breaking CSS) */
a.card{
  text-decoration:none;
  color:inherit;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.read-more{
  color:var(--blue);
  font-weight:600;
}

/* ARTICLE ACTIONS (DEDUPLICATED) */
.article-meta{
  text-align:center;
  opacity:.7;
  margin-bottom:10px;
}
.article-actions{
  display:flex;
  gap:12px;
  justify-content:center;
  margin:10px auto 25px;
  flex-wrap:wrap;
}
.action-btn,
.article-actions button{
  border:none;
  cursor:pointer;
  padding:10px 18px;
  border-radius:999px;
  background:linear-gradient(45deg,var(--blue),var(--orange));
  color:white;
  font-weight:600;
}
.action-btn:active,
.article-actions button:active{
  transform:scale(.98);
}

.article-img{
  width:100%;
  border-radius:16px;
  margin-bottom:20px;
}
.article-date{
  opacity:.6;
  margin-bottom:25px;
}

/* INDEX: Featured Work preview (added for the index body you requested) */
.portfolio-preview{
  text-decoration:none;
  color:inherit;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  transition:.25s;
  display:block;
}
.portfolio-preview:hover{transform:translateY(-6px)}
.portfolio-preview img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
}
.pp-text{padding:14px 16px}
.pp-text span{display:block;opacity:.75;margin-top:4px}

/* INDEX: CTA card */
.cta-card{
  max-width:1000px;
  margin:0 auto;
  text-align:center;
}

.cta-card{
  max-width:1000px;
  margin:0 auto;
  text-align:center;
}

video{outline:1px solid rgba(0,0,0,.08)}


/* =========================
   PORTFOLIO ONLY FIX
   (keeps cards white + readable)
========================= */

/* Your portfolio cards are anchors with classes: .portfolio-item.card
   .portfolio-item was overriding .card background (dark), so text became unreadable. */
a.portfolio-item.card{
  background:#ffffff !important;
  color:#013144 !important;
  overflow:hidden;
  display:block;
}

/* Ensure the inner text area stays white too */
a.portfolio-item.card > div{
  background:#ffffff !important;
}

/* Make headings + body text readable */
a.portfolio-item.card h3{ color:#013144 !important; }
a.portfolio-item.card p{ color:#013144 !important; opacity:.85; }
a.portfolio-item.card strong{ color:#013144 !important; }

/* Keep your link accent color */
a.portfolio-item.card .mini-link{
  color:#2f66ff !important;
  font-weight:700;
}

/* If an image is missing, don’t show broken layout */
a.portfolio-item.no-image{
  min-height:220px;
  display:flex;
  align-items:center;
}

.case-credit{
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 24px;
}

/* =========================
   LOADER SAFETY (MUST ADD)
   Prevents loader from trapping mobile pages
========================= */
#loader.hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .3s ease;
}

/* =========================
   MOBILE SAFETY FOR ANIMATIONS
   If animations.js is slow or blocked, content must still show.
========================= */
@media (max-width: 800px){
  .animate{
    opacity:1 !important;
    transform:none !important;
  }
}

/* Default (desktop & tablet) */
#postHero {
  width: 640px;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  border-radius: 18px;
}

/* Mobile fix */
@media (max-width: 640px) {
  #postHero {
    height: auto;
    max-height: 260px;
    object-fit: contain;
    background: #0a5c85; /* optional brand-safe fallback */
  }
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Mobile/Global overflow safety (fix hero cut-off) ===== */
img{
  max-width:100%;
  height:auto;
}

/* Make hero media always fit */
.hero figure{ max-width:100%; }
.hero figure img{
  width:100%;
  height:auto;
  display:block;
}
