/* --- Global Body Configuration --- */
body {
  margin: 0;
  color: #fff;
  background: #2e2c2c;
  font-family: "Open Sans", sans-serif;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden; 
}

/*--------------------------------------------------------------
# Header & Navigation (Desktop & General Layouts)
--------------------------------------------------------------*/
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transition: all 0.5s;
  z-index: 997;
  padding: 15px 0;
  background: rgba(2, 22, 94, 0.95);
}

#header .logo img {
  padding: 0;
  margin: 0;
  max-height: 50px;
}

.navbar {
  padding: 0;
}

.navbar ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}

.navbar li {
  position: relative;
}

.navbar a,
.navbar a:focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  margin-left: 10px;
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

/* TARGETED FIX: Restricted to main tier list links to protect global 3D layout items */
.navbar ul.nav-menu-list > li > a:hover {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  transform: scale(1.1);
}

/* Dropdown Sub-menus (Desktop) */
.navbar .dropdown ul {
  display: block;
  position: absolute;
  left: 10px;
  top: calc(100% + 30px);
  margin: 0;
  padding: 10px 0;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  background: rgba(4, 28, 114, 0.98);
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
  transition: 0.3s;
  border-radius: 4px;
}

.navbar .dropdown ul li {
  min-width: 200px;
}

.navbar .dropdown ul a {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #c5d6dd;
  border-bottom: none;
}

.navbar .dropdown ul a:hover {
  color: #3b82f6;
  background: #f8f9fa;
  transform: none; 
}

.navbar .dropdown:hover > ul {
  opacity: 1;
  top: 100%;
  visibility: visible;
}

.navbar .dropdown .dropdown ul {
  top: 0;
  left: calc(100% - 15px);
}

.navbar .dropdown .dropdown:hover > ul {
  opacity: 1;
  left: 100%;
}

/* Mobile Toggles Hidden by Default on Desktop Screen */
.mobile-nav-toggle, .mobile-nav-close {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/*--------------------------------------------------------------
# Navigation Hamburger Framework (Mobile Mechanics)
--------------------------------------------------------------*/
@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: block;
  }

  .mobile-nav-close {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    color: #2f4d5a;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    padding: 60px 20px 20px 20px;
    overflow-y: auto;
  }

  .navbar.navbar-mobile-active {
    right: 0;
  }

  .navbar ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .navbar li {
    width: 100%;
  }

  .navbar a, .navbar a:focus {
    color: #2f4d5a;
    padding: 12px 10px;
    margin-left: 0;
    width: 100%;
    border-bottom: 1px solid #f1f3f5;
  }

  /* Safe reset to clear scale expansion dependencies on mobile viewports */
  .navbar ul.nav-menu-list > li > a:hover,
  .navbar a:hover {
    background: #f8f9fa;
    color: #3b82f6;
    transform: none;
  }

  .navbar .dropdown ul {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: #f8f9fa;
    padding-left: 15px;
    margin: 5px 0;
    width: 100%;
  }

  .navbar .dropdown.dropdown-active > ul {
    display: block;
  }
}

/* --- Parallax & Overlays Section --- */
.content-section, .gallery-section {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.section-overlay {
  width: 100%;
  height: 100%;
  padding: 140px 20px 60px 40px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.329);
}

@media (min-width: 1200px) {
  .section-overlay { padding-left: 100px; }
}

.section-overlay h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #3b82f6;
}

.section-overlay h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-overlay h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.section-overlay p {
  font-size: 1.2rem;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.bg-section-intro {
  width: 100%;
  background-image: url('/img/background/camera_lens-1536x607.webp');
}

/* --- 3D Rotating Gallery Configuration --- */
@property --i {
  syntax: '<integer>';
  inherits: false;
  initial-value: 0;
}

.gallery-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  perspective: 1200px;
  overflow: hidden;
  padding: 40px 0;
}

.gallery-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 70vh;
  perspective: 850px; 
  background-image: url("/img/background/maverik_panel_PR-300x168.webp");
  background-size: cover;
}
.rotating-gallery {
  position: absolute;
  width: 180px;
  height: 240px;
  transform-style: preserve-3d;
  animation: galleryRotate 35s linear infinite; 
}

.rotating-gallery:hover {
  animation-play-state: paused;
}

.gallery-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--i) * 30deg)) translateZ(450px);
  transition: transform 0.1s ease;
}
.card-content {
  width: 100%;
  height: 100%;
  background: rgba(20, 25, 35, 0.9);
  border: 1px solid rgb(59, 131, 246);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  backface-visibility: visible;
}

.card-content img {
  width: 100%;
  height: 75%;
  object-fit: contain;
  cursor: pointer;
} 

.image-text {
  font-size: 0.85rem;
  color: #3b82f6;
  font-weight: 600;
  margin: 5px 0 0 0;
  text-align: center;
}

/* --- Split-Screen Lightbox CSS Layout --- */
.lightbox-modal {
  display: none; 
  position: fixed;
  z-index: 99999; 
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(11, 12, 16, 0.98);
  justify-content: center;
  align-items: center;
}

.lightbox-wrapper.split-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  width: 90%;
  max-width: 1100px;
  height: 80vh;
  background: #141923;
  border-radius: 12px;
  overflow: hidden;
}

.lightbox-left {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05070a;
  padding: 20px;
}

.lightbox-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  background: #141923;
}

