/* =========================
   GLOBAL THEME
========================= */
:root{
  --bg:#0b1020;
  --bg2:#05060a;
  --card:#0f1724;
  --card2:rgba(15,23,36,.55);
  --accent:#00d4ff;
  --text:#dbeafe;
  --muted:rgba(219,234,254,.78);
  --line:rgba(255,255,255,.06);
  --shadow:0 0 18px rgba(0,212,255,.10);
  --radius:16px;
  --gap:clamp(12px,2vw,28px);
  --container: min(1180px, 88vw);
  font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,'Segoe UI',Roboto,Arial;
  background:linear-gradient(180deg,var(--bg2) 0%, #071028 60%, #05060a 100%);
}

/* Better defaults */
a{color:inherit}
img{max-width:100%;height:auto;border-radius:12px}
.container{width:var(--container);margin-inline:auto}

/* =========================
   HEADER / NAV
========================= */
header{
  width:100%;
  padding:18px 6%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background:rgba(5,6,10,.35);
}

.logo{
  display:flex;
  gap:12px;
  align-items:center;
  min-width:220px;
}
.logo img{height:48px;border-radius:0}

nav{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

nav a{
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  opacity:.9;
  padding:8px 10px;
  border-radius:10px;
  transition:color .2s ease, background .2s ease, opacity .2s ease;
}
nav a:hover{
  opacity:1;
  color:var(--accent);
  background:rgba(0,212,255,.08);
}

/* ✅ Navbar Clock (place inside header on the right) */
.nav-clock{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid rgba(0,212,255,.18);
  background:rgba(15,23,36,.35);
  box-shadow:0 0 14px rgba(0,212,255,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-clock .time{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight:800;
  letter-spacing:.6px;
  color:var(--accent);
  text-shadow:0 0 10px rgba(0,212,255,.35);
  font-size:13px;
}
.nav-clock .tz{
  font-size:12px;
  opacity:.7;
  color:var(--text);
}

/* =========================
   HERO
========================= */
.hero{
  padding:64px 6%;
  display:flex;
  gap:40px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
}

h1{
  font-size:clamp(28px,4vw,48px);
  margin:0 0 8px;
  color:var(--accent);
  text-shadow:0 0 18px rgba(0,212,255,0.35);
  letter-spacing:.2px;
}

p.lead{
  opacity:.92;
  margin:0 0 18px;
  max-width:62ch;
  line-height:1.7;
  color:var(--muted);
}

.ctas{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
}

.btn{
  background:var(--accent);
  border:none;
  color:#001018;
  padding:12px 18px;
  border-radius:12px;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  box-shadow:0 0 18px rgba(0,212,255,.18);
}
.btn:hover{transform:translateY(-2px)}
.btn:active{transform:translateY(0)}
.btn.ghost{
  background:transparent;
  border:1px solid rgba(0,212,255,.50);
  color:var(--accent);
  box-shadow:none;
}
.btn.ghost:hover{
  background:rgba(0,212,255,.08);
}

/* =========================
   SECTIONS / CARDS / GRID
========================= */
.grid{
  display:grid;
  gap:var(--gap);
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}

.card{
  background:rgba(15,23,36,.75);
  border:1px solid rgba(255,255,255,.05);
  padding:18px;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover{
  transform:translateY(-6px);
  border-color:rgba(0,212,255,.28);
  box-shadow:
    0 0 22px rgba(0,212,255,.18),
    0 0 60px rgba(0,212,255,.08);
}

/* =========================
   FORMS
========================= */
form{display:grid;gap:12px}
input,textarea{
  padding:11px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.03);
  color:var(--text);
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}
input:focus,textarea:focus{
  border-color:rgba(0,212,255,0.50);
  box-shadow:0 0 0 3px rgba(0,212,255,0.10);
}
textarea{min-height:120px}

/* =========================
   FOOTER
========================= */
footer{
  padding:22px 6%;
  border-top:1px solid rgba(255,255,255,0.03);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  background:rgba(5,6,10,.9);
}

/* =========================
   PRELOADER
========================= */
#preloader{
  position:fixed;
  inset:0;
  background:var(--bg);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
  box-shadow:
    inset 0 0 120px rgba(0,212,255,.25),
    0 0 50px rgba(0,212,255,.15);
}
#preloader video{
  max-width:80%;
  height:auto;
  border:2px solid rgba(0,212,255,.65);
  border-radius:16px;
  box-shadow:0 0 30px rgba(0,212,255,.35);
}

/* =========================
   SERVICES IMAGE PATCH
========================= */
#services .card img{
  width:75%;
  max-width:240px;
  height:auto;
  display:block;
  margin:16px auto 10px;
  border-radius:14px;
  object-fit:contain;
}

/* =========================
   BLOG / LATEST NEWS (CLEAN & STABLE)
   ✅ Removes conflicting rules and uses a stable grid
========================= */
#blog{padding:10px 0 40px}

/* your HTML uses: #blog .row.m-5 */
#blog .row.m-5{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:18px !important;
  margin:24px 6% !important;
  padding:0 !important;
}

