/* ===== MACHINING TAB ===== */

.mechanical-tab {
    margin: auto;
    padding: 30px;
    padding-top: 60px;
}

/* Title */
.machining-title {
    color: #1C1C1E;
    text-align: center;
    font-family: Montserrat;
    font-size: 36px;
    font-style: normal;
    font-weight: 500;
    max-width: 550px;
    margin: auto;
    margin-bottom: 60px;
}

.machining-title .highlight {
    background: linear-gradient(90deg, #6EC7AE 0%, #152823 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: Montserrat;
    font-size: 36px;
    font-style: normal;
    font-weight: 700;
    display: inline-block;
    background-size: 100% 100%;
    background-position: 0 0;
    background-repeat: no-repeat;
}

/* Large soft “cube” panels */
.machining-panel {
    max-width: 1200px;
    margin: auto;
    border-radius: 60px;
    background: #EAEBEB;
    padding: 40px;
    margin-bottom: 30px;
}

/* ========== Panel 1: two columns (photo+text / text+photo) ========== */
.panel-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.photo-card-left {
    position: relative;
  border-radius: 30px;
  overflow: hidden;
  max-height: auto;
  max-width: 1fr;
}

.photo-card-left img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* винаги пълни контейнера */
  display: block;
}

.photo-card-right {
    position: relative;
  border-radius: 30px;
  overflow: hidden;
  max-height: auto;
  max-width: 1fr;
}

.photo-card-right img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* винаги пълни контейнера */
  display: block;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: linear-gradient(114deg, rgba(198, 230, 223, 0.30) 0%, rgba(247, 248, 249, 0.10) 100.77%);       /* същия радиус като контейнера */
    z-index: 1;                /* върху снимката */
    pointer-events: none;       /* да не пречи на кликове */
}

.text-bubble-left {
    border-radius: 30px;
    background: #F7F8F9;
    padding: 20px;
    color: #000;
    font-family: Geologica;
    font-size: 20px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    margin-top: 20px;
}

.text-bubble-right {
    border-radius: 30px;
    background: #F7F8F9;
    padding: 20px;
    color: #000;
    font-family: Geologica;
    font-size: 20px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    margin-bottom: 20px;
}
/* ========== Panel 2 ========== */
/* Row with icons on the left and two green feature cards on the right */
.panel-row {
    justify-content: space-between;
    display: flex;
    gap: 20px;
}

.row-features .icons-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-box {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 30px;
    background: rgba(233, 255, 250, 0.50);
    box-shadow: 0.5px 0 2px 0 rgba(19, 224, 166, 0.60) inset;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-right: -40px;
    display: flex;            /* активира flexbox */
    justify-content: center;  /* център по хоризонтала */
    align-items: center; 
    z-index: 1;
}

.icon-box2 {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.50) 0%, rgba(58, 238, 187, 0.50) 100%);
    display: flex;            /* активира flexbox */
    justify-content: center;  /* център по хоризонтала */
    align-items: center;
    z-index: 0;
}

.icon-box img {
  height: 65px;
  width: auto;
  object-fit: contain;
  margin: auto;
}

.icon-box2 img {
  height: 70px;
  width: auto;
  object-fit: contain;
  margin: auto;
}


.feature-cards {
    width: 100%;
    display: flex;
    gap: 20px;
}

.feature-card {
    width: 100%;
    border-radius: 30px;
    background: linear-gradient(180deg, #F7F8FA 0%, #C6E6DF 100%);
    padding: 20px;
}

.feature-card h4 {
    color: #000;
    font-family: Geologica;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-bottom: 5px;
}
.feature-card p {
    color: #000;
    font-family: Geologica;
    font-size: 20px;
    font-style: normal;
    font-weight: 200;
    line-height: normal;
}

/* Bottom row: large photo left, text right */
.row-bottom {
    display: grid;
    grid-template-columns: 60% auto;
    margin-top: 22px;
    align-items: stretch;  
}

.text-bubble {
    border-radius: 30px;
    background: #F7F8F9;
    padding: 20px;
    color: #000;
    font-family: Geologica;
    font-size: 20px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    height: fit-content;
}


.photo-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    max-height: 265px;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* винаги пълни контейнера */
  display: block;
}

.mechanical-container{
    margin-top: 70px;
    margin-bottom: 100px;
}

.mechanical-container h2{
    color: #1C1C1E;
    text-align: center;
    font-family: Montserrat;
    font-size: 36px;
    font-style: normal;
    font-weight: 500;
    margin-bottom: 60px;
}

