:root{
  --brand-900:#020265;
  --brand-700:#753388;
  --brand-500:#2142ab;
  --bg:#0b0b12;
  --card-bg: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  --glass: rgba(255,255,255,0.04);
  --accent-gradient: linear-gradient(135deg,#753388 0%,#2142ab 50%,#020265 100%);
  --btn-gradient: linear-gradient(90deg,#753388,#2142ab);

/* Gradient helper for modal headings and accent text */
.gradient-text{
  background: var(--btn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Slight translucent panel for modal so gradient text stands out */
.modal .modal-content{
  background: var(--btn-gradient);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(33,66,171,0.24);
  overflow: hidden;
}

.modal .modal-body{
  background: transparent;
  padding: 2rem;
}
  --text-muted: rgba(255,255,255,0.7);
  --radius-lg: 20px;
}

/* Global */
body { background: linear-gradient(180deg,#05040a 0%, #0b0b12 60%); font-family: Inter,system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial; }
a { color: inherit; }
.container { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

/* Pentagon button */
.penta-btn {
  display:inline-block;
  padding: .75rem 1.6rem;
  border-radius: 14px;
  background: var(--btn-gradient);
  color: #fff;
  font-weight:700;
  transform: skewX(-6deg);
  box-shadow: 0 8px 24px rgba(33,66,171,0.16), 0 1px 0 rgba(255,255,255,0.02) inset;
  transition: transform .18s ease, box-shadow .18s;
}
.penta-btn:hover { transform: skewX(-6deg) translateY(-4px) scale(1.02); box-shadow: 0 12px 34px rgba(33,66,171,0.24); }
.penta-btn > span { display:inline-block; transform: skewX(6deg); }

/* Bento card */
.card-bento {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(2,2,101,0.12);
}

/* Hero */
.hero {
  padding: 3rem 0 4rem 0;
  background: radial-gradient(600px 200px at 10% 10%, rgba(117,51,136,0.08), transparent 8%),
              radial-gradient(800px 250px at 90% 80%, rgba(33,66,171,0.06), transparent 12%);
}

/* subtle separator between navbar and hero content */
.hero{ border-top: 1px solid rgba(255,255,255,0.02); }

/* Parallax helper */
[data-parallax] { will-change: transform; }

/* small form tweaks */
.form-control, .form-select { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04); color: #fff; }
label { color: var(--text-muted); font-size: .88rem; }
.text-muted { color: var(--text-muted) !important; }

/* Navbar styling: sticky background with glass effect and separation */
.navbar {
  background: linear-gradient(180deg, rgba(20, 18, 32, 0.92), rgba(15, 13, 25, 0.88)) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(2, 2, 101, 0.2) !important;
  transition: background .22s ease, box-shadow .22s ease, border-color .22s ease;
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* Keep navbar items wrapping on small widths to avoid overflow */
.navbar .navbar-collapse { flex-wrap: wrap; }

/* Compact Upwork button: don't let it grow or push other items */
.navbar .nav-item.upwork { flex: 0 0 auto; }
.navbar .nav-item.upwork .penta-btn {
  padding: .35rem .7rem; /* smaller padding */
  font-size: .9rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar::after{
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(117,51,136,0.2), rgba(33,66,171,0.16));
  pointer-events: none;
  opacity: 1;
}

.navbar.scrolled{
  background: linear-gradient(180deg, rgba(25, 22, 40, 0.98), rgba(18, 15, 30, 0.94)) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(2, 2, 101, 0.35) !important;
}

/* Simple nav link styles and active indicator */
.navbar .nav-link{
  padding: .45rem .75rem;
  border-radius: 8px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color .12s ease, transform .12s ease, box-shadow .12s ease;
}

.navbar .nav-link:hover{
  color: #fff;
  transform: translateY(-1px);
}

/* active link: subtle accent underline */
.navbar .nav-link.active{
  color: #fff;
  font-weight: 600;
}
.navbar .nav-link.active::after{
  content: '';
  display: block;
  height: 3px;
  width: 100%;
  margin-top: 6px;
  border-radius: 4px;
  background: linear-gradient(90deg,#753388 0%,#2142ab 50%,#020265 100%);
}

.navbar .nav-item .btn.penta-btn{ padding: .45rem .9rem; }

/* Dropdown menu styling */
.navbar .dropdown-menu {
  background: rgba(20, 18, 32, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(2, 2, 101, 0.25);
  margin-top: 0.5rem;
  padding: 0.75rem 0;
}

.navbar .dropdown-item {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.7rem 1.5rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.navbar .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left-color: #753388;
  padding-left: 1.7rem;
}

.navbar .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

/* Headline gradient text with amplified multi-layer shadow */
.hero .display-5 {
  font-weight: 800;
  line-height: 1.05;
  background: linear-gradient(90deg, #ff9bd6 0%, #c27bff 30%, #6fb1ff 60%, #00e0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Stronger glowing shadow using layered colored shadows */
  text-shadow:
    0 6px 24px rgba(33,66,171,0.18),
    0 12px 48px rgba(117,51,136,0.10),
    0 2px 6px rgba(0,0,0,0.6);
}

/* Slight glow behind headline to amplify gradient */
.hero .display-5::after{
  content: '';
  display:block;
  position:relative;
  pointer-events:none;
}

/* Subtle gradient patches for dark theme (blurred, low-opacity) */
body::before{
  content: '';
  position: fixed;
  top: -10vh;
  left: -10vw;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle at 20% 20%, rgba(117,51,136,0.12), transparent 50%);
  filter: blur(80px);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

body::after{
  content: '';
  position: fixed;
  bottom: -10vh;
  right: -10vw;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle at 80% 80%, rgba(33,66,171,0.10), transparent 30%);
  filter: blur(90px);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* Accent overlay for cards to pick up gradients softly */
.card-bento::before{
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(117,51,136,0.06), rgba(33,66,171,0.04));
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Service cards inside the hero */
.service-list{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.service-card{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem 0.6rem 0.6rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  position: relative;
  min-height: 54px;
}
.service-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(2,2,101,0.12);
  border-color: rgba(33,66,171,0.14);
}

.service-card input[type="checkbox"]{ 
  /* keep checkbox accessible but visually hidden */
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0;
  z-index: 3;
}

.custom-check{
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.01);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.6rem;
  box-shadow: 0 3px 8px rgba(2,2,101,0.06) inset;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.service-card input[type="checkbox"]:checked + .custom-check{
  background: var(--accent-gradient);
  border-color: rgba(33,66,171,0.18);
  transform: translateY(-1px) scale(1.02);
}

.custom-check svg path{ transition: opacity .12s ease, transform .12s ease; opacity: 0; transform: scale(.9); }
.service-card input[type="checkbox"]:checked + .custom-check svg path{ opacity: 1; transform: scale(1); }

.service-card{ padding-left: 0.25rem; }

.service-card .fw-bold{
  font-size: .98rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.service-card .small{ color: rgba(255,255,255,0.78); font-size: .78rem; }

@media (max-width: 768px){
  .service-list{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) and (max-width: 1199px){
  .service-list{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 991px){
  .service-list{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 576px) and (max-width: 767px){
  .service-list{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px){
  .service-list{ grid-template-columns: 1fr; }
}

/* Ensure card content sits above global gradient patches */
.card-bento, .card-bento *{ position: relative; z-index: 2; }

/* center penta-btn within card-bento */
.card-bento .penta-btn{ margin: 0 auto; display: inline-block; }

/* Services tiles: bento style with corner gradients, bg image support and read-more */
.service-tile{ position:relative; display:block; overflow:hidden; }
.service-tile .tile-inner{ position:relative; z-index:2; border-radius:12px; padding:24px; background:var(--card-bg); border:1px solid rgba(255,255,255,0.06); transition:transform .18s ease, box-shadow .18s ease; }
.service-tile .tile-bg{ position:absolute; inset:0; background-size:cover; background-position:center; opacity:0.18; filter:grayscale(10%) saturate(90%); z-index:1; pointer-events:none; transform:translate3d(0,0,0); transition:transform .25s ease; }
.service-tile .tile-corner{ position:absolute; width:180px; height:180px; z-index:0; pointer-events:none; }
.service-tile .read-more{ display:inline-block; margin-top:12px; font-weight:700; color:#fff; background: linear-gradient(90deg,#753388,#2142ab); padding:6px 12px; border-radius:999px; font-size:.82rem; box-shadow:0 6px 18px rgba(33,66,171,0.12); text-decoration:none; }

/* Remove underlines and ensure links inherit text color for service tiles (related posts) */
.service-tile,
.service-tile:link,
.service-tile:visited,
.service-tile:hover,
.service-tile:focus {
  text-decoration: none;
  color: inherit;
}
.service-tile .tile-inner { text-decoration: none; }

/* unique corner accents (6 variants) */
.tile-corner.corner-1{ right:-40px; top:-40px; background: radial-gradient(120px 120px at 100% 0%, rgba(117,51,136,0.14), transparent 40%); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.tile-corner.corner-2{ left:-40px; top:-40px; background: radial-gradient(120px 120px at 0% 0%, rgba(33,66,171,0.12), transparent 40%); clip-path: polygon(0 0, 100% 0, 0 100%); }
.tile-corner.corner-3{ right:-40px; bottom:-40px; background: radial-gradient(120px 120px at 100% 100%, rgba(2,2,101,0.12), transparent 40%); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.tile-corner.corner-4{ left:-40px; bottom:-40px; background: radial-gradient(120px 120px at 0% 100%, rgba(117,51,136,0.08), transparent 40%); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.tile-corner.corner-5{ right:10px; top:10px; background: linear-gradient(135deg, rgba(117,51,136,0.08), rgba(33,66,171,0.06)); width:110px; height:110px; border-radius:18px; opacity:0.9; }
.tile-corner.corner-6{ left:10px; bottom:10px; background: linear-gradient(135deg, rgba(33,66,171,0.06), rgba(2,2,101,0.04)); width:110px; height:110px; border-radius:18px; opacity:0.9; }

/* Hover lift and bg parallax */
.service-tile:hover .tile-inner{ transform: translateY(-6px); box-shadow: 0 12px 36px rgba(2,2,101,0.14); }
.service-tile:hover .tile-bg{ opacity:0.26; transform: translate3d(0, -6px, 0) scale(1.02); }

@media (max-width: 767px){
  .tile-corner{ display:none; }
}

/* Services section background + overlay (uses /static/img/hero-diffuse3.jpg) */
.services-section{ position:relative; overflow:hidden; }
.services-section::before{
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/static/img/hero-diffuse4.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  z-index: 0;
  filter: saturate(0.9) blur(1px);
  pointer-events: none;
}
.services-section::after{
  content: '';
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(3,4,8,0.45), rgba(3,4,8,0.55));
  z-index:1;
  pointer-events:none;
}
.services-section .container{ position:relative; z-index:2; }

/* enhance corner appearance and animate on hover */
.service-tile .tile-corner{ transition: transform .28s ease, opacity .28s ease, filter .28s ease, background .28s ease; }
.service-tile:hover .tile-corner{ transform: translateY(-8px) rotate(4deg); filter: blur(0.4px); opacity:1; }
.service-tile:hover .tile-corner.corner-1{ background: radial-gradient(140px 140px at 100% 0%, rgba(117,51,136,0.22), transparent 35%); }
.service-tile:hover .tile-corner.corner-2{ background: radial-gradient(140px 140px at 0% 0%, rgba(33,66,171,0.18), transparent 35%); }
.service-tile:hover .tile-corner.corner-3{ background: radial-gradient(140px 140px at 100% 100%, rgba(2,2,101,0.18), transparent 35%); }
.service-tile:hover .tile-corner.corner-4{ background: radial-gradient(140px 140px at 0% 100%, rgba(117,51,136,0.14), transparent 35%); }
.service-tile:hover .tile-corner.corner-5{ background: linear-gradient(135deg, rgba(117,51,136,0.18), rgba(33,66,171,0.12)); transform: translateY(-6px) rotate(6deg); }
.service-tile:hover .tile-corner.corner-6{ background: linear-gradient(135deg, rgba(33,66,171,0.12), rgba(2,2,101,0.08)); transform: translateY(-6px) rotate(-6deg); }

/* Home CTA standout styling */
.home-cta{
  position: relative;
  padding: 3rem 0;
  margin: 3rem 0;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15,12,30,0.9), rgba(8,8,12,0.85));
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 40px rgba(2,2,101,0.25);
}
.home-cta::before{
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 10% 20%, rgba(117,51,136,0.06), transparent 10%), radial-gradient(600px 300px at 90% 80%, rgba(33,66,171,0.05), transparent 12%);
  pointer-events: none;
  z-index:0;
}
.home-cta .container{ position:relative; z-index:2; }
.home-cta h2{ font-size: clamp(1.6rem, 2.6vw, 2rem); margin-bottom: .5rem; }
.home-cta p.lead{ color: var(--text-muted); max-width: 720px; margin: 0 auto 1rem; }
.home-cta .cta-benefits{ display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; margin-top:1rem; }
.home-cta .cta-benefits .benefit{ background: rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.03); padding: .5rem 1rem; border-radius: 999px; color: var(--text-muted); font-size: .9rem; }
.home-cta .penta-btn.whatsapp{ background: linear-gradient(90deg,#25D366,#128C7E); }
.home-cta .penta-btn.hire{ background: var(--btn-gradient); }

@media (max-width:768px){
  .home-cta .cta-benefits{ flex-direction:column; align-items:center; }
}

/* Insights specific styling */
.carousel-hero-item{ background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-radius: 12px; padding: 2rem 0; }
.carousel-hero-item .display-5{ color: #fff; }
.carousel-hero-item .lead{ color: rgba(255,255,255,0.8); }
.hero .carousel-control-prev-icon, .hero .carousel-control-next-icon{ filter: drop-shadow(0 6px 18px rgba(2,2,101,0.28)); }

.insights-list .card-bento{ display:flex; flex-direction:column; height:100%; padding:1.25rem; }
.insights-list .card-bento h3{ margin-top:0; }
.insights-list .card-bento p{ margin-bottom: 1rem; }

.insight-detail{ padding: 1.25rem; background: transparent; }
.insight-detail .content{ margin-top:1rem; line-height:1.8; color: #e9eefb; }
.insight-detail .meta{ color: rgba(255,255,255,0.7); gap:0.75rem; display:flex; flex-wrap:wrap; }

/* card outline and subtle animation */
.card-bento{ border: 1px solid rgba(255,255,255,0.04); background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0.01)); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-bento:hover{ transform: translateY(-6px); box-shadow: 0 14px 40px rgba(2,2,101,0.18); border-color: rgba(33,66,171,0.12); }
.card-bento::before{ content:''; position:absolute; inset:0; border-radius:16px; pointer-events:none; box-shadow: inset 0 1px 0 rgba(255,255,255,0.02); }

/* meta icons */
.meta-item{ display:inline-flex; align-items:center; gap:6px; color: rgba(255,255,255,0.7); }
.meta-item svg{ opacity:0.9; }

/* highlight likes when positive */
.meta-item .likes{ color: #ffd1dc; }

/* hero overlay darker for readability */
.insights-hero{ position:relative; }
.insights-hero::after{ content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.2)); z-index:0; }
.insights-hero > .container{ position:relative; z-index:2; }

/* Mini hero sizing matching site landing pages */
.mini-hero .carousel-hero-item.mini{ min-height: 96px; display:flex; align-items:center; padding: 0.75rem 0; border-radius: 12px; }
.mini-hero .carousel-hero-item.mini .h4, .mini-hero .carousel-hero-item.mini .h5{ color:#fff; margin:0; }
.mini-hero .carousel-hero-item.mini .lead{ display:none; }

/* Make tile-inner match homepage spacing and typography */
.tile-inner h3, .tile-inner .fw-bold{ font-size:1.05rem; margin-bottom:0.5rem; }
.tile-inner p.small{ color: var(--text-muted); margin-bottom:0.75rem; }

/* ensure tile-corner uses subtle accent like homepage */
.tile-corner.corner-5{ right:10px; top:10px; background: linear-gradient(135deg, rgba(117,51,136,0.08), rgba(33,66,171,0.06)); width:90px; height:90px; border-radius:14px; opacity:0.9; }

/* card-bento used inside tiles should have consistent radius */
.card-bento{ border-radius:12px; }

@media (max-width:768px){
  .carousel-hero-item .display-5{ font-size: 1.6rem; }
}

/* Nested replies styling: visually distinguish replies with indentation,
   smaller cards, subtle background and a left accent border. */
.comment .replies .comment{
  margin-left: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.012), rgba(255,255,255,0.008));
  border: 1px solid rgba(255,255,255,0.03);
  border-left: 4px solid rgba(117,51,136,0.12);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(2,2,101,0.04);
  font-size: 0.95rem;
}
.comment .replies .comment .replies .comment{ margin-left: 14px; }
.comment .replies .comment .reply{ margin-top:8px; }

/* Slightly dim deeper nested replies to help visual hierarchy */
.comment .replies .comment .replies .comment{ background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.006)); }

/* Reply item (small card) */
.reply{ background: rgba(255,255,255,0.01); padding:8px; border-radius:8px; border:1px solid rgba(255,255,255,0.02); }

/* FAQ section styles */
.faq-section{ padding:3rem 0 4rem; border-top:1px solid rgba(255,255,255,0.03); }
.faq-list{ display:grid; gap:1rem; max-width:920px; margin-top:1.25rem; }
.faq-item{ background: linear-gradient(180deg, rgba(255,255,255,0.012), rgba(255,255,255,0.008)); border:1px solid rgba(255,255,255,0.04); border-radius:12px; overflow:hidden; }
.faq-question{ width:100%; text-align:left; padding:1.25rem 1.5rem; background:linear-gradient(90deg, rgba(117,51,136,0.06), rgba(33,66,171,0.04)); border:0; color:#fff; font-weight:800; font-size:1.05rem; display:flex; align-items:center; justify-content:space-between; cursor:pointer; gap:1rem; }
.faq-question:focus{ outline:3px solid rgba(117,51,136,0.18); }
.faq-answer{ padding:0 1.5rem; color:var(--text-muted); max-height:0; overflow:hidden; transition: max-height 0.36s cubic-bezier(.2,.9,.2,1), padding 0.24s ease; line-height:1.7; }
.faq-item.open .faq-answer{ padding:1rem 1.5rem 1.5rem; max-height:420px; }
.faq-toggle{ margin-left:1rem; color:var(--text-muted); font-weight:800; font-size:1.15rem; display:inline-block; min-width:28px; text-align:center; }
.faq-close{ background:transparent; border:0; color:var(--text-muted); font-weight:700; cursor:pointer; }

/* Stronger separation and generous spacing */
.faq-list .faq-item{ box-shadow: 0 8px 34px rgba(2,2,101,0.12); border-left: 3px solid rgba(117,51,136,0.12); }
.faq-question{ padding-top:1.25rem; padding-bottom:1.25rem; }
.faq-answer p{ margin:0; }

@media (max-width:768px){ .faq-section{ padding:2rem 0; } }
