/* Asigură-te că toate elementele folosesc box-sizing: border-box */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* Secțiuni de structură */
.bms-section {
  background-color: #fff;
  padding: 60px 20px;
  font-family: 'Ubuntu', sans-serif;
  box-sizing: border-box;
}

.bms-container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  width: 100%;
}

.bms-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.bms-text {
  flex: 1;
}

.bms-text h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.bms-text p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 10px;
}

.bms-text ul {
  margin: 10px 0 20px 20px;
}

.bms-text ul li {
  font-size: 1.1em;
  margin-bottom: 5px;
}

/* Efect la hover pentru imagini */
.bms-image img:hover {
  transform: scale(1.03);
  filter: brightness(1.15);
  cursor: pointer;
}

.bms-benefits {
  background-color: #ffffff;
  padding: 100px 20px;
  text-align: center;
  font-family: 'Ubuntu', sans-serif;
  overflow: hidden;
}

.section-title {
  font-size: 2.5em;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.section-title.show {
  opacity: 1;
  transform: translateY(0);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Flip card structure */
.flip-card {
  perspective: 1000px;
  height: 220px;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.flip-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

.flip-front h3 {
  font-size: 1.2em;
  color: #222;
}

.flip-back {
  transform: rotateY(180deg);
}

.flip-back p {
  font-size: 1em;
  color: #333;
}



/* Secțiunea principală */
.bms-structure {
  padding: 80px 5%;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Previne overflow-ul */
}

/* Container intern cu layout pe două coloane */
.structure-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 60px;
  max-width: 100%; /* Previne depășirea containerului */
  width: 100%;
  flex-wrap: wrap;
  box-sizing: border-box;
  overflow: hidden; /* Previne overflow-ul */
}

/* Textul din stânga */
.structure-text {
  flex: 1;
  min-width: 250px; /* Ajustat pentru a preveni overflow-ul pe dispozitive mai mici */
}

.structure-text h2 {
  font-size: 2em;
  margin-bottom: 20px;
}

/* Lista cu componentele BMS */
.structure-list {
  list-style: none;
  margin: 0;
}

.structure-list li {
  margin-bottom: 15px;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease;
}

.structure-list li i {
  color: #0066cc;
}

/* Clasă adăugată de JS când lista intră în viewport */
.structure-list li.show {
  opacity: 1;
  transform: translateX(0);
}

/* Imaginea din dreapta */
.structure-image {
  flex: 1.2;
  min-width: 300px; /* Ajustat pentru a preveni overflow-ul */
  text-align: center;
}

.structure-image img {
  width: 100%;
  max-width: 100%; /* Asigură că imaginea nu depășește dimensiunea containerului */
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.structure-image img:hover {
  transform: scale(1.05);
}


/* RESPONSIVE: stivare pe mobil */
@media (max-width: 768px) {
  .structure-container,
  .domains-columns {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .structure-text, .structure-image {
    flex: unset;
    width: 100%;
  }

  .structure-text h2 {
    font-size: 1.6em;
  }

  .bms-container {
    flex-direction: column;
    gap: 20px;
  }
}

.bms-domains {
  position: relative;
  width: 100%;
  padding: 60px 0;
  background: #f4f7fa;
  overflow: hidden;
}

.section-title, .domains-subtitle {
  text-align: center;
  color: #1d3557;
  margin-bottom: 40px;
}

.hex-grid {
  position: relative;
  width: 100%;
  height: 500px;
  max-width: 1200px;
  margin: 0 auto 100px;
}

.hexagon {
  position: absolute;
  width: 200px;
  height: 205px;
  background: rgba(142, 142, 142, 0.327);
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  
}

.hexagon:hover {
  transform: scale(1.05);
}

.hexagon img {
  width: 80px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
  display: block;
  pointer-events: none;
}

.hexagon:hover img {
  filter: drop-shadow(0 0 10px rgba(0, 123, 255, 0.8)) brightness(1);
  transform: scale(1.05);
}

.hexagon span {
  font-size: 1.5em;
  color: #000000;
}

#connection-lines {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  background-color: transparent;
  width:100%;height:100%;
}

/* Poziționare hexagoane în stea (Grup 1) */
#group1 #hex1 { top: 130px; left: 0px; } /* centru */
#group1 #hex2 { top: 0px;  left: 530px; } /* sus */
#group1 #hex3 { top: 130px; left: 1050px; }
#group1 #hex4 { top: 350px; left: 750px; }
#group1 #hex5 { top: 350px; left: 350px; }

/* Poziționare hexagoane în stea (Grup 2) */
#group2 {
  height: 400px;
}

#group2 #hex6 { top: 200px; left: 70px; }
#group2 #hex7 { top: 0px;  left: 510px; }
#group2 #hex8 { top: 200px; left: 950px; }
#group2 #hex9 { top: 380px; left: 510px; }

/* Responsivitate pentru ecrane mici (max 480px) */
@media (max-width: 480px) {
  .hex-grid {
    height: 350px;
    max-width: 100%;
    margin-bottom: 50px;
  }
  
  .hexagon {
    width: 90px;
    height: 90px;
    font-size: 0.3em; /* ajustăm dimensiunea pentru mobil */
  }
  
  .hexagon img {
    width: 10%;
    height: auto;
  }
  
  .hexagon span {
    font-size: 0.6em;
  }

  /* Poziționare hexagoane pentru mobil */
  #group1 #hex1 { top: 120px; left: 10px; }
  #group1 #hex2 { top: 10px; left: 140px; }
  #group1 #hex3 { top: 100px; left: 270px; }
  #group1 #hex4 { top: 230px; left: 210px; }
  #group1 #hex5 { top: 230px; left: 90px; }

  #group2 {
    height: 350px;
  }

  #group2 #hex6 { top: 130px; left: 10px; }
  #group2 #hex7 { top: 10px; left: 140px; }
  #group2 #hex8 { top: 130px; left: 270px; }
  #group2 #hex9 { top: 210px; left: 210px; }
}

/* Responsivitate pentru tablete (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .hex-grid {
    height: 400px;
    max-width: 100%;
  }
  
  .hexagon {
    width: 160px;
    height: 160px;
    font-size: 0.6em;
  }
  
  .hexagon img {
    width: 40%;
    height: auto;
  }
  
  .hexagon span {
    font-size: 1.1em;
  }

  /* Poziționare hexagoane pentru tablete */
  #group1 #hex1 { top: 140px; left: 30px; }
  #group1 #hex2 { top: 20px; left: 220px; }
  #group1 #hex3 { top: 140px; left: 390px; }
  #group1 #hex4 { top: 330px; left: 330px; }
  #group1 #hex5 { top: 320px; left: 150px; }

  #group2 {
    height: 400px;
  }

  #group2 #hex6 { top: 150px; left: 40px; }
  #group2 #hex7 { top: 20px; left: 220px; }
  #group2 #hex8 { top: 150px; left: 340px; }
  #group2 #hex9 { top: 260px; left: 210px; }
}

