/* Project AGR visual system — transparent section that inherits the site's background */
.agr-projects{
  --agr-blue:#2d6cff;
  --agr-blue-2:#267cff;
  --agr-purple:#7657ff;
  --agr-dark:#181818;
  --agr-muted:#3f3f46;
  width:100%;
  box-sizing:border-box;
  color:var(--agr-dark);
  font-family:inherit;
  position:relative;
  padding:48px clamp(16px,5vw,64px) 58px;
  background:transparent !important;
  overflow:visible;
}
.agr-projects *{box-sizing:border-box}
.agr-projects__heading{max-width:1160px;margin:0 auto 30px}
.agr-projects__title{
  margin:0 0 8px;
  font-size:clamp(36px,5vw,58px);
  line-height:1.02;
  letter-spacing:-.045em;
  font-weight:800;
}
.agr-projects__title-my{color:#111}
.agr-projects__title-gradient{
  display:inline-block;
  background:linear-gradient(100deg,#176bff 0%,#2f79ff 42%,#7756ff 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;
}
.agr-projects__location{
  display:flex;
  align-items:center;
  gap:9px;
  color:#202020;
  font-size:clamp(15px,2vw,19px);
  line-height:1.5;
}
.agr-projects__location-icon{font-size:19px;line-height:1}
.agr-projects__country{font-weight:700;color:#111}
.agr-projects__list{
  width:100%;
  max-width:1160px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
}
.agr-project-card{
  display:flex;
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(24,24,24,.12);
  border-radius:24px;
  background:transparent !important;
  color:var(--agr-dark);
  box-shadow:0 8px 28px rgba(20,40,90,.06);
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.agr-project-card:hover{
  transform:translateY(-2px);
  border-color:rgba(45,108,255,.25);
  box-shadow:0 14px 34px rgba(20,40,90,.10);
}
.agr-project-card__image{
  flex:0 0 190px;
  width:190px;
  height:190px;
  min-height:190px;
  overflow:hidden;
  background:#f5f7fb;
  margin:18px 0 18px 18px;
  border-radius:18px;
}
.agr-project-card__image img{
  display:block;
  width:100%;
  height:100%;
  min-height:0;
  object-fit:contain;
}
.agr-project-card__body{
  display:flex;
  flex:1;
  min-width:0;
  flex-direction:column;
  padding:28px 28px 28px 24px;
}
.agr-project-card__title{
  margin:0 0 9px;
  color:#111 !important;
  font-size:clamp(20px,2.4vw,28px);
  line-height:1.2;
  font-weight:800;
  letter-spacing:-.025em;
}
.agr-project-card__description{
  margin:0;
  color:#202020 !important;
  font-size:clamp(15px,1.7vw,18px);
  line-height:1.55;
  max-width:700px;
}
.agr-project-card__actions{
  margin-top:auto;
  padding-top:22px;
  display:flex;
  justify-content:flex-end;
}
.agr-project-card__open{
  position:relative;
  isolation:isolate;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-width:142px;
  min-height:54px;
  padding:12px 20px;
  border:0 !important;
  border-radius:15px;
  text-decoration:none !important;
  background:transparent !important;
  color:#2d6cff !important;
  font-size:17px;
  font-weight:800;
  line-height:1;
  box-shadow:none !important;
  transition:transform .2s ease,filter .2s ease;
}
/* Moving gradient exists only on the outline. The center stays transparent. */
.agr-project-card__open::before{
  content:"";
  position:absolute;
  inset:0;
  padding:2px;
  border-radius:inherit;
  background:linear-gradient(110deg,#176bff,#3c8dff,#7657ff,#176bff);
  background-size:300% 100%;
  animation:agr-border-flow 2.8s linear infinite;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  z-index:-1;
  filter:drop-shadow(0 0 5px rgba(45,108,255,.20));
}
.agr-project-card__open::after{
  content:"";
  position:absolute;
  inset:2px;
  border-radius:13px;
  background:transparent;
  z-index:-1;
}
.agr-project-card__open:hover{transform:translateY(-1px);filter:brightness(1.05)}
.agr-project-card__open:hover::before{filter:drop-shadow(0 0 8px rgba(45,108,255,.34))}
.agr-project-card__open > span:first-child{
  background:linear-gradient(100deg,#176bff 0%,#2f79ff 45%,#7657ff 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;
  background-size:220% 100%;
  animation:agr-text-flow 2.8s linear infinite;
}
.agr-project-card__external{
  display:inline-flex;
  align-items:center;
  color:#111;
}
.agr-project-card__external svg{width:21px;height:21px}
.agr-project-card__external-image{
  display:block;
  width:21px;
  height:21px;
  object-fit:contain;
}
.agr-projects__loading{
  width:100%;
  max-width:1160px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
}
.agr-projects__loading span{
  height:190px;
  border-radius:24px;
  border:1px solid rgba(24,24,24,.10);
  background:linear-gradient(90deg,rgba(0,0,0,.025),rgba(45,108,255,.07),rgba(0,0,0,.025));
  background-size:200% 100%;
  animation:agr-shimmer 1.2s infinite;
}
.agr-projects__empty{
  padding:25px 28px;
  border:1px solid rgba(24,24,24,.12);
  border-radius:20px;
  color:#202020;
  background:transparent;
  font-size:16px;
}
@keyframes agr-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
@keyframes agr-border-flow{0%{background-position:0% 50%}100%{background-position:300% 50%}}
@keyframes agr-text-flow{0%{background-position:0% 50%}100%{background-position:220% 50%}}
@media(max-width:700px){
  .agr-projects{padding:38px 15px 46px}
  .agr-projects__heading{margin-bottom:24px}
  .agr-projects__title{font-size:38px}
  .agr-project-card{display:block;border-radius:22px}
  .agr-project-card__image{width:180px;height:180px;min-height:180px;margin:15px auto 0;border-radius:17px}
  .agr-project-card__image img{min-height:0}
  .agr-project-card__body{padding:20px 18px 19px}
  .agr-project-card__title{font-size:23px}
  .agr-project-card__description{font-size:16px}
  .agr-project-card__actions{justify-content:flex-start;padding-top:20px}
  .agr-project-card__open{width:100%;min-height:52px}
}
@media(prefers-reduced-motion:reduce){
  .agr-project-card,.agr-project-card__open{transition:none}
  .agr-projects__loading span,.agr-project-card__open::before,.agr-project-card__open > span:first-child{animation:none}
}

/* Availability status and project details modal */
.agr-project-card{cursor:pointer}
.agr-project-card__status{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:14px;
  font-size:15px;
  line-height:1.45;
  font-weight:500;
}
.agr-project-card__status strong{font-weight:700}
.agr-project-card__status-icon{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;flex:0 0 21px}
.agr-project-card__status-icon svg{width:21px;height:21px;display:block}
.agr-project-card__status.is-available{color:#159447}
.agr-project-card__status.is-unavailable{color:#e33434}

.agr-project-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease,visibility .2s ease;
}
.agr-project-modal.is-open{visibility:visible;opacity:1;pointer-events:auto}
.agr-project-modal__backdrop{position:absolute;inset:0;background:rgba(10,18,38,.48);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.agr-project-modal__dialog{
  position:relative;
  z-index:1;
  width:min(760px,100%);
  max-height:min(88vh,900px);
  overflow:auto;
  padding:28px;
  border:1px solid rgba(45,108,255,.22);
  border-radius:28px;
  background:#fff;
  color:#111;
  box-shadow:0 30px 90px rgba(15,35,80,.25);
  outline:none;
}
.agr-project-modal__close{
  position:absolute;
  top:15px;
  right:15px;
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  background:#f4f6fb;
  color:#111;
  font-size:30px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.agr-project-modal__image-wrap{width:220px;height:220px;margin:0 auto 22px;border-radius:20px;overflow:hidden;background:#f7f8fb;display:flex;align-items:center;justify-content:center}
.agr-project-modal__image-wrap:empty{display:none}
.agr-project-modal__image-wrap img{display:block;width:100%;height:100%;object-fit:contain}
.agr-project-modal__title{margin:0 50px 10px 0;color:#111;font-size:clamp(27px,4vw,38px);line-height:1.15;font-weight:800;letter-spacing:-.03em}
.agr-project-modal__description{color:#222;font-size:17px;line-height:1.6;margin:0 0 24px}
.agr-project-modal__availability-title{font-size:20px;line-height:1.3;font-weight:800;margin:0 0 12px;color:#111}
.agr-project-modal__countries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;border-top:1px solid #eceef4;padding-top:12px}
.agr-project-modal__country{display:flex;align-items:center;gap:9px;min-width:0;padding:7px 8px;border-radius:10px;color:#222;font-size:15px;line-height:1.35}
.agr-project-modal__country-flag{font-size:19px;line-height:1;flex:0 0 auto}
.agr-project-modal__actions{display:flex;justify-content:flex-end;margin-top:24px;padding-top:20px;border-top:1px solid #eceef4}
.agr-project-modal__open{min-width:150px}
html.agr-modal-open,html.agr-modal-open body{overflow:hidden}
@media(max-width:700px){
  .agr-project-card__status{font-size:14px}
  .agr-project-modal{padding:12px}
  .agr-project-modal__dialog{padding:22px 18px;border-radius:23px;max-height:92vh}
  .agr-project-modal__image-wrap{width:190px;height:190px}
  .agr-project-modal__countries{grid-template-columns:1fr}
  .agr-project-modal__actions{justify-content:stretch}
  .agr-project-modal__open{width:100%}
}
