/* ==========================================================================
   MacTechInvent Consulting LLC - Main Stylesheet
   Bootstrap 5.3 Compatible
   Color Scheme: Dark Navy (#1a1a2e), Accent Blue (#337ab7), White, Light Gray
   Font: Poppins (Google Fonts)
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-primary: #337ab7;
  --color-primary-dark: #285f8f;
  --color-dark: #1a1a2e;
  --color-dark-alt: #16213e;
  --color-text: #333;
  --color-text-light: #666;
  --color-text-muted: #8888a0;
  --color-bg-light: #f7f9fc;
  --color-white: #fff;
  --font-family: 'Poppins', sans-serif;
  --transition-fast: 0.25s ease;
  --transition-normal: 0.3s ease;
  --shadow-sm: 0 3px 15px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 25px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 30px;
}

/* ---------- Base / Global ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  overflow-x: hidden;
}

a {
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
}

section {
  position: relative;
}

/* ---------- Utility Classes ---------- */
.section-pad {
  padding: 60px 0;
}

.section-pad-sm {
  padding: 40px 0;
}

.hero-dark {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 100%);
  color: var(--color-white);
}

.bg-light-custom {
  background-color: var(--color-bg-light);
}

.bg-white {
  background-color: var(--color-white);
}

.text-primary-custom {
  color: var(--color-primary);
}

/* ---------- Navbar ---------- */
.navbar {
  background-color: var(--color-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0;
}

.navbar-brand {
  padding: 8px 0;
}

.navbar-brand img {
  height: 220px;
  width: auto;
  max-width: 400px;
  display: block;
}

.navbar-dark .navbar-nav .nav-link {
  color: #ccc;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 0.75rem 1rem;
  transition: color var(--transition-fast);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: var(--color-white);
}

.navbar-dark .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Hero Section ---------- */
#home_hero {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 100%);
  color: var(--color-white);
  padding: 80px 0 60px;
  overflow: hidden;
  position: relative;
}

/* Internal page hero (text-only hero sections) */
#home_hero.section-pad.text-center {
  padding: 60px 0 50px;
}

.hh1 {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hh1 h2 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--color-white);
}

.hh1 p {
  font-size: 16px;
  line-height: 1.7;
  color: #d0d0d0;
  max-width: 480px;
}

.hh2 {
  text-align: center;
}

.hh2 img {
  max-width: 100%;
  height: auto;
}

.hero_btn_wrapper {
  margin-top: 20px;
}

.hero_btn_wrapper a {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 12px 36px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.hero_btn_wrapper a:hover {
  background-color: var(--color-primary-dark);
  box-shadow: 0 4px 15px rgba(51, 122, 183, 0.4);
  color: var(--color-white);
  text-decoration: none;
}

.Home_hero_floating_image {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0.15;
}

/* ---------- Section Spacing Helpers ---------- */
.r221 {
  margin-bottom: 40px;
}

.r22 {
  margin-bottom: 20px;
}

.r31 {
  padding: 60px 0;
}

.r42 {
  margin-bottom: 30px;
}

.r312 {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Services Section (#r2) ---------- */
#r2 {
  background-color: var(--color-bg-light);
  padding: 70px 0 60px;
  position: relative;
  overflow: hidden;
}

#r2 > .container .col-12 > p,
#r2 > .container [class*="col-"] > p {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 10px;
  color: #555;
  line-height: 1.7;
}

.r2_floating_image {
  position: absolute;
  top: 0;
  right: -60px;
  width: 200px;
  opacity: 0.08;
  pointer-events: none;
}

/* ---------- Fancy Headings ---------- */
.fancy_heading,
.fancy_heading3 {
  text-align: center;
  color: var(--color-dark);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 15px;
}

.fancy_heading::after,
.fancy_heading3::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.fancy_heading2 {
  color: var(--color-dark);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 15px;
}

.fancy_heading2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  margin-top: 12px;
  border-radius: 2px;
}