/* Responsivitate pentru ecrane mari (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .hex-grid {
    height: 450px;
    max-width: 100%;
  }
  
  .hexagon {
    width: 180px;
    height: 180px;
    font-size: 0.8em;
  }
  
  .hexagon img {
    width: 35%;
    height: auto;
  }
  
  .hexagon span {
    font-size: 1.4em;
  }

  /* Poziționare hexagoane pentru tablete mari */
  #group1 #hex1 { top: 150px; left: 40px; }
  #group1 #hex2 { top: 30px; left: 240px; }
  #group1 #hex3 { top: 140px; left: 490px; }
  #group1 #hex4 { top: 310px; left: 390px; }
  #group1 #hex5 { top: 340px; left: 150px; }

  #group2 {
    height: 400px;
  }

  #group2 #hex6 { top: 160px; left: 50px; }
  #group2 #hex7 { top: 30px; left: 300px; }
  #group2 #hex8 { top: 160px; left: 580px; }
  #group2 #hex9 { top: 300px; left: 300px; }
}

/* Responsivitate pentru ecrane mari (1024px - 1200px) */
@media (min-width: 1024px) and (max-width: 1300px) {
  .hex-grid {
    height: 450px;
    max-width: 100%;
  }
  
  .hexagon {
    width: 200px;
    height: 205px;
    font-size: 1em;
  }
  
  .hexagon img {
    width: 45%;
    height: auto;
  }
  
  .hexagon span {
    font-size: 1.5em;
  }

  /* Poziționare hexagoane pentru ecrane între 1024px și 1200px */
  #group1 #hex1 { top: 150px; left: 60px; }
  #group1 #hex2 { top: 30px; left: 400px; }
  #group1 #hex3 { top: 140px; left: 720px; }
  #group1 #hex4 { top: 320px; left: 550px; }
  #group1 #hex5 { top: 330px; left: 220px; }

  #group2 {
    height: 400px;
  }

  #group2 #hex6 { top: 170px; left: 60px; }
  #group2 #hex7 { top: 0px; left: 390px; }
  #group2 #hex8 { top: 170px; left: 700px; }
  #group2 #hex9 { top: 350px; left: 390px; }
}


