/* ==========================================================================
   HITCON ENGINEERING – MAIN STYLE SHEET
   ========================================================================== */

/* 1. THEME TOGGLE (floating button) -------------------------------------- */
.theme-toggle {
  position: fixed; top:1rem; right:1rem; z-index:100;
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:all .3s ease; box-shadow:0 2px 10px rgba(0,0,0,.1);
}
.dark .theme-toggle{ box-shadow:0 2px 10px rgba(0,0,0,.3); }

/* 2. DARK-MODE GLOBALS ---------------------------------------------------- */
.dark{ color-scheme:dark; }
.dark body            { background:#121826; color:#e2e8f0; }
.dark .bg-white       { background:#1e293b; }
.dark .bg-gray-50,
.dark .bg-gray-100    { background:#0f172a; }
.dark .text-gray-700,
.dark .text-gray-600  { color:#cbd5e1; }

/* 3. MOBILE MENU PANEL ---------------------------------------------------- */
.mobile-menu{
  position:fixed; top:0; left:0; height:100vh; width:85vw; max-width:320px;
  z-index:50; padding:1.5rem; overflow-y:auto;
  background:#fff; box-shadow:2px 0 10px rgba(0,0,0,.1);
  transform:translateX(-100%); transition:transform .3s ease-in-out;
}
.mobile-menu.open{ transform:translateX(0); }
.dark .mobile-menu{ background:#1e293b; box-shadow:2px 0 10px rgba(0,0,0,.3); }

.mobile-menu-overlay{
  position:fixed; inset:0; z-index:40;
  background:rgba(0,0,0,.5); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none; transition:opacity .3s ease;
}
.mobile-menu-overlay.open{ opacity:1; pointer-events:auto; }

/* 4. LAZY-LOAD IMAGES ----------------------------------------------------- */
img.lazy-load{ opacity:0; transition:opacity .5s ease; }
img.lazy-load.loaded{ opacity:1; }

.loading-skeleton{
  background:linear-gradient(90deg,rgba(226,232,240,.1)25%,rgba(226,232,240,.3)50%,rgba(226,232,240,.1)75%);
  background-size:200% 100%; animation:shimmer 1.5s infinite; border-radius:.375rem;
}
.dark .loading-skeleton{
  background:linear-gradient(90deg,rgba(30,41,59,.7)25%,rgba(30,41,59,.9)50%,rgba(30,41,59,.7)75%);
  background-size:200% 100%;
}
@keyframes shimmer{0%{background-position:200% 0;}100%{background-position:-200% 0;}}

/* 5. FOCUS VISIBLE -------------------------------------------------------- */
:focus-visible{ outline:2px solid #3b82f6!important; outline-offset:2px!important; }

/* 6. TYPOGRAPHY (mobile) -------------------------------------------------- */
@media(max-width:640px){
  h1{font-size:1.875rem!important;}
  h2{font-size:1.5rem!important;}
  h3{font-size:1.25rem!important;}
  p {font-size:.9375rem!important;}
}

/* 7. FORMS ---------------------------------------------------------------- */
input,select,textarea{
  width:100%; padding:.625rem; border-radius:.375rem;
  border:1px solid #e2e8f0; background:#f8fafc; transition:all .3s ease;
}
.dark input,.dark select,.dark textarea{ background:#334155; border-color:#475569; color:#f1f5f9; }
input:focus,select:focus,textarea:focus{ border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.25); }

/* 8. BUTTONS -------------------------------------------------------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:.375rem; font-weight:600; padding:.5rem 1rem; transition:all .3s ease;
}
.btn-primary   { background:#1a365d; color:#fff; }
.btn-primary:hover{ background:#1e429f; }
.btn-secondary { background:#f97316; color:#fff; }
.btn-secondary:hover{ background:#ea580c; }
.dark .btn-primary{ background:#2563eb; }
.dark .btn-primary:hover{ background:#1d4ed8; }

/* 9. PRINT OVERRIDES ------------------------------------------------------ */
@media print{
  .no-print{display:none!important;}
  body{font-size:12pt;}
  a{ text-decoration:none; color:#000; }
  .container{width:100%!important; max-width:100%!important;}
}

/* 10. SECTION SPACING ----------------------------------------------------- */
section{padding:4rem 0;}
@media(max-width:768px){section{padding:2rem 0;}}

/* 11. PAGE-LOADING OVERLAY ------------------------------------------------ */
.page-loading-overlay{
  position:fixed; inset:0; background:#fff; z-index:9999;
  display:flex; align-items:center; justify-content:center;
  transition:opacity .5s ease,visibility .5s ease;
}
.dark .page-loading-overlay{background:#0f172a;}
.page-loading-overlay.loaded{opacity:0; visibility:hidden;}

.loader{
  width:80px; height:80px; border:5px solid rgba(26,54,93,.2);
  border-radius:50%; border-top-color:#1a365d; animation:spin 1s linear infinite;
}
.dark .loader{ border-color:rgba(59,130,246,.2); border-top-color:#3b82f6; }
@keyframes spin{to{transform:rotate(360deg);}}

/* 12. SERVICES CARD GRID -------------------------------------------------- */
.service-card{
  position:relative; background:#fff; border-radius:.75rem; overflow:hidden;
  box-shadow:0 4px 6px rgba(0,0,0,.1); transition:all .3s cubic-bezier(.22,1,.36,1);
  transform:translateY(0); height:100%; display:flex; flex-direction:column;
}
.dark .service-card{background:#1e293b;}
.service-card:hover,.service-card:focus{transform:translateY(-8px);box-shadow:0 12px 24px rgba(0,0,0,.15);}
.card-content{padding:2rem; display:flex; flex-direction:column; height:100%;}
.service-icon{width:4rem; height:4rem; background:#1a365d; border-radius:50%; display:flex; align-items:center; justify-content:center; margin-bottom:1.5rem; transition:transform .3s ease;}
.dark .service-icon{background:#2563eb;}
.service-card:hover .service-icon{transform:scale(1.1);}
.service-icon i{ font-size:1.5rem; color:#fff; }
.service-title{ font-size:1.25rem; font-weight:700; color:#1a365d; margin-bottom:1rem; transition:color .3s ease;}
.dark .service-title{ color:#3b82f6; }
.service-card:hover .service-title{ color:#f97316; }
.service-description{ margin:.5rem 0 1.5rem; }
.service-list{ list-style:none; padding:0; margin:0; }
.service-list li{ padding:.5rem 0; border-bottom:1px dashed rgba(0,0,0,.1); color:#4b5563; font-size:.9rem; display:flex; align-items:center;}
.dark .service-list li{ color:#e2e8f0; border-bottom-color:rgba(255,255,255,.1);}
.service-list li:last-child{ border-bottom:none; }
.service-list li:before{ content:'•'; color:#f97316; font-weight:bold; display:inline-block; width:1em; margin-right:.5rem;}
.service-button{ display:flex; align-items:center; justify-content:center; gap:.5rem; margin-top:auto; background:transparent; border:none; color:#1a365d; font-weight:600; padding:.5rem; cursor:pointer; transition:all .3s ease; border-radius:.375rem;}
.dark .service-button{color:#3b82f6;}
.service-button:hover{color:#f97316; background:rgba(249,115,22,.1);}
.service-button.expanded{color:#f97316;}
.grid-cols-3>.service-card{break-inside:avoid; page-break-inside:avoid; height:auto;}
@media(max-width:768px){ .service-card{height:auto;} }

/* 13. ABOUT SECTION LIST ICONS ------------------------------------------- */
.service-icon-small{
  width:2.5rem; height:2.5rem; background:#1a365d; border-radius:50%;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:transform .2s ease;
}
.dark .service-icon-small{background:#2563eb;}
.service-icon-small i{font-size:1rem; color:#fff;}
.service-item{padding:1rem; border-radius:.5rem; transition:all .3s ease;}
.service-item:hover{background:rgba(26,54,93,.05);}
.dark .service-item:hover{background:rgba(59,130,246,.1);}
.service-item:hover .service-icon-small{transform:scale(1.1);background:#f97316;}

/* 14. NAVIGATION RULES (added for new header) ----------------------------- */
.nav-link{position:relative;transition:color .3s ease;}
.nav-link:hover::after{content:'';position:absolute;bottom:-4px;left:0;right:0;height:2px;background:#f97316;}

.navbar-logo img{width:40px;height:40px;}
@media(max-width:640px){.navbar-logo img{width:32px;height:32px;}
 .logo-text{font-size:.875rem;}}

.mobile-menu-item{transition:all .2s ease;}
.mobile-menu-item:hover{background:rgba(249,115,22,.1);border-radius:.375rem;padding-left:1rem;}