/* grid items */
#blog .row.m-5 > .col-md-4{
  width:100% !important;
  max-width:none !important;
  padding:16px 16px 14px !important;

  background:var(--card2);
  border:1px solid rgba(0,212,255,0.14);
  border-radius:16px;
  box-shadow:0 0 18px rgba(0,212,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:100%;

  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#blog .row.m-5 > .col-md-4:hover{
  transform:translateY(-6px);
  border-color:rgba(0,212,255,0.38);
  box-shadow:
    0 0 22px rgba(0,212,255,0.22),
    0 0 60px rgba(0,212,255,0.12);
}

/* thumbnails */
#blog .row.m-5 > .col-md-4 img{
  width:100% !important;
  height:160px !important;
  object-fit:cover !important;
  border-radius:12px !important;
  margin:0 0 12px 0 !important;

  transform:scale(1);
  transition:transform .35s ease, filter .35s ease;
  filter:saturate(1.05) contrast(1.03);
}
#blog .row.m-5 > .col-md-4:hover img{
  transform:scale(1.06);
  filter:saturate(1.12) contrast(1.08);
}

/* title */
#blog .row.m-5 > .col-md-4 h5{
  margin:6px 0 8px !important;
  font-size:16px;
  line-height:1.3;
  font-weight:900;
}
#blog .row.m-5 > .col-md-4 h5 a{
  color:var(--text) !important;
  text-decoration:none !important;
}
#blog .row.m-5 > .col-md-4 h5 a:hover{
  color:var(--accent) !important;
}

/* description clamp */
#blog .row.m-5 > .col-md-4 p{
  margin:0 0 10px !important;
  opacity:.9;
  font-size:13px;
  line-height:1.55;

  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* footer/date pushed down */
#blog .row.m-5 > .col-md-4 .card-footer,
#blog .row.m-5 > .col-md-4 small{
  margin-top:auto !important;
  opacity:.75;
  font-size:12px;
}

/* =========================
   CYBER HOLOGRAM CLOCK (CLEANED)
========================= */
.cyber-clock{display:flex;align-items:center;justify-content:center}

