:root{
  --brand:#6d28d9;
  --brand-2:#4f46e5;
  --brand-grad:linear-gradient(135deg,#6d28d9 0%,#4f46e5 55%,#2563eb 100%);
  --ink:#1f2430;
}
*,*::before,*::after{box-sizing:border-box;}
*{font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;}
html{overflow-x:hidden;scroll-behavior:smooth;}
body{background:#f6f7fb;color:var(--ink);overflow-x:hidden;max-width:100%;}
img,video,svg{max-width:100%;height:auto;}
a{color:var(--brand-2);}
.text-primary{color:var(--brand)!important;}
.btn-primary{background:var(--brand);border-color:var(--brand);}
.btn-primary:hover{background:#5b21b6;border-color:#5b21b6;}
.btn-outline-primary{color:var(--brand);border-color:var(--brand);}
.btn-outline-primary:hover{background:var(--brand);border-color:var(--brand);}
.site-main{min-height:60vh;}

/* Logos */
.site-logo{display:block;object-fit:contain;flex-shrink:0;border-radius:.35rem;width:auto;max-width:100%;}
.site-logo--nav{height:34px;max-height:34px;width:auto;}
.site-logo--footer{height:clamp(26px,6vw,32px);}

/* Navbar */
.site-navbar{
  background:var(--brand-grad);
  z-index:9999;
  box-shadow:0 4px 20px rgba(30,27,75,.2);
}
.site-navbar .navbar-brand{max-width:calc(100% - 52px);}
.site-navbar .navbar-brand .site-logo--nav{
  height:34px;max-height:34px;width:auto;display:block;
}
.site-navbar .navbar-toggler{min-width:44px;min-height:44px;border-color:rgba(255,255,255,.35);}
.site-navbar .nav-link{
  font-weight:500;opacity:.9;
  min-height:44px;display:flex;align-items:center;
}
.site-navbar .nav-link.active,.site-navbar .nav-link:hover{opacity:1;}
.site-navbar .dropdown-menu{
  z-index:10000;border:none;border-radius:.75rem;
  box-shadow:0 14px 40px rgba(31,36,48,.18);
  max-height:min(70vh,400px);overflow-y:auto;
}
.site-navbar .navbar-search{width:100%;max-width:100%;}
.site-navbar .navbar-auth .btn{min-height:44px;}

/* Hero */
.hero{background:var(--brand-grad);color:#fff;position:relative;overflow:hidden;}
.hero::after{content:"";position:absolute;right:-120px;top:-120px;width:380px;height:380px;background:rgba(255,255,255,.08);border-radius:50%;pointer-events:none;}
.hero::before{content:"";position:absolute;left:-100px;bottom:-140px;width:320px;height:320px;background:rgba(255,255,255,.06);border-radius:50%;pointer-events:none;}
.hero .container{position:relative;z-index:1;}
.hero .hero-search{max-width:560px;}
.hero .hero-search .form-control{height:54px;}
.hero h1,.hero .display-5{font-weight:800;letter-spacing:-.5px;}
.hero-stats{display:flex;flex-wrap:wrap;gap:1rem 1.5rem;}

/* Section helpers */
.section{padding:clamp(2.5rem,6vw,4rem) 0;}
.section-title{font-weight:800;letter-spacing:-.4px;font-size:clamp(1.35rem,4vw,1.75rem);line-height:1.25;}
.section-sub{color:#6b7280;font-size:clamp(.875rem,2.5vw,1rem);line-height:1.55;}
.section-head{
  display:flex;flex-wrap:wrap;gap:.75rem 1rem;
  justify-content:space-between;align-items:flex-end;
}

/* Category cards */
.category-card{transition:.25s ease;border-radius:1rem;cursor:pointer;height:100%;}
.category-card:hover{transform:translateY(-6px);box-shadow:0 .8rem 1.6rem rgba(79,70,229,.18)!important;}
.category-icon{
  width:clamp(48px,12vw,62px);height:clamp(48px,12vw,62px);
  flex-shrink:0;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  font-size:clamp(1.2rem,3vw,1.6rem);color:#fff;background:var(--brand-grad);
}
.category-card .fw-semibold{
  overflow:hidden;text-overflow:ellipsis;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}

/* Project cards */
.project-card{transition:.25s ease;height:100%;}
.project-card .card-body{display:flex;flex-direction:column;min-width:0;}
.project-card:hover{transform:translateY(-6px);box-shadow:0 1rem 2rem rgba(31,36,48,.14)!important;}
.project-thumb{aspect-ratio:16/10;background:#eef0f6;overflow:hidden;}
.project-thumb img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .4s ease,transform .4s ease;}
.project-thumb img.loaded{opacity:1;}
.project-card:hover .project-thumb img{transform:scale(1.06);}
.project-thumb-placeholder{width:100%;height:100%;font-size:2.4rem;color:#b9c0d0;background:linear-gradient(135deg,#eef0f6,#e3e7f1);}
.discount-badge{position:absolute;top:10px;left:10px;border-radius:30px;padding:.35rem .6rem;}
.stretched-title{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;min-height:2.6em;word-break:break-word;
}
.tech-chips .chip{display:inline-block;background:#eef0f6;color:#41475a;border-radius:.4rem;padding:.12rem .5rem;font-size:.72rem;margin:0 .2rem .25rem 0;max-width:100%;overflow:hidden;text-overflow:ellipsis;}
.tech-chips .chip-more{background:var(--brand);color:#fff;}
.project-card .card-actions{gap:.5rem;}
.project-card .btn-view{min-height:38px;white-space:nowrap;}

/* Technology badges */
.tech-pill{
  display:inline-flex;align-items:center;gap:.4rem;
  background:#fff;border:1px solid #e5e7eb;color:#374151;
  border-radius:50px;padding:.5rem 1rem;font-weight:600;
  transition:.2s;text-decoration:none;max-width:100%;
}
.tech-pill:hover{background:var(--brand);color:#fff;border-color:var(--brand);transform:translateY(-2px);}

/* Why choose us */
.feature-card{border-radius:1rem;transition:.25s;height:100%;}
.feature-card:hover{transform:translateY(-5px);}
.feature-icon{width:56px;height:56px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:1.5rem;color:var(--brand);background:#efeafd;flex-shrink:0;}

/* Testimonials */
.testi-card{border-radius:1rem;height:100%;}
.testi-avatar{width:48px;height:48px;border-radius:50%;object-fit:cover;background:var(--brand-grad);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0;}

/* Footer */
.site-footer{background:#0f1220;}
.footer-brand{display:flex;align-items:center;gap:.65rem;justify-content:center;margin-bottom:.75rem;}
.footer-brand-title{font-size:clamp(1rem,3.5vw,1.25rem);font-weight:700;margin:0;line-height:1.3;}
.footer-about{color:rgba(255,255,255,.65);font-size:clamp(.85rem,2.5vw,.95rem);line-height:1.65;margin-bottom:0;}
.footer-links a{
  color:rgba(255,255,255,.7);text-decoration:none;display:block;
  padding:.3rem 0;transition:.2s;
  font-size:clamp(.85rem,2.5vw,.95rem);word-break:break-word;
}
.footer-links a:hover{color:#fff;padding-left:.3rem;}
.footer-copyright{line-height:1.65;font-size:clamp(.78rem,2.4vw,.875rem);}
.social-links{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center;}
.social-links a{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;}

/* Back to top */
.back-to-top{position:fixed;right:20px;bottom:20px;width:46px;height:46px;display:none;align-items:center;justify-content:center;z-index:1030;}
.back-to-top.show{display:flex;}

/* Gallery */
.gallery-main{aspect-ratio:16/9;background:#eef0f6;border-radius:1rem;overflow:hidden;}
.gallery-main img{width:100%;height:100%;object-fit:cover;}
.gallery-thumb{width:84px;height:60px;object-fit:cover;border-radius:.5rem;cursor:pointer;border:2px solid transparent;flex-shrink:0;}
.gallery-thumb.active{border-color:var(--brand);}

/* Auth / forms */
.auth-wrap{min-height:calc(100vh - 70px);display:flex;align-items:center;padding:1rem 0;}
.auth-card{border-radius:1.25rem;overflow:hidden;}
.auth-side{background:var(--brand-grad);color:#fff;}
.form-control,.form-select{border-radius:.6rem;min-height:44px;max-width:100%;}
.btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;}
.btn-sm{min-height:38px;}
.rounded-pill-input .form-control{border-radius:50px;}
.otp-input{font-size:clamp(1.25rem,5vw,1.75rem)!important;letter-spacing:clamp(.3rem,3vw,.7rem)!important;font-weight:700;}
.auth-icon{font-size:clamp(2rem,8vw,2.6rem);color:var(--brand-2);}

/* Dashboard */
.dash-side .list-group-item{border:none;border-radius:.6rem!important;margin-bottom:.25rem;font-weight:500;color:#41475a;min-height:44px;display:flex;align-items:center;}
.dash-side .list-group-item.active{background:var(--brand);color:#fff;}
.dash-avatar{width:64px;height:64px;font-size:1.5rem;}
.stat-card{border-radius:1rem;height:100%;}
.stat-icon{width:50px;height:50px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.3rem;flex-shrink:0;}

/* Inner page hero + breadcrumb */
.page-hero{background:var(--brand-grad);position:relative;overflow:hidden;}
.page-hero::after{content:"";position:absolute;right:-90px;top:-90px;width:260px;height:260px;background:rgba(255,255,255,.08);border-radius:50%;pointer-events:none;}
.page-hero .container{position:relative;z-index:1;}
.page-hero-breadcrumb .breadcrumb-item,.page-hero-breadcrumb .breadcrumb-item a{color:rgba(255,255,255,.8);text-decoration:none;}
.page-hero-breadcrumb .breadcrumb-item a:hover{color:#fff;}
.page-hero-breadcrumb .breadcrumb-item.active{color:#fff;}
.page-hero-breadcrumb .breadcrumb-item+.breadcrumb-item::before{color:rgba(255,255,255,.6);}

/* Statistics / counters */
.stats-section{background:#fff;}
.stat-tile{background:#fff;border:1px solid #eef0f6;border-radius:1rem;padding:clamp(1.25rem,4vw,1.75rem) 1rem;transition:.25s ease;height:100%;}
.stat-tile:hover{transform:translateY(-6px);box-shadow:0 1rem 2rem rgba(79,70,229,.14);border-color:transparent;}
.stat-tile-icon{width:clamp(52px,14vw,64px);height:clamp(52px,14vw,64px);border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:clamp(1.4rem,4vw,1.8rem);color:#fff;background:var(--brand-grad);}
.stat-tile-value{font-size:clamp(1.5rem,4vw,2rem);font-weight:800;color:var(--ink);letter-spacing:-.5px;line-height:1.1;}
.stat-tile-label{color:#6b7280;font-weight:600;font-size:clamp(.8rem,2.5vw,.9rem);margin-top:.25rem;}

/* FAQ accordion */
.faq-accordion .accordion-button{background:#fff;font-size:clamp(.9rem,2.8vw,1rem);line-height:1.45;}
.faq-accordion .accordion-button:not(.collapsed){color:var(--brand);background:#f4f3ff;box-shadow:none;}
.faq-accordion .accordion-button:focus{box-shadow:none;border-color:transparent;}
.faq-accordion .accordion-item{background:#fff;}

/* Legal pages */
.legal-content h5{color:var(--ink);font-size:clamp(1rem,3vw,1.15rem);}
.legal-content p:last-child{margin-bottom:0;}

/* Contact map placeholder */
.map-placeholder{height:clamp(180px,40vw,240px);background:repeating-linear-gradient(45deg,#f3f4f8,#f3f4f8 14px,#eef0f6 14px,#eef0f6 28px);}

/* Pre-footer */
.pre-footer{background:#fff;border-top:1px solid #eef0f6;padding:clamp(2rem,5vw,3rem) 0;}
.pre-footer h5{font-size:clamp(1rem,3.5vw,1.25rem);}
.keyword-chip{
  display:inline-flex;align-items:center;background:#f4f3ff;color:var(--brand);
  border:1px solid #e6e2fb;border-radius:50px;
  padding:.35rem clamp(.65rem,3vw,.9rem);font-weight:600;
  font-size:clamp(.75rem,2.5vw,.85rem);text-decoration:none;
  transition:.2s ease;max-width:100%;line-height:1.3;
}
.keyword-chip:hover{background:var(--brand);color:#fff;border-color:var(--brand);transform:translateY(-2px);box-shadow:0 .5rem 1rem rgba(79,70,229,.2);}

/* Categories modal */
.cat-modal{z-index:10050!important;}
body.modal-open .modal-backdrop{z-index:10040!important;}
.cat-modal .modal-dialog{max-width:480px;margin:.75rem auto;}
.cat-modal-header{background:var(--brand-grad);}
.cat-modal-body{
  max-height:min(60vh,420px);overflow-y:auto;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
}
.cat-modal-item{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:.85rem 1.25rem;text-decoration:none;color:var(--ink);
  border-bottom:1px solid #eef0f6;transition:background .2s;
}
.cat-modal-item:last-child{border-bottom:none;}
.cat-modal-item:hover{background:#f4f3ff;color:var(--brand);}
.cat-modal-item-name{
  display:flex;align-items:center;gap:.6rem;font-weight:600;
  font-size:.95rem;min-width:0;word-break:break-word;
}
.cat-modal-item-name i{color:var(--brand);flex-shrink:0;}
.cat-modal-item-count{
  font-size:.8rem;font-weight:600;color:#6b7280;
  background:#f3f4f6;padding:.25rem .65rem;border-radius:50px;
  white-space:nowrap;flex-shrink:0;
}

/* Utilities */
.text-preline{white-space:pre-line;}
.cta-gradient{background:var(--brand-grad);}
.cta-block{padding:clamp(1.5rem,5vw,3rem)!important;}
.table-responsive{-webkit-overflow-scrolling:touch;}
.table-responsive .table{min-width:520px;}
.thumb-checkout{width:80px;height:60px;object-fit:cover;border-radius:.5rem;flex-shrink:0;}
.thumb-order{width:90px;height:70px;object-fit:cover;border-radius:.6rem;flex-shrink:0;}
.download-thumb{height:120px;width:100%;object-fit:cover;}
.nav-tabs-scroll{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
.nav-tabs-scroll::-webkit-scrollbar{display:none;}
.nav-tabs-scroll .nav-link{white-space:nowrap;}
.contact-form .btn{width:100%;}
@media (min-width:576px){.contact-form .btn{width:auto;}}

/* Projects page spacing */
.projects-page .projects-layout{--bs-gutter-y:.75rem;}
.projects-page .projects-grid > [class*="col-"]{margin-bottom:0!important;}
.projects-page .projects-pagination{margin-bottom:0;}
@media (max-width:991.98px){
  .projects-page .projects-filters{margin-top:0;padding-top:0;}
  .projects-page .projects-results{margin-bottom:0;}
  .projects-page .projects-layout{--bs-gutter-y:.5rem;}
}
@media (min-width:992px){
  .sticky-sidebar{top:5.5rem;}
  .projects-page .projects-layout{--bs-gutter-x:1rem;}
}

/* ── Responsive: tablet & mobile ── */
@media (max-width:991.98px){
  .hero h1,.hero .display-5{font-size:clamp(1.6rem,5.5vw,2.25rem);}
  .hero .hero-search .form-control{height:48px;}
  .hero .hero-search .btn{font-size:.875rem;padding-left:1rem;padding-right:1rem;}
  .hero-stats{justify-content:center;}
  .hero .lead{font-size:clamp(1rem,3.5vw,1.15rem);}

  .site-navbar .navbar-collapse{
    background:rgba(255,255,255,.08);
    border-radius:.75rem;padding:.75rem;margin-top:.5rem;
  }
  .site-navbar .navbar-search{margin:.5rem 0!important;width:100%;}
  .site-navbar .navbar-search .input-group{width:100%;}
  .site-navbar .navbar-auth,
  .site-navbar .d-flex.gap-2{
    padding-top:.25rem;
  }
  .site-navbar .navbar-auth .btn,
  .site-navbar .d-flex.gap-2 .btn,
  .site-navbar .dropdown{width:100%;}
  .site-navbar .dropdown-toggle{justify-content:center;}
  .site-navbar .dropdown-menu{width:100%;max-height:50vh;}

  .section-head .btn{width:100%;}
  @media (min-width:576px){.section-head .btn{width:auto;}}

  .site-footer{padding-top:clamp(2rem,6vw,3rem)!important;}
  .site-footer .footer-col{text-align:center;}
  .site-footer .footer-brand{justify-content:center;}
  .site-footer .footer-about{margin-left:auto;margin-right:auto;max-width:420px;}
  .site-footer .social-links{justify-content:center;}
  .site-footer .footer-heading{text-align:center;}
  .site-footer .footer-links a:hover{padding-left:0;}
  .pre-footer .btn{width:100%;max-width:320px;}
}

@media (min-width:992px){
  .hero-stats{justify-content:flex-start;}
  .footer-brand,.site-footer .footer-col-brand{text-align:left;}
  .footer-brand{justify-content:flex-start;}
  .social-links{justify-content:flex-start;}
  .site-footer .footer-heading{text-align:left;}
}

@media (max-width:767.98px){
  .site-footer .col-6{flex:0 0 100%;max-width:100%;}
  .category-card .card-body{gap:.75rem!important;}
  .gallery-thumb{width:72px;height:52px;}
  .breadcrumb{flex-wrap:wrap;}
  .page-hero h1,.page-hero .h3{font-size:clamp(1.1rem,4vw,1.35rem);}
  .display-6{font-size:clamp(1.5rem,6vw,2rem);}
}

@media (max-width:575.98px){
  .site-navbar .navbar-brand .site-logo--nav{height:30px;max-height:30px;}
  .project-card .card-actions{
    flex-direction:column;align-items:stretch!important;gap:.75rem;
  }
  .project-card .card-actions .btn{width:100%;}
  .project-card .price-wrap{text-align:center;}
  .list-group-item.d-flex{flex-wrap:wrap;gap:.5rem;}
  .site-footer .footer-col:not(.footer-col-brand){
    padding-top:1rem;margin-top:.25rem;
    border-top:1px solid rgba(255,255,255,.08);
  }
  .back-to-top{right:12px;bottom:12px;width:42px;height:42px;}
  .hero .hero-search .input-group{flex-wrap:nowrap;}
  .hero .hero-search .form-control{min-width:0;}
  .hero .hero-search .btn{flex-shrink:0;}
  .auth-wrap .card-body{padding:1.25rem!important;}
}

@media (min-width:576px) and (max-width:991.98px){
  .stat-tile{min-height:100%;}
}
