/* Company Page Styles */
header {
  margin-bottom: 4rem;
}

body {
  font-family: "Open Sans", sans-serif;
  background-color: #f3f5fa;
  color: #444;
  margin: 0;
  padding: 0;
}

h2 {
  font-family: "Jost", sans-serif;
  font-size: 32px;
  font-weight: bold;
  color: #37517e;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

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

.section-title h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #47b2e4;
  margin: 10px auto 0;
  border-radius: 2px;
}

.section-bg {
  background-color: #ffffff;
  padding: 60px 0;
}

.btn-outline-primary {
  border-color: #47b2e4;
  color: #47b2e4;
  transition: 0.3s;
}

.btn-outline-primary:hover {
  background-color: #47b2e4;
  color: white;
}

.card {
  border: none;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
}

.card-img-top {
  height: 250px;
  object-fit: contain;
  padding: 1rem;
}

.card-title {
  font-weight: 600;
  color: #37517e;
}

.card-text {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* Header Navbar Scroll Behavior */
#header {
  transition: all 0.5s;
  z-index: 997;
  padding: 15px 0;
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
}

#header.header-scrolled {
  background: rgba(40, 58, 90, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.company {
  margin: -2rem;
}

.company .row a img {
  margin-bottom: 0 !important;
  width: 35%;
  position: relative;
  top: 4rem;
  background: #ffffff;
  color: #444;
  border: 1px solid white;
  border-radius: 3rem;
}

/* Media Queries for Responsive Company and Product Sections */

/* Tablets (≤ 991px) */
@media (max-width: 991px) {
  .company .row a img {
    width: 50%;
    top: 2rem;
  }

  .card-img-top {
    height: 200px;
  }

  .card-text {
    font-size: 13px;
  }
}

/* Phones (≤ 767px) */
@media (max-width: 767px) {
  .company .row a img {
    width: 70%;
    top: 1.5rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .card-img-top {
    height: 180px;
  }

  .card-title {
    font-size: 16px;
    text-align: center;
  }

  .card-text {
    font-size: 12px;
    text-align: center;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Very Small Devices (≤ 480px) */
@media (max-width: 480px) {
  .company .row a img {
    width: 85%;
    top: 1rem;
  }

  .card-img-top {
    height: 150px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .card-body {
    padding: 0.75rem;
  }
}

/* Responsive Fixes for VEZE Filter System and Products */

/* Prevent overflow */
body,
html {
  overflow-x: hidden;
}

/* Ensure container doesn't overflow */
#company .container {
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  overflow-x: hidden;
}

/* Fix row wrapping */
#product-gallery {
  margin-left: 0;
  margin-right: 0;
}

/* General fixes */
.company .row a img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tablet View */
@media (max-width: 991px) {
  .company .row a img {
    width: 60%;
    top: 2rem;
  }

  .card-img-top {
    height: 200px;
  }

  .card-body {
    padding: 1rem;
  }
}

/* Mobile View */
@media (max-width: 767px) {
  .company .row a img {
    width: 75%;
    top: 1.5rem;
  }

  .card {
    margin-bottom: 1.5rem;
  }

  .card-img-top {
    height: 180px;
  }

  .card-title {
    font-size: 16px;
    text-align: center;
  }

  .card-text {
    font-size: 13px;
    text-align: center;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Small Devices */
@media (max-width: 480px) {
  .company .row a img {
    width: 85%;
    top: 1rem;
  }

  .card-img-top {
    height: 150px;
  }

  .card-body {
    padding: 0.75rem;
  }

  .section-title h2 {
    font-size: 22px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-text {
    font-size: 12px;
  }
}

/* === FINAL FIX FOR VEZE FILTER SYSTEM & PRODUCTS RESPONSIVENESS === */

/* Prevent Horizontal Scroll */
body,
html {
  overflow-x: hidden;
}

/* Fix image responsiveness */
.company .row a img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Fix container padding and force content to wrap properly */
#company .container {
  width: 90%;
  padding-left: 15px;
  padding-right: 15px;
  overflow-x: hidden;
}

#company .row {
  margin-left: 0;
  margin-right: 0;
}

/* Product Cards and Titles */
#product-gallery .card {
  height: auto;
  width: 100%;
}

#product-gallery .card-img-top {
  max-height: 250px;
  width: 100%;
  object-fit: contain;
  padding: 1rem;
}

/* Tablet (≤ 991px) */
@media (max-width: 991px) {
  .company .row a img {
    width: 60%;
  }

  .card-img-top {
    max-height: 200px;
  }

  .card-title {
    font-size: 18px;
  }

  .card-text {
    font-size: 14px;
  }
}

/* Mobile (≤ 767px) */
@media (max-width: 767px) {
  .company .row a img {
    width: 90%;
  }

  .card-img-top {
    max-height: 180px;
  }

  .card-body {
    padding: 0.75rem;
  }

  .card-title {
    font-size: 16px;
    text-align: center;
  }

  .card-text {
    font-size: 13px;
    text-align: center;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Very Small Screens (≤ 480px) */
@media (max-width: 480px) {
  .company .row a img {
    width: 85%;
  }

  .card-img-top {
    max-height: 150px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-text {
    font-size: 12px;
  }

  .section-title h2 {
    font-size: 22px;
  }
}

/* ============================== */
/* VEZE Filter System Fixes */
/* ============================== */

/* Prevent extra scroll inside VEZE description */
#company .row.mb-4 {
  overflow: visible !important;
  max-height: unset !important;
}

/* Ensure no internal scroll bars */
#company .col-lg-12 {
  overflow: visible !important;
  max-height: none !important;
}

/* Responsive text scaling */
#company .col-lg-12 p {
  font-size: 16px;
  line-height: 1.7;
  text-align: justify;
  margin-bottom: 1rem;
}

/* Responsive buttons */
#company .col-lg-12 .btn {
  white-space: nowrap;
  margin-bottom: 10px;
}

/* Adjust layout for tablets */
@media (max-width: 991px) {
  #company .col-lg-12 p {
    font-size: 15px;
  }

  #company .col-lg-12 .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Stack buttons for mobile */
@media (max-width: 767px) {
  #company .mt-3 {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #company .col-lg-12 .btn {
    width: 100%;
    text-align: center;
  }

  #company .col-lg-12 p {
    font-size: 14px;
    text-align: left;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  #company .col-lg-12 p {
    font-size: 13px;
  }

  #company .col-lg-12 .btn {
    font-size: 13px;
  }
}


/* Custom logo size control */
.custom-logo {
  width: 30%;
  max-width: 300px;
  min-width: 180px;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 2rem;
}

/* Adjust for tablets */
@media (max-width: 768px) {
  .custom-logo {
    width: 60%;
  }
}

/* Adjust for mobile */
@media (max-width: 480px) {
  .custom-logo {
    width: 75%;
  }
}

@media (max-width: 767px) {
  #product-gallery .card-img-top {
    width: 100%;
    height: auto;
    object-fit: cover;
    padding: 0; /* Remove padding to match portfolio */
    margin: 0;
    display: block;
  }
}
