/* ===================================================== */
/* GLOBAL STYLES */
/* ===================================================== */

html {
  scroll-behavior: smooth;
}

body {
  padding-top: 76px;
  overflow-x: hidden;
}

section {
  position: relative;
}

/* ===================================================== */
/* NAVBAR */
/* ===================================================== */

.navbar {
  transition:
    background-color 0.4s ease,
    box-shadow 0.4s ease;
}

.brand-text {
  line-height: 1.1;
}

.tagline {
  font-size: 1rem;
  color: #adb5bd;
  font-style: italic;
}

.nav-link {
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #0d6efd !important;
}

/* ===================================================== */
/* HERO SECTIONS (Unified) */
/* ===================================================== */

/* Index Hero */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #333;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.01);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Page Heroes (Blogs, Contact, Services) */
.blogs-hero,
.contact-hero,
.services-hero,
.blog-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.blogs-hero,
.services-hero {
  text-align: center;
}
.contact-hero {
  text-align: center;
  min-height: 70vh;
}
.blogs-hero {
  min-height: 75vh;
}
.services-hero {
  min-height: 85vh;
}
.blog-hero {
  min-height: 75vh;
}

/* Specific Hero Backgrounds */
.blogs-hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.15)),
    url("../assets/images/services_1.png");
}
.contact-hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
    url("../assets/images/services_4.png");
}
.services-hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.15)),
    url("../assets/images/services_1.png");
}

/* Individual Blog Article Backgrounds */
.bg-ros2 {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
    url("../assets/images/services_1.png");
}
.bg-pcb {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
    url("../assets/images/services_2.png");
}
.bg-esp32 {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
    url("../assets/images/services_3.png");
}
.bg-gazebo {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
    url("../assets/images/services_4.png");
}

.bg-slam {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
    url("../assets/images/services_1.png");
}
/* ===================================================== */
/* SERVICES & CARDS */
/* ===================================================== */

/* Index Services */
.service-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 35px rgba(13, 110, 253, 0.18);
}

.service-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.12);
  transition:
    transform 0.7s ease,
    filter 0.5s ease;
}

.service-card:hover .service-bg-img {
  transform: scale(1.06);
  filter: brightness(1.2);
}

.service-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72),
    rgba(0, 0, 0, 0.25),
    rgba(0, 0, 0, 0.04)
  );
  z-index: 1;
}

.service-content {
  position: relative;
  z-index: 2;
}

.service-content p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

/* Services Page Utilities */
.service-showcase img {
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease;
}

.service-showcase img:hover {
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(13, 110, 253, 0.2);
}

.service-number {
  letter-spacing: 2px;
}

.tech-badge {
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.tech-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(13, 110, 253, 0.2);
}

/* ===================================================== */
/* BLOGS GRID & COMPONENTS */
/* ===================================================== */

.featured-blog,
.blog-card,
.related-card {
  overflow: hidden;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.featured-blog:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 35px rgba(13, 110, 253, 0.18);
}

.blog-card:hover,
.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(13, 110, 253, 0.15);
}

.featured-blog img {
  height: 100%;
  object-fit: cover;
}
.blog-card img {
  height: 240px;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.related-card img {
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover img,
.related-card:hover img {
  transform: scale(1.05);
}

.category-pill {
  padding: 10px 20px;
  border-radius: 999px;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.category-pill:hover {
  transform: translateY(-2px);
}

/* ===================================================== */
/* INDIVIDUAL BLOG POST CONTENT */
/* ===================================================== */

.blog-content {
  font-size: 1.08rem;
  line-height: 1.9;
  color: #cfcfcf;
}

.blog-content p {
  margin-bottom: 1.8rem;
}
.blog-content h2,
.blog-content h3 {
  margin-top: 3rem;
  margin-bottom: 1.2rem;
  color: white;
  font-weight: 700;
}

.blog-content img {
  width: 100%;
  border-radius: 24px;
  margin: 2rem 0;
}

.blog-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
  /* Default color, overridden by specific pages if needed */
  color: #0d6efd;
}

.blog-content pre {
  background: #0f172a;
  padding: 1.5rem;
  border-radius: 18px;
  overflow-x: auto;
  margin: 2rem 0;
}

.blog-content pre code {
  background: transparent;
  color: #f8f9fa;
}

.blog-content blockquote {
  border-left: 4px solid #0d6efd;
  padding-left: 1rem;
  margin: 2rem 0;
  color: #adb5bd;
  font-style: italic;
}

.toc-card {
  position: sticky;
  top: 120px;
}

.toc-card a {
  color: #adb5bd;
  text-decoration: none;
  transition: 0.3s ease;
}

.toc-card a:hover {
  color: #0d6efd;
}

/* ===================================================== */
/* CONTACT PAGE */
/* ===================================================== */

.contact-card {
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(13, 110, 253, 0.15);
}

.contact-icon {
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  font-size: 1.5rem;
}

.contact-form {
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.form-control,
.form-select {
  padding: 14px 16px;
}

.form-control:focus,
.form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

textarea.form-control {
  min-height: 160px;
}

.map-container {
  overflow: hidden;
  border-radius: 24px;
}

.map-container iframe {
  width: 100%;
  height: 420px;
  border: 0;
}

/* ===================================================== */
/* SHARED UTILITIES */
/* ===================================================== */

.cta-section {
  background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.12),
    rgba(0, 0, 0, 0.95)
  );
}

/* ===================================================== */
/* FOOTER */
/* ===================================================== */

.footer-link {
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.footer-link:hover {
  color: #0d6efd !important;
  transform: translateX(4px);
}

.social-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #adb5bd;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #0d6efd;
  color: white;
  transform: translateY(-4px);
}

/* ===================================================== */
/* RESPONSIVE */
/* ===================================================== */

@media (max-width: 768px) {
  .hero-section {
    min-height: 90vh;
  }
  .blogs-hero {
    min-height: 65vh;
  }
  .blogs-hero h1,
  .contact-hero h1,
  .services-hero h1,
  .blog-hero h1 {
    font-size: 2.5rem;
  }
  .contact-hero {
    min-height: 60vh;
  }
  .services-hero {
    min-height: 75vh;
  }
  .service-card {
    min-height: 320px;
  }
  .service-content {
    padding: 2rem !important;
  }
  .blog-hero {
    min-height: 65vh;
    text-align: center;
  }
  .toc-card {
    position: relative;
    top: 0;
  }
}
