/* =========================================================
   Gerald's Tech — Neo Gradient Theme (v3.0)
   ========================================================= */

/* ---------- Theme Tokens ---------- */
:root {
  /* Background layers */
  --bg-0: #0d1b2a;   /* deep navy */
  --bg-1: #1b263b;   /* dark slate */
  --bg-2: #24344d;   /* elevated panels */

  /* Text */
  --text-0: #f8f9fa; /* bright white */
  --text-1: #cfd8e3; /* muted white */
  --muted:  #8ea3b9;

  /* Borders / lines */
  --line: #2f3e57;

  /* Brand accents */
  --brand: #4cc9f0;         /* electric teal */
  --brand-strong: #4361ee;  /* blue accent */
  --brand-alt: #7209b7;     /* purple accent */

  /* Status colors */
  --danger: #ef476f;
  --success: #06d6a0;

  /* FX */
  --shadow: 0 8px 24px rgba(0,0,0,.45);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Spacing */
  --space: clamp(14px, 2.2vw, 22px);
  --space-lg: clamp(22px, 3vw, 32px);
  --space-xl: clamp(28px, 4vw, 44px);

  /* Typography weights */
  --fw-bold: 700;
  --fw-med: 600;
  --fw-reg: 500;
  --fw-norm: 400;
}

/* ---------- Base Reset ---------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg-0);
  color:var(--text-0);
  font-family: Inter, Segoe UI, Roboto, Arial, system-ui, sans-serif;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* ---------- Typography ---------- */
h1,h2,h3{line-height:1.25;margin:0 0 .6em}
h1{font-size:clamp(28px,4.6vw,40px); letter-spacing:.2px;}
h2{font-size:clamp(22px,3.2vw,28px); color:var(--text-0)}
h3{font-size:clamp(18px,2.6vw,22px); color:var(--text-0)}
p{margin:.7em 0; color:var(--text-1)}
strong{color:var(--text-0)}
small,.muted{color:var(--muted)}

/* ---------- Layout Containers ---------- */
.content{ padding: var(--space-lg); }
.container, .news{
  max-width: clamp(680px, 80%, 900px);
  margin: 30px auto;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 32px);
  box-shadow: var(--shadow);
}

/* Sections & Grid */
.section{ margin-top: var(--space-xl); }
.section .section-lead{ color: var(--text-1); margin-bottom:.6em; }
.grid{ display:grid; gap: var(--space); }
.grid.cols-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width:900px){ .grid.cols-2,.grid.cols-3{ grid-template-columns:1fr; } }

