/* css/sections/licenses.css */

/* =========================
   LICENSES - Лицензии и дипломы
   ========================= */

.licenses{
  padding:100px 0;
  background:#fff;
}

.licenses__header{
  text-align:center;
  margin-bottom:56px;
}

.licenses__title{
  font-size:var(--text-6xl);
  font-weight:var(--font-black);
  color:var(--primary-dark);
  margin:0 0 14px;
  font-family:var(--font-display);
  letter-spacing:-1px;
  line-height:1.12;
}

.licenses__subtitle{
  font-size:var(--text-lg);
  color:var(--text-muted);
  margin:0;
  font-weight:var(--font-semibold);
}

/* =========================
   CARD
   ========================= */

.license-duo{
  background:#fff;
  border-radius:22px;
  overflow:hidden;
  border:1px solid rgba(17,24,39,.10);
  box-shadow:
    0 18px 45px rgba(17,24,39,.10),
    0 2px 10px rgba(17,24,39,.06);
  transition:transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-slow);
  display:flex;
  flex-direction:column;
  height:100%;
  min-width:0;
}

.license-duo:hover{
  transform:translateY(-6px);
  box-shadow:
    0 26px 60px rgba(17,24,39,.14),
    0 4px 14px rgba(17,24,39,.08);
  border-color:rgba(31,138,112,.35);
}

.license-duo__media{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  padding:18px;
  background:rgba(31,138,112,.06);
  min-height:320px;
}

.license-duo__page{
  margin:0;
  border-radius:16px;
  overflow:hidden;
  aspect-ratio:3/4;
  background:rgba(255,255,255,.85);
  border:1px solid rgba(17,24,39,.12);
  box-shadow:0 6px 16px rgba(17,24,39,.06);
  padding:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all var(--transition-base);
}

.license-duo__page:hover{
  transform:scale(1.02);
  box-shadow:0 8px 20px rgba(17,24,39,.12);
  border-color:rgba(31,138,112,.25);
}

.license-duo__page img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  border-radius:10px;
  background:transparent;
  cursor:zoom-in;
  transition:transform var(--transition-base);
  user-select:none;
  -webkit-user-drag:none;
}

.license-duo__page:hover img{
  transform:scale(1.02);
}

.license-duo__info{
  padding:18px 18px 20px;
  text-align:center;
  background:rgba(255,255,255,.90);
  border-top:1px solid rgba(17,24,39,.08);
}

.license-duo__title{
  margin:0 0 8px;
  color:var(--primary-dark);
  font-weight:var(--font-extrabold);
  line-height:1.25;
  font-size:18px;

  display:-webkit-box;
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;

  min-height:calc(2 * 1.25em);
}

.license-duo__meta{
  margin:0;
  color:var(--text-muted);
  font-weight:var(--font-semibold);
  font-size:14px;
}

/* =========================
   CAROUSEL ITEMS
   ========================= */

.licenses-carousel .carousel__track{
  align-items:stretch;
}

.licenses-carousel .carousel__track > *{
  flex:0 0 calc((100% - 24px) / 2);
  min-width:0;
}

@media (max-width:980px){
  .licenses{
    padding:80px 0;
  }

  .licenses__title{
    font-size:var(--text-5xl);
  }

  .licenses-carousel .carousel__track > *{
    flex:0 0 calc((100% - 24px) / 2);
  }

  .license-duo__media{
    gap:12px;
    padding:16px;
    min-height:300px;
  }

  .license-duo__title{
    font-size:17px;
    min-height:calc(2 * 1.25em);
  }
}

@media (max-width:640px){
  .licenses{
    padding:60px 0;
  }

  .licenses__title{
    font-size:var(--text-4xl);
  }

  .licenses-carousel .carousel__track > *{
    flex:0 0 100%;
  }

  .license-duo__media{
    grid-template-columns:1fr;
    min-height:auto;
  }
}

/*LIGHTBOX*/

:root{
  --lb-side-gap: 18px;
  --lb-arrow-size: var(--carousel-arrow-size, 46px);
  --lb-arrow-icon: var(--carousel-arrow-icon, 22px);
  --lb-dot-size: 8px;
  --lb-dot-size-active: 9px;
  --lb-close-size: 44px;
}

.lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(17,24,39,.85);
  backdrop-filter:blur(10px);

  display:none;
  align-items:center;
  justify-content:center;

  opacity:0;
  transition:opacity 250ms ease;
  cursor:pointer;
}

.lightbox.is-open{
  display:flex;
  opacity:1;
}