.lightbox-content {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.lightbox-title {
  font-size: 1.8rem;
  color: #3b82f6;
  margin-bottom: 10px;
}

.lightbox-description {
  font-size: 1rem;
  color: #c5c6c7;
  line-height: 1.5;
  margin-bottom: 25px;
}

.lightbox-action-btn {
  display: inline-block;
  padding: 10px 20px;
  color: #3b82f6;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
  text-align: center;
  width: fit-content;
}

.lightbox-action-btn:hover {
  background: #3b82f6;
  color: #fff;
}

.fade-out { opacity: 0; }

.nav-btn {
  position: absolute;
  background: rgba(59, 130, 246, 0.8);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10;
  transition: background 0.2s;
}
.nav-btn:hover { background: #3b82f6; }
.back-btn { top: 20px; left: 20px; font-size: 14px; }
.prev-btn { left: 15px; top: 50%; transform: translateY(-50%); }
.next-btn { right: 15px; top: 50%; transform: translateY(-50%); }

/* --- Standalone Display Cards Layout --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: #fff;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.card-hint-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}

.card-hint-overlay span {
  background: #3b82f6; color: #fff; padding: 8px 16px; border-radius: 20px; font-weight: 600; font-size: 0.85rem;
}

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #fff;
}

.category { font-size: 0.75rem; color: #6c757d; font-weight: 700; text-transform: uppercase; }
.title { font-size: 1.1rem; margin: 5px 0; color: #1a1a1a; font-weight: 600; }
.price { font-size: 1rem; font-weight: 700; color: #3b82f6; margin-top: auto; }



/* --- About Profile Section Layout --- */
.about {
  font-family: "Open Sans", sans-serif;
  overflow: hidden;
  /* Ensures any dark global backgrounds don't bleed into the section text */
  color: #212529; 
}

.tracking-wide { letter-spacing: 0.05em; }
.rounded-4 { border-radius: 1.25rem !important; }

/* Custom Text Darkener for Bootstrap's column layouts over light backgrounds */
.text-dark-spec { 
  color: #2d3748; 
  font-weight: 500; 
  display: flex;
  align-items: center;
}

/* Base list adjustment for the "Why Choose Us" section */
.about ul.list-unstyled li {
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Button & Interactive Animations */
.btn-primary {
  background-color: #3b82f6;
  border-color: #3b82f6;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(59, 130, 246, 0.3) !important;
}

/* Right Side Cards Profile */
.about .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #212529; /* Explicit dark color for text inside the white card */
}

.about .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15) !important;
}

/* Gear Icon Hover Rotation Feature */
.about .bg-primary-subtle i { 
  transition: transform 0.3s ease; 
}

.about .card:hover .bg-primary-subtle i { 
  transform: rotate(15deg) scale(1.1); 
}

/* --- 3D Portfolio Grid Layout Evolution --- */
.partner-card-3d {
  perspective: 1000px;
}

.portfolio-wrap {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 
              0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg) translateZ(0px);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
              box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
              background-color 0.3s ease;
}

.portfolio-wrap img {
  max-height: 100%;
  object-fit: contain;
  transform: translateZ(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  filter: drop-shadow(0 5px 5px rgba(0,0,0,0.15));
}

.partner-card-3d:hover .portfolio-wrap {
  background: #fdfdfd;
  transform: rotateX(10deg) rotateY(-8deg) translateY(-8px) translateZ(15px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.65), 
              0 0 0 1px rgba(59, 130, 246, 0.4) inset;
}

.partner-card-3d:hover .portfolio-wrap img {
  transform: translateZ(55px) scale(1.05);
  filter: drop-shadow(0 12px 12px rgba(0,0,0,0.35));
}



/* --- Google Map Custom Integration Layout --- */
.map-container-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.map-container-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.2);
}

/* --- Contact Form Styling Extension --- */
.contact-form-container {
  background: rgba(47, 47, 172, 0.425);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(29, 6, 240, 0.929);
}

.php-email-form .form-control {
  background-color: rgba(162, 163, 170, 0.805) !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  border-radius: 8px;
}

.php-email-form .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.php-email-form .form-floating label {
  color: #161616;
}

.php-email-form .form-floating .form-control:focus ~ label,
.php-email-form .form-floating .form-control:not(:placeholder-shown) ~ label {
  color: #3b82f6;
  opacity: 0.8;
}

/* copy right  */
/* --- Footer & Copyright System Layout --- */
#footer {
  background-color: #141923;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "Open Sans", sans-serif;
}

.footer-disclaimer {
  color: #a0aec0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.footer-copyright {
  color: #cbd5e1;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* Optional soft animation on footer layout nodes */
#footer span, #footer p {
  transition: color 0.3s ease;
}

#footer .text-primary:hover {
  color: #2563eb !important;
}


@media (max-width: 991px) {
  .map-container-wrap iframe {
    height: 280px !important;
  }
}

/* --- Adaptive Viewport Media Adjustments --- */
@media (max-width: 992px) {
  .lightbox-wrapper.split-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 90vh;
    width: 95%;
  }
  .lightbox-left { padding: 40px 20px 10px 20px; }
  .lightbox-right { padding: 20px; justify-content: flex-start; }
  .lightbox-title { font-size: 1.4rem; }
  .lightbox-description { font-size: 0.9rem; margin-bottom: 15px; }
  .prev-btn, .next-btn { display: none !important; }
}

@media (max-width: 768px) {
  .content-section, .gallery-section { background-attachment: scroll; }
  .section-overlay h1 { font-size: 1.8rem; }
  .section-overlay h2 { font-size: 1.2rem; }
  
  .partner-card-3d:hover .portfolio-wrap {
    transform: rotateX(5deg) rotateY(-3deg) translateY(-4px) translateZ(5px);
  }
}

@keyframes galleryRotate {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

@media (min-width: 1024px) {
  .product-card:hover { transform: translateY(-4px); }
  .product-card:hover .card-hint-overlay { opacity: 1; }
}