/* ---------- Header / Hero ---------- */
header{
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-bottom:1px solid var(--line);
  padding: clamp(16px,3vw,28px);
  text-align:center;
}
header h1{ color:#fff; font-weight:var(--fw-bold); }
header p{ color:var(--text-1); max-width:900px; margin:8px auto 0; }

/* ---------- Navbar ---------- */
.navbar{
  position: sticky; top:0; z-index:100;
  background: rgba(18,26,40,.85);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom:1px solid var(--line);
}
.nav-container{
  max-width:1200px; margin:0 auto;
  display:flex; justify-content:center; align-items:center;
  gap:8px; flex-wrap:wrap; padding:12px 18px;
}
.nav-left,.nav-right{display:flex; align-items:center; gap:12px;}

/* Brand */
.nav-brand{
  color:#fff; text-decoration:none; font-weight:var(--fw-bold);
  letter-spacing:.3px;
}

/* ---------- Premium Nav Links ---------- */
.nav-link, .nav-brand{
  position:relative;
  padding:8px 16px;
  border-radius:12px;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color:var(--text-0);
  text-decoration:none;
  font-weight:var(--fw-med);
  border:1px solid var(--line);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 10px 22px rgba(0,0,0,.35),
    0 4px 8px rgba(0,0,0,.25);
  transform: translateY(0);
  transition: all .2s ease;
}
.nav-link::before, .nav-brand::before{
  content:"";
  position:absolute; top:2px; left:10px; right:10px; height:28%;
  border-radius:10px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  pointer-events:none; opacity:.7;
}
.nav-link:hover, .nav-brand:hover{
  background: linear-gradient(135deg, var(--brand), var(--brand-alt));
  color:#fff;
  transform: translateY(-2px);
  box-shadow:0 6px 16px rgba(0,0,0,.4);
}
.nav-link::after, .nav-brand::after{
  content:"";
  position:absolute; left:12px; right:12px; bottom:6px; height:2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  transform: scaleX(.5); opacity:0;
  transition: .2s ease;
}
.nav-link:hover::after, .nav-brand:hover::after{
  transform: scaleX(1); opacity:1;
}
.nav-link.active{ background: var(--brand-strong); color:#fff; }

/* ---------- Dropdown ---------- */
.dropdown{ position:relative; }
.dropdown-toggle::after{ content:' ▾'; margin-left:4px; font-size:.9em; color:var(--muted); }
.dropdown-menu{
  position:absolute; top:100%; left:0; min-width:200px;
  display:none; flex-direction:column;
  background:var(--bg-1); border:1px solid var(--line);
  border-radius:var(--radius-sm);
  box-shadow:0 18px 34px rgba(0,0,0,.5);
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu{ display:flex; }
.dropdown-menu .nav-link{
  margin:4px 6px; padding:8px 12px; border-radius:10px;
  background: var(--bg-2);
  border:1px solid var(--line);
}
.dropdown-menu .nav-link:hover{
  background: linear-gradient(135deg, var(--brand), var(--brand-alt));
  color:#fff;
}

/* ---------- Cards ---------- */
.card{
  background:var(--bg-1); border:1px solid var(--line);
  border-radius:var(--radius); padding:var(--space); box-shadow:var(--shadow);
}
.card h3{ margin-top:4px; }

/* ---------- Buttons ---------- */
button,.btn{
  display:inline-block; padding:10px 18px; font-size:1rem; font-weight:600;
  border-radius:8px; cursor:pointer;
  transition:all .2s ease-in-out;
  background:var(--bg-2); color:var(--text-0);
  border:1px solid var(--line);
}
button.primary,.btn.primary{
  background: linear-gradient(135deg, var(--brand), var(--brand-alt));
  color:#fff; border:none;
}
button.primary:hover{ background: linear-gradient(135deg, var(--brand-alt), var(--brand)); transform:translateY(-2px); }
button.secondary:hover{ background:#2f405c; transform:translateY(-2px); }
button.danger,.btn.danger{ background:var(--danger); color:#fff; }
button.danger:hover{ background:#d63355; }

/* ---------- Forms ---------- */
input,textarea,select{
  width:100%; padding:12px;
  background:var(--bg-2); color:var(--text-0);
  border:1px solid var(--line); border-radius:10px;
}
input:focus,textarea:focus,select:focus{
  border-color:var(--brand); box-shadow:0 0 0 3px rgba(76,201,240,.2);
}

/* ---------- Tables ---------- */
table{
  width:100%; border-collapse:separate; border-spacing:0;
  background:var(--bg-1); border:1px solid var(--line);
  border-radius:var(--radius);
}
th{ background:var(--bg-2); color:#fff; font-weight:var(--fw-med); }
tr:hover td{ background:rgba(76,201,240,.05); }

/* ---------- Footer ---------- */
.site-footer{
  margin-top: var(--space-xl);
  background:var(--bg-1); color:var(--text-1);
  text-align:center; padding:18px; border-top:1px solid var(--line);
}

/* ---------- Hero Banner ---------- */
.hero-banner {
  background: linear-gradient(rgba(13,27,42,0.8), rgba(27,38,59,0.8)), 
              url("https://via.placeholder.com/1600x600?text=Tech+Background") no-repeat center center/cover;
  color: #fff;
  text-align: center;
  padding: 5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}
.hero-content h1{ font-size: 2.8rem; font-weight:700; }
.hero-content p{ font-size:1.2rem; }

/* ---------- Accessibility ---------- */
:focus-visible{ outline:3px solid var(--brand); outline-offset:2px; border-radius:8px; }

/* ---------- Mobile ---------- */
@media (max-width:820px){
  .content{ padding:12px; }
  .container{ padding:18px; border-radius:10px; }
  .nav-right{ display:none; flex-direction:column; }
  .nav-right.is-open{ display:flex; }
  .nav-link, .nav-brand{ width:100%; padding:12px 14px; }
}

/* Service card images */
.service-img { width: 100%; height: 180px; border-radius: 10px; margin-bottom: 12px; }
/* Card images (generic) */
.card img { width: 100%; /* fills the card width */ height: auto; /* keeps correct proportions */ max-height: 180px; /* keeps it from being too tall */ object-fit: contain; /* ensures the full image shows inside */ border-radius: 8px; /* optional, matches your card style */ margin-bottom: 12px; }

/* ---------- Hero Buttons ---------- */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
  padding: 0.9rem 1.6rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

/* Gradient primary button */
.hero-buttons .btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-alt));
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35);
}
.hero-buttons .btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-alt), var(--brand));
  transform: translateY(-2px);
}