.mechanical-principles {
  max-width: 1200px;
  width: fit-content;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  background: linear-gradient(180deg, #EAEBEA 0%, #c6e6df 100%);
  padding: 30px;
  border-radius: 30px;
  margin: auto;
  min-height: fit-content;
}

.mechanical-box {
  background: linear-gradient(180deg, rgba(247, 248, 250, 0.70) 0%, rgba(247, 248, 250, 0.35) 100%);
  box-shadow: 0 1px 3px 1px #FFF inset;
  backdrop-filter: blur(2px);
  padding: 30px;
  border-radius: 20px;
  width: 270px;
  max-width: 100%; /* 3 gaps of 20px = 60px */
  min-height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mechanical-box img {
  width: auto;
  height: 100px;
  margin-top: 10px;
  margin-bottom: 30px;
}

.mechanical-box p {
    color: #000;
    font-family: Montserrat;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    text-align: left;
    align-self: flex-start;
    margin-top: auto;
}

@media (max-width: 1280px) {
    .panel-columns {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .machining-panel{
        max-width: 700px;
        padding: 30px;
        border-radius: 60px;
    }
    .photo-card-right{
        max-height: 280px;
    }
    .photo-card-left{
        max-height: 350px;
    }
    .panel-row{
        flex-direction: column;
    }
    .row-bottom{
        grid-template-columns: 1fr;
    }
    .icons-group{
        margin: auto;
    }
    .icon-box, .icon-box2{
        height: 150px;
        width: 150px;
        border-radius: 40px;
    }
    .icon-box{
        margin-right: -60px;
    }
    .icon-box img, .icon-box2 img {
        height: 85px;
    }
    .feature-cards{
        flex-direction: column;
    }
    .col-right {
        display: flex;
        flex-direction: column-reverse; /* обръща реда */
        gap: 20px;                      /* разстояние между елементите */
    }
    .text-bubble-right{
        margin-bottom: 0px;
    }
}


@media (max-width: 940px) {
    .machining-title, .machining-title .highlight, .mechanical-container h2 {
        font-size: 30px;
    }
}

@media (max-width: 600px) {
    .machining-title, .machining-title .highlight, .mechanical-container h2 {
        font-size: 28px;
    }
    .machining-panel{
        padding: 0px;
        border-radius: 0px;
        background: none;
    }
    .mechanical-tab{
        padding: 20px;
        padding-top: 60px;
    }
    .text-bubble, .text-bubble-left, .text-bubble-right{
        background: white;
        border: 2px solid #EAEBEB;
    }
    .feature-card{
        background: linear-gradient(180deg, #eaebea 0%, #C6E6DF 100%);
    }
    .icon-box2{
        background: linear-gradient(180deg, white 0%, rgba(58, 238, 187, 0.50) 100%);
    }
    .icons-group{
        margin-top: 30px;
        margin-bottom: 10px;
    }
}

@media (max-width: 1260px) {
    .mechanical-principles {
        max-width: 620px;
    }
}

@media (max-width: 680px) {
    .mechanical-principles {
        max-width: 330px;
    }
    .mechanical-container{
        margin-top: 60px;
        margin-bottom: 60px;
    }

    .mechanical-container h2{
        margin-bottom: 40px;
    }
}

@media (max-width: 500px) {
    .mechanical-principles{
        max-width: 100%;
        padding: 20px;
    }
    .mechanical-box{
        width: 100%;
        min-width: 270px;
    }
}

/* Mechanical tab – staged fade/slide-in (uses existing @keyframes fadeSlideIn) */
/* Mechanical tab – staged fade/slide-in (0.2s steps; uses existing @keyframes fadeSlideIn) */
/* Panels fade in first */

.machining-title {
  opacity: 0;
  animation: fadeSlideIn 0.5s ease-out forwards;
  animation-delay: 0s; /* show title first */
}
.panel-1,
.panel-2 {
  opacity: 0;
  animation: fadeSlideIn 0.5s ease-out forwards;
}

/* delay so panels show before content */
.panel-1 {
  animation-delay: 0.1s;
}
.panel-2 {
  animation-delay: 0.3s;
}

/* Content inside panels */
.panel-1 .panel-columns {
  opacity: 0;
  animation: fadeSlideIn 0.5s ease-out forwards;
  animation-delay: 0.3s; /* after panel-1 background */
}

.panel-2 .row-features {
  opacity: 0;
  animation: fadeSlideIn 0.5s ease-out forwards;
  animation-delay: 0.5s; /* after panel-2 */
}

.panel-2 .row-bottom {
  opacity: 0;
  animation: fadeSlideIn 0.5s ease-out forwards;
  animation-delay: 0.7s;
}

/* rest stays the same */
.mechanical-container h2 {
  opacity: 0;
  animation: fadeSlideIn 0.5s ease-out forwards;
  animation-delay: 0.9s;
}

.mechanical-principles {
  opacity: 0;
  animation: fadeSlideIn 0.5s ease-out forwards;
  animation-delay: 1.1s;
}
@keyframes floatSoftUp2 {
  0%, 100% { transform: translateX(3px); }
  50%      { transform: translateX(-3px); }
}

@keyframes floatSoftDown2 {
  0%, 100% { transform: translateX(-3px); }
  50%      { transform: translateX(3px); }
}

.icon-box-wrap { 
  animation: floatSoftDown2 6s ease-in-out infinite; 
  will-change: transform;
  z-index: 1;
}
.icon-box2-wrap { 
  animation: floatSoftUp2 6s ease-in-out infinite; 
  will-change: transform;
  z-index: 0;
}


.photo-card-left { 
  animation: floatSoftUp1 6s ease-in-out infinite; 
  will-change: transform;
}
.photo-card-right { 
  animation: floatSoftDown1 6s ease-in-out infinite; 
  will-change: transform;
}
.photo-card {
    animation: floatSoftDown1 6s ease-in-out infinite; 
    will-change: transform;
}