/* ---------- Feature Cards (Services) ---------- */
.featured_ul_1 {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.featured_ul_1 li {
  flex: 1 1 280px;
  max-width: 320px;
}

.feature_box1 {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
}

.feature_box1:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.feature_box1 .feature-icon {
  font-size: 48px;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.feature_box1 h3 {
  color: var(--color-dark);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.feature_box1 p {
  color: var(--color-text-light);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.feature_box1 a {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.feature_box1 a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ---------- About Section (#r3) ---------- */
#r3 {
  background-color: var(--color-white);
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}

.r3_floating_image2 {
  position: absolute;
  bottom: 0;
  left: -40px;
  width: 180px;
  opacity: 0.07;
  pointer-events: none;
}

.r311 img {
  border-radius: var(--radius-lg);
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

#r3 p {
  color: #555;
  line-height: 1.7;
  font-size: 15px;
}

.r3_ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.r3_ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.r3_ul li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free', 'FontAwesome';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--color-primary);
  font-size: 14px;
}

.r3_ul li p {
  margin: 0;
  font-weight: 500;
  color: var(--color-dark);
}

/* ---------- Security Services Section (#r4) ---------- */
#r4.for_home {
  background-color: var(--color-bg-light);
  padding: 70px 0 60px;
}

#r4.for_home > .container .col-12 > p,
#r4.for_home > .container [class*="col-"] > p {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 10px;
  color: #555;
  line-height: 1.7;
}

.featured_ul_2.second_boxes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.featured_ul_2.second_boxes li {
  flex: 1 1 200px;
  max-width: 220px;
}

.vm-a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.vm-a:hover,
.vm-a:focus {
  text-decoration: none;
  color: inherit;
}

.feature_box2 {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
}

.feature_box2:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature_box2 .feature-icon {
  font-size: 42px;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.feature_box2 h4 {
  color: var(--color-dark);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature_box2 p {
  color: var(--color-text-light);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ---------- Contact Section ---------- */
#contact_us {
  background-color: var(--color-white);
  padding: 70px 0 60px;
}

#contact_us .col-lg-6 {
  max-width: 640px;
  margin: 0 auto;
}

#contact_us .form-label {
  font-weight: 500;
  color: var(--color-dark);
  font-size: 14px;
}

#contact_us .form-control {
  border-radius: var(--radius-sm);
  border: 1px solid #ddd;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#contact_us .form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.15);
}

#contact_us button[type="submit"] {
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 40px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-white);
  cursor: pointer;
  transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
  margin-top: 10px;
}

#contact_us button[type="submit"]:hover {
  background-color: var(--color-primary-dark);
  box-shadow: 0 4px 15px rgba(51, 122, 183, 0.4);
}

#contact_us button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#response-message {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Footer ---------- */
footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 60px 0 0;
}

.footer_1 {
  padding-bottom: 30px;
}