/* Centrarea titlului */
.center-title {
  text-align: center;
  margin-bottom: 20px;
}

/* Centrarea butonului */
.portfolio-button-container {
  text-align: center;
  margin-bottom: 40px;
}

.portfolio-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #005c99;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.portfolio-button:hover {
  background-color: #007acc;
}

/* Containerul pentru casete */
.case-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin: 0 auto 80px auto;
  max-width: 1500px;
  padding: 0;
  box-sizing: border-box;
  align-items: center;
  width: 100%;
}

/* Casetele individuale */
.case-box {
  flex: 0 0 350px;
  height: 350px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Imaginile din casete */
.case-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay la hover */
.case-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(100, 149, 237, 0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 1.4em;
  font-weight: bold;
  text-align: center;
  padding: 0 10px;
}

.case-box:hover .case-overlay {
  opacity: 1;
}
.faq-section {
  background: #f4f7fa;
  padding: 60px 20px;
  max-width: 800px;
  margin-left: 60px; /* poziționare la stânga */
  text-align: left;
  border-radius: 8px;
}
.section-title.left-title {
  text-align: left;
  color: #1d3557;
  font-size: 2em;
  margin-bottom: 40px;
  padding-left: 10px;
}

.faq-item {
  border-bottom: 1px solid #ccc;
  margin-bottom: 10px;
}

.faq-question {
  background: none;
  border: none;
  font-size: 1.1em;
  font-weight: bold;
  color: #1d3557;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.faq-question:hover {
  background: #e1ecf9;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.3s ease;
  padding: 0 15px;
}

.faq-answer p {
  margin: 0;
  color: #333;
  padding: 10px 0;
}

/* Active state */
.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
}

/* Arrow animation */
.faq-question .arrow {
  font-size: 1.5em;
  transition: transform 0.3s ease;
}

.faq-item.active .arrow {
  transform: rotate(45deg); /* + devine x (rotit) */
}
.contact-cta {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #0066cc 0%, #004a99 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 70, 140, 0.4);
  transition: background 0.5s ease;
}

.contact-cta:hover {
  background: linear-gradient(135deg, #004a99 0%, #002d5c 100%);
}

.cta-content h2 {
  font-size: 2.1em;
  margin-bottom: 20px;
  font-weight: 700;
}

.cta-content p {
  font-size: 1.1em;
  margin-bottom: 35px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.cta-button {
  background-color: #00aaff;
  color: #fff;
  font-weight: 700;
  font-size: 1.2em;
  padding: 15px 40px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 6px 15px rgba(0, 170, 255, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.cta-button:hover, .cta-button:focus {
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 170, 255, 0.9);
  outline: none;
}

.contact-cta {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries for Responsiveness */

/* Small devices (portrait phones, 600px and below) */
@media (max-width: 600px) {
  .contact-cta {
    padding: 40px 10px;
  }

  .cta-content h2 {
    font-size: 1.6em;
  }

  .cta-content p {
    font-size: 1em;
    max-width: 90%;
  }

  .cta-button {
    font-size: 1em;
    padding: 12px 30px;
  }
}

/* Medium devices (tablets, 600px to 900px) */
@media (max-width: 900px) {
  .contact-cta {
    padding: 50px 20px;
  }

  .cta-content h2 {
    font-size: 1.8em;
  }

  .cta-content p {
    font-size: 1.1em;
    max-width: 80%;
  }

  .cta-button {
    font-size: 1.1em;
    padding: 14px 35px;
  }
}

/* Large devices (desktops, 900px and above) */
@media (min-width: 900px) {
  .contact-cta {
    padding: 60px 20px;
  }

  .cta-content h2 {
    font-size: 2.1em;
  }

  .cta-content p {
    font-size: 1.1em;
    max-width: 400px;
  }

  .cta-button {
    font-size: 1.2em;
    padding: 15px 40px;
  }
}