.lightbox.is-closing{
  opacity:0;
}

.lightbox__stage{
  position:relative;
  cursor:default;

  pointer-events:none;
}

.lightbox__pages{
  display:flex;
  gap:16px;
  align-items:center;

  position:relative;
  pointer-events:auto;
}

.lightbox__img{
  display:block;
  max-width:min(42vw, 520px);
  max-height:82vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 24px 70px rgba(0,0,0,0.5);
  background:#fff;
  user-select:none;
  -webkit-user-drag:none;
}

.lightbox__arrow{
  position:fixed;
  top:50%;
  transform:translateY(-50%);
  z-index:10001;

  width:var(--lb-arrow-size);
  height:var(--lb-arrow-size);
  border-radius:50%;

  background:linear-gradient(
    135deg,
    rgba(37,211,102,0.22),
    rgba(37,211,102,0.12)
  );
  border:2px solid rgba(37,211,102,0.35);

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;
  user-select:none;
  transition:all .25s ease;

  font-size:0;
  line-height:0;

  pointer-events:auto;
}

.lightbox__arrow > *{
  display:none !important;
}

.lightbox__arrow::after{
  content:"";
  width:var(--lb-arrow-icon);
  height:var(--lb-arrow-icon);
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='rgb(22,150,80)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.lightbox__arrow--prev::after{
  transform:rotate(180deg);
}

.lightbox__arrow:hover:not(:disabled){
  transform:translateY(-50%) translateY(-2px);
  box-shadow:0 10px 26px rgba(37,211,102,0.35);
}

.lightbox__arrow:disabled{
  opacity:.35;
  cursor:not-allowed;
}

.lightbox__arrow--prev{
  left:calc(50vw - min(42vw, 520px) - 8px - var(--lb-side-gap));
}

.lightbox__arrow--next{
  right:calc(50vw - min(42vw, 520px) - 8px - var(--lb-side-gap));
}

.lightbox__close{
  position:fixed;
  z-index:10002;

  width:var(--lb-close-size);
  height:var(--lb-close-size);
  border-radius:50%;

  background:linear-gradient(
    135deg,
    rgba(37,211,102,0.22),
    rgba(37,211,102,0.12)
  );
  border:2px solid rgba(37,211,102,0.35);

  cursor:pointer;
  user-select:none;
  transition:all .25s ease;

  font-size:0;
  line-height:0;

  pointer-events:auto;
}

.lightbox__close::before,
.lightbox__close::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:18px;
  height:2px;
  background:rgba(255,255,255,0.92);
  border-radius:2px;
  transform-origin:center;
}

.lightbox__close::before{ transform:translate(-50%,-50%) rotate(45deg); }
.lightbox__close::after{ transform:translate(-50%,-50%) rotate(-45deg); }

.lightbox__close:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 26px rgba(37,211,102,0.35);
}

.lightbox__close{
  top:18px;
  right:calc(50vw - min(42vw, 520px) - 8px);
}

.lightbox__dots{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  z-index:10002;

  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;

  pointer-events:auto;
}

.lightbox__dots{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  z-index:10002;

  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;

  padding:8px 12px;
  border-radius:999px;

  background:linear-gradient(
    135deg,
    rgba(37,211,102,0.18),
    rgba(37,211,102,0.10)
  );
  border:2px solid rgba(37,211,102,0.30);
  backdrop-filter:blur(10px);

  box-shadow:0 10px 26px rgba(0,0,0,0.18);
  pointer-events:auto;
}

.lightbox__dot{
  width:10px;
  height:10px;
  border-radius:50%;
  border:2px solid rgba(31,138,112,0.25);
  background:transparent;
  cursor:pointer;
  transition:all var(--transition-base);
  padding:0;
}

.lightbox__dot.is-active{
  width:32px;
  border-radius:6px;
  background:var(--primary);
  border-color:var(--primary);
}

/* hover */
.lightbox__dot:hover{
  border-color:var(--primary);
  transform:scale(1.3);
}

/* на мобиле чуть компактнее */
@media (max-width:640px){
  .lightbox__dots{
    padding:7px 10px;
    gap:8px;
    bottom:14px;
  }
  .lightbox__dot{
    width:7px;
    height:7px;
  }
  .lightbox__dot.is-active{
    width:20px;
    height:7px;
  }
}

.licenses-carousel .carousel__track{
  transition: transform 0.55s cubic-bezier(.22,.61,.36,1) !important;
  will-change: transform;
}