.f1 img {
  max-height: 250px;
  width: auto;
  max-width: 450px;
  margin-bottom: 30px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.f1 {
  text-align: center;
}

.ft-p {
  color: #aab0c0;
  font-size: 14px;
  line-height: 1.7;
}

.footer_social_icons {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.footer_social_icons li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  font-size: 18px;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.footer_social_icons li a:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.f2 h3,
.f4 h3 {
  color: var(--color-white);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer_menu_1 {
  list-style: none;
  padding: 0;
}

.footer_menu_1 li {
  margin-bottom: 10px;
}

.ft-a {
  color: #aab0c0;
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.ft-a:hover {
  color: var(--color-white);
  text-decoration: none;
}

.footer-heading-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-heading-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.special_cotact_list_2 {
  list-style: none;
  padding: 0;
}

.special_cotact_list_2 li {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.special_cotact_list_2 li > i,
.special_cotact_list_2 li > .fa,
.special_cotact_list_2 li > .fas,
.special_cotact_list_2 li > .far {
  width: 20px;
  font-size: 16px;
  color: var(--color-primary);
  text-align: center;
  flex-shrink: 0;
}

.special_cotact_list_2 a {
  color: #aab0c0;
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.special_cotact_list_2 a:hover {
  color: var(--color-white);
}

.cp_row {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
}

.cp_row p {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: 0;
}

/* ---------- Responsive Helper ---------- */
.forhome {
  margin-bottom: 0;
}

/* Image styling for content sections */
.content-img {
  border-radius: var(--radius-lg);
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* Flex center helper for content columns */
.flex-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Media Queries ---------- */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
  .hh1 h2 {
    font-size: 38px;
  }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
  .hh1 h2 {
    font-size: 34px;
  }

  .fancy_heading,
  .fancy_heading2,
  .fancy_heading3 {
    font-size: 28px;
  }

  .featured_ul_1 li {
    flex: 1 1 45%;
    max-width: 48%;
  }

  .featured_ul_2.second_boxes li {
    flex: 1 1 30%;
    max-width: 32%;
  }

  .section-pad {
    padding: 50px 0;
  }

  #home_hero {
    padding: 60px 0 50px;
  }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
  /* Navbar mobile */
  .navbar-collapse {
    background-color: var(--color-dark);
    padding: 10px 0;
    margin-top: 10px;
    border-radius: var(--radius-sm);
  }

  .navbar-dark .navbar-nav .nav-link {
    padding: 12px 15px;
    font-size: 15px;
  }

  .navbar-brand img {
    height: 100px;
    max-width: 380px;
  }

  /* Hero section */
  #home_hero {
    padding: 40px 0 20px;
    text-align: center;
    overflow: hidden;
  }

  .hh1 {
    align-items: center;
    margin-bottom: 20px;
  }

  .hh1 h2 {
    font-size: 24px;
    line-height: 1.3;
  }

  .hh1 p {
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
    line-height: 1.6;
  }

  .hero_btn_wrapper {
    margin-top: 15px;
  }

  .hero_btn_wrapper a {
    padding: 10px 28px;
    font-size: 14px;
  }

  .hh2 {
    padding: 0 10px;
    margin-bottom: 0;
  }

  .hh2 img {
    max-width: 70%;
    margin: 0 auto;
    display: block;
  }

  /* Hide floating image on mobile to prevent overlap */
  .Home_hero_floating_image {
    display: none;
  }

  /* Clear separation between hero and next section */
  #r2 {
    margin-top: 0;
    padding-top: 40px;
  }

  /* Section padding */
  .section-pad {
    padding: 40px 0;
  }

  #r2,
  #r4,
  #r4.for_home {
    padding: 50px 0 40px;
  }

  /* Feature cards */
  .featured_ul_1 {
    flex-direction: column;
    align-items: center;
  }

  .featured_ul_1 li {
    max-width: 100%;
    flex-basis: 100%;
  }

  .featured_ul_2.second_boxes {
    flex-direction: column;
    align-items: center;
  }

  .featured_ul_2.second_boxes li {
    max-width: 100%;
    flex-basis: 100%;
  }

  /* About section */
  .r31 {
    padding: 40px 0;
  }

  .r311 {
    margin-bottom: 30px;
  }

  .forhome {
    margin-bottom: 30px;
  }

  .r312,
  .flex-center {
    text-align: center;
  }

  .fancy_heading2 {
    text-align: center;
  }

  .fancy_heading2::after {
    margin-left: auto;
    margin-right: auto;
  }

  .r3_ul li {
    text-align: left;
  }

  /* Headings */
  .fancy_heading,
  .fancy_heading2,
  .fancy_heading3 {
    font-size: 24px;
    padding-bottom: 10px;
  }

  .fancy_heading::after,
  .fancy_heading3::after {
    width: 50px;
    margin: 10px auto 0;
  }

  .fancy_heading2::after {
    width: 50px;
    margin-top: 10px;
  }

  /* Contact section */
  #contact_us {
    padding: 50px 0 40px;
  }

  /* Footer */
  footer {
    padding: 40px 0 0;
  }

  .footer_1 .col-lg-4,
  .footer_1 .col-md-4 {
    text-align: center;
    margin-bottom: 30px;
  }

  .footer_social_icons {
    justify-content: center;
  }

  .special_cotact_list_2 li {
    justify-content: center;
  }

  .footer_menu_1 {
    text-align: center;
  }

  /* Chatbot */
  #chatbot-container {
    bottom: 10px;
    right: 10px;
  }

  #chatbot-window {
    width: 300px;
    height: 400px;
  }

  #chatbot-toggle {
    width: 50px;
    height: 50px;
  }

  /* Content images on mobile */
  .content-img {
    margin-bottom: 20px;
  }

  /* Two-column content sections */
  .row > [class*="col-md-6"]:first-child {
    margin-bottom: 25px;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  #home_hero {
    padding: 30px 0 15px;
  }

  .hh1 {
    margin-bottom: 15px;
  }

  .hh1 h2 {
    font-size: 22px;
  }

  .hh1 p {
    font-size: 13px;
  }

  .hero_btn_wrapper {
    margin-top: 12px;
  }

  .hero_btn_wrapper a {
    padding: 10px 24px;
    font-size: 13px;
  }

  .hh2 img {
    max-width: 65%;
  }

  #r2 {
    padding-top: 35px;
  }

  .feature_box1 {
    padding: 24px 18px;
  }

  .feature_box2 {
    padding: 22px 14px;
  }

  .fancy_heading,
  .fancy_heading2,
  .fancy_heading3 {
    font-size: 22px;
  }

  .section-pad {
    padding: 30px 0;
  }

  #r2,
  #r4,
  #r4.for_home {
    padding: 35px 0 30px;
  }

  .navbar-brand img {
    height: 80px;
    max-width: 320px;
  }

  /* Google Maps */
  #contact_map iframe {
    height: 250px;
  }

  /* Contact form full width button */
  #contact_us button[type="submit"] {
    width: 100%;
  }

  /* Stack contact info */
  .special_cotact_list_2 li {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .navbar-dark .navbar-nav .nav-link {
    padding: 14px 15px;
  }

  .hero_btn_wrapper a {
    padding: 14px 40px;
  }

  .footer_social_icons li a {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .feature_box1 a,
  .ft-a,
  .vm-a {
    padding: 4px 0;
  }
}
