/* Prevent horizontal scrolling */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

.bottom-bg-image {
  position: absolute;
  left: 0;
  right: 0;
  width: 100vw;
  min-height: 100vh;
  object-fit: cover;
  z-index: -1;
  margin-top: -82.6vw;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0px;
  row-gap: clamp(6px, 1vw, 14px);
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  margin-left: 0%;
}

.image-grid a {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.8vw, 12px);
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.image-grid img {
  width: 4.8vw;
  height: 3.5vw;
  object-fit: contain;
  flex-shrink: 0;
  margin: 0 !important;
}

.image-grid h6 {
  margin: 0 !important;
  line-height: 1.25 !important;
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  font-size: 0.8vw;
}

/* Position the 10th item (PARODONTOLÓGIA) to the left */
.image-grid > a:nth-child(10) {
  margin-left: -12px;
}

.image-grid > a:nth-child(6) {
  margin-left: -4px;
  padding-bottom: 20px;
}

.image-grid img > div:nth-child(6) {
  height: 800px;
  width: 800px;
}

.line {
  height: 4px;
  background: #009fb4;
  margin: 20px 20px 20px 20px;
}

.wel {
  display: flex;
  align-items: stretch;
  gap: 5%;
  margin-top: 50px;
}

.wleft-side {
  flex: 0 0 50%;
  display: flex;
}

.left-img{
  border-radius: 20px;
  width: 100%;
  height: 550px;
  object-fit: cover;
}

.wel-text-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wel h1{
  margin-bottom: 16px;
  margin-top: 0;
}

.pright-text {
  flex: 1;
}

/* Cookie Banner Styles */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(27, 20, 100, 0.95);
  color: white;
  padding: 20px;
  z-index: 10000;
  display: none;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.cookie-content p {
  margin: 0;
  flex: 1;
  min-width: 250px;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cookie-btn.accept {
  background-color: #009fb4;
  color: white;
}

.cookie-btn.accept:hover {
  background-color: #007a8a;
}

.cookie-btn.reject {
  background-color: #6c757d;
  color: white;
}

.cookie-btn.reject:hover {
  background-color: #545b62;
}

.cookie-btn.settings {
  background-color: transparent;
  color: white;
  border: 1px solid white;
}

.cookie-btn.settings:hover {
  background-color: white;
  color: #1b1464;
}

/* Cookie Modal Styles */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.cookie-modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.cookie-close {
  color: #aaa;
  float: right;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 15px;
  cursor: pointer;
}

.cookie-close:hover {
  color: #000;
}

.cookie-modal h2 {
  color: #1b1464;
  margin-bottom: 20px;
}

.cookie-category {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.cookie-category:last-of-type {
  border-bottom: none;
}

.cookie-category h3 {
  color: #009fb4;
  margin-bottom: 10px;
}

.cookie-category p {
  margin-bottom: 15px;
  color: #666;
}

/* Toggle Switch Styles */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .cookie-slider {
  background-color: #009fb4;
}

input:disabled + .cookie-slider {
  background-color: #009fb4;
  opacity: 0.6;
  cursor: not-allowed;
}

input:checked + .cookie-slider:before {
  transform: translateX(26px);
}

.cookie-modal-buttons {
  margin-top: 30px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.pright-text{
  text-align: left;
  margin-right: 100px;
}


.form-container {
  padding: 0 100px;
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 767px) {
  .image-grid{
    display: none;
  }
  .hide{
    display: none;
  }
  
  .wel {
    flex-direction: column;
    margin-top: 20px;
  }
  
  .wleft-side {
    flex: none;
    height: 400px;
    margin-bottom: 7vw;
  }
  
  .left-img{
    width: 100%;
    height: 400px;
    object-fit: cover;
  }
  
  .image-carousel {
    height: 400px;
  }
  
  .bottom-bg-image {
    margin-top: -75vw;
    position: relative;
    min-height: auto;
    height: auto;
    width: 100vw;
  }
  
  .hright-text, .pright-text {
    text-align:left;
    margin-left: 5%;
    margin-right: 5%;
  }

  .form-title{
    text-align: center;
    margin-left: 5%;
    padding-left: 0%;
  }

  .form-group{
    width: 100%;
  }

  .form-button2{
    margin-left: 5%;
    margin-right: 5%;
    width: 90%;
    padding-bottom: -0px;
  }

  /* Cookie Mobile Responsive */
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    justify-content: center;
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    min-width: 100px;
  }

  .cookie-modal-content {
    margin: 10% auto;
    width: 95%;
    padding: 20px;
  }

  .cookie-modal-buttons {
    flex-direction: column;
  }

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

/* Image Carousel Styles */
.image-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn-prev {
  left: 10px;
}

.carousel-btn-next {
  right: 10px;
}