/* hologram clock container */
.clock.holo{
  width:128px;
  height:128px;
  position:relative;
  border-radius:50%;
  overflow:hidden;

  background:rgba(15,23,36,0.35);
  border:1px solid rgba(0,212,255,0.25);
  box-shadow:
    0 0 18px rgba(0,212,255,0.25),
    inset 0 0 24px rgba(0,212,255,0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  animation:holoPulse 2.4s ease-in-out infinite;
}

@keyframes holoPulse{
  0%,100%{
    box-shadow:0 0 18px rgba(0,212,255,0.20),
               inset 0 0 24px rgba(0,212,255,0.10);
  }
  50%{
    box-shadow:0 0 28px rgba(0,212,255,0.35),
               inset 0 0 30px rgba(0,212,255,0.14);
  }
}

/* ring */
.clock.holo .ring{
  position:absolute;
  inset:-6px;
  border-radius:50%;
  border:3px solid rgba(0,212,255,0.55);
  filter:drop-shadow(0 0 10px rgba(0,212,255,0.45));
  opacity:0.9;
  animation:ringSpin 5s linear infinite;
  pointer-events:none;
}
@keyframes ringSpin{to{transform:rotate(360deg)}}

/* ticks */
.clock.holo .ticks{
  position:absolute;
  inset:10px;
  border-radius:50%;
  background:
    repeating-conic-gradient(
      from -90deg,
      rgba(0,212,255,0.95) 0 2deg,
      rgba(0,212,255,0.06) 2deg 30deg
    );
  -webkit-mask: radial-gradient(circle, transparent 0 60%, #000 61%);
  mask: radial-gradient(circle, transparent 0 60%, #000 61%);
  opacity:0.75;
  filter:drop-shadow(0 0 6px rgba(0,212,255,0.45));
  pointer-events:none;
}

/* radar scan */
.clock.holo .scan{
  position:absolute;
  inset:0;
  border-radius:50%;
  background:conic-gradient(
    from -90deg,
    rgba(0,212,255,0.00) 0deg,
    rgba(0,212,255,0.00) 300deg,
    rgba(0,212,255,0.22) 330deg,
    rgba(0,212,255,0.00) 360deg
  );
  animation:scanSpin 2.2s linear infinite;
  mix-blend-mode:screen;
  pointer-events:none;
}
@keyframes scanSpin{to{transform:rotate(360deg)}}

/* center logo */
.clock-logo{
  position:absolute;
  width:44px;
  height:44px;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  object-fit:contain;
  opacity:0.92;
  filter:drop-shadow(0 0 8px rgba(0,212,255,0.60));
  z-index:2;
}

/* hands */
.clock.holo .hand{
  position:absolute;
  bottom:50%;
  left:50%;
  transform-origin:bottom;
  transform:translateX(-50%) rotate(0deg);
  border-radius:6px;
  z-index:4;
}
.clock.holo .hour{width:4px;height:30px;background:rgba(255,255,255,0.92)}
.clock.holo .minute{width:3px;height:44px;background:rgba(219,234,254,0.92)}
.clock.holo .second{
  width:2px;height:52px;background:var(--accent);
  box-shadow:0 0 12px rgba(0,212,255,0.6)
}

/* center dot */
.clock.holo .center-dot{
  width:8px;height:8px;
  background:var(--accent);
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  border-radius:50%;
  z-index:5;
  box-shadow:0 0 10px rgba(0,212,255,0.7);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width:992px){
  #blog .row.m-5{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}

@media (max-width:768px){
  header{
    flex-direction:column;
    gap:12px;
    text-align:center;
    padding:16px 6%;
  }
  nav{justify-content:center}
  .hero{padding:34px 6%}
  #services .card img{width:85%;max-width:180px}
  .nav-clock{justify-content:center}
  .clock.holo{width:112px;height:112px}
  .clock-logo{width:38px;height:38px}
  .clock.holo .second{height:46px}
  .clock.holo .minute{height:38px}
  .clock.holo .hour{height:26px}
}

@media (max-width:576px){
  #blog .row.m-5{
    grid-template-columns:1fr !important;
    margin:18px 6% !important;
  }
  #blog .row.m-5 > .col-md-4 img{height:140px !important;}
}

/* ===== FIXED TOP RIGHT CLOCK ===== */
.fixed-clock{
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 999;
  pointer-events: none; /* prevents blocking menu clicks */
  opacity: 0.95;
}

/* smaller & more professional */
.fixed-clock .clock.holo{
  width: 90px;
  height: 90px;
}

/* subtle glow for professional feel */
.fixed-clock .clock.holo{
  box-shadow:
    0 0 14px rgba(0,212,255,0.25),
    inset 0 0 18px rgba(0,212,255,0.08);
}

/* hide on very small screens */
@media (max-width:600px){
  .fixed-clock{
    top: 10px;
    right: 12px;
    opacity: .75;
  }
  .fixed-clock .clock.holo{
    width: 70px;
    height: 70px;
  }
}