/* Clean secondary button */
.hero-buttons .btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}
.hero-buttons .btn-secondary:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-2px);
}

html { scroll-behavior: smooth; }

/* Base visibility helpers */
.desktop-only { display: flex; }
@media (max-width: 900px){
  .desktop-only { display: none; }
}

/* Hamburger */
.hamburger{
  display:none;
  position: relative;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 10px;
  cursor: pointer;
  align-items:center; justify-content:center;
}
.hamburger .bar{
  display:block; width:22px; height:2px; background: var(--text-0);
  margin:4px 0; transition: transform .25s ease, opacity .2s ease;
  border-radius: 2px;
}

@media (max-width: 900px){
  .hamburger{ display:flex; }
}

/* Morph into X when active */
.hamburger.is-active .bar:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.hamburger.is-active .bar:nth-child(2){ opacity:0; }
.hamburger.is-active .bar:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* Overlay */
.mobile-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.mobile-overlay.is-open{
  opacity: 1; pointer-events: auto;
}

/* Drawer */
.mobile-drawer{
  position: fixed;
  top: 0; right: 0;
  width: min(86vw, 360px);
  height: 100vh;
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(0,0,0,.45);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 1000;
  display: flex; flex-direction: column;
  padding: 16px;
}
.mobile-drawer.is-open{ transform: translateX(0); }

/* Drawer header */
.mobile-header{
  display:flex; align-items:center; justify-content:space-between;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text-0); font-weight: var(--fw-med);
}
.close-drawer{
  background: transparent; border: 0; color: var(--text-0);
  font-size: 28px; line-height: 1; cursor: pointer;
}

/* Drawer links */
.m-link, .m-sublink{
  display:block;
  color: var(--text-0);
  text-decoration:none;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.m-link:hover{ 
  background: linear-gradient(135deg, var(--brand), var(--brand-alt));
  color: #fff; transform: translateX(2px);
}

/* Accordion */
.m-accordion{
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 6px 0;
  overflow: hidden;
}
.m-accordion > summary{
  list-style: none;
  padding: 12px 10px;
  cursor: pointer;
  color: var(--text-0);
  background: var(--bg-2);
}
.m-accordion[open] > summary{
  background: linear-gradient(135deg, var(--brand-strong), var(--brand-alt));
  color: #fff;
}
.m-accordion .m-sublink{
  padding-left: 18px;
  border-top: 1px solid var(--line);
}
.m-accordion .m-sublink:hover{
  background: rgba(76,201,240,.12);
}

/* Prevent body scroll when drawer is open */
.body-lock{
  overflow: hidden;
}

.news-section {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  padding: 40px 0;
  background: #121212;   /* make this slightly darker than your main background */
  text-align: center;
}

.news-section .section-title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #fff;
}

/* Make cards equal height and use vertical layout */
.news-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: stretch; /* all cards equal height */
}

.news-cards .card {
  display: flex;
  flex-direction: column;  /* stack content vertically */
  flex: 1 1 320px;
  max-width: 380px;
}

.news-cards .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* body fills available height */
}


.news-cards .card-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #fff;
}

.news-cards .card-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 10px;
  color: #ddd;
}

.news-cards .card-list {
  margin: 10px 0 15px;
  padding-left: 20px;
}

.news-cards .card-list li {
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: #ccc;
}

.news-cards .btn {
  display: inline-block;
  background: var(--accent-color, #0078d4);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
}

.news-cards .btn:hover {
  background: #005a9e;
}

.news-cards .card-footer {
  margin-top: auto;   /* 👈 pushes footer to bottom */
  padding-top: 12px;
}