/* ITTechnology/04-services/style.css - Section-specific styles */

/* Header Row */
.dsv-head {
  display: grid;
  grid-template-columns: max-content 1px minmax(0, 1fr);
  gap: clamp(28px, 4.6cqi, 68px);
  align-items: center;
}

.dsv-h {
  margin-top: clamp(20px, 2.2cqi, 30px);
}

.dsv-h .l {
  display: block;
}

.dsv-h .p {
  color: var(--purple);
}

.dsv-rule {
  width: 1px;
  height: clamp(76px, 7.2cqi, 104px);
  background: var(--line);
}

.dsv-lead {
  max-width: 30em;
}

/* Services 5-Column Grid */
.itm-grid {
  max-width: 1400px;
  margin: clamp(40px, 4.6cqi, 64px) auto 0;
  padding-inline: clamp(12px, 2.1cqi, 30px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.1cqi, 16px);
  list-style: none;
}

.itm-c {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: clamp(270px, 22cqi, 320px);
  padding: clamp(20px, 2cqi, 28px) clamp(18px, 1.8cqi, 26px) clamp(74px, 6.6cqi, 92px);
  border-radius: clamp(18px, 1.9cqi, 26px);
  background: #FFFEF9;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .075);
  color: #000;
  transition: background-color .35s, color .35s, box-shadow .35s;
	cursor:pointer;

}

.itm-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.itm-ic {
  width: clamp(36px, 3.1cqi, 44px);
  color: var(--ic);
  transition: color .35s;
}

.itm-ic .ic {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  stroke-width: 1.6;
}

.itm-go {
  width: 26px;
  height: 26px;
  flex: none;
  stroke-width: 1.7;
  transition: transform .3s var(--ease);
}

.itm-t {
  margin-top: clamp(26px, 2.8cqi, 40px);
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(19px, 1.55cqi, 23px);
  line-height: 1.12;
  letter-spacing: -.022em;
}

.itm-d {
  margin-top: clamp(12px, 1.2cqi, 16px);
  font-size: clamp(14.5px, 1.1cqi, 16px);
  line-height: 1.5;
  color: rgba(0, 0, 0, .75);
  text-wrap: pretty;
  transition: color .35s;
}

.itm-sq {
  position: absolute;
  right: clamp(12px, 1.2cqi, 16px);
  bottom: clamp(12px, 1.2cqi, 16px);
  width: clamp(46px, 4.4cqi, 60px);
  aspect-ratio: 1;
  pointer-events: none;
}

.itm-sq i {
  position: absolute;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 4px;
  transition: transform .5s var(--ease), background-color .35s;
}

.itm-sq i:first-child { right: 0; top: 0; }
.itm-sq i:last-child { left: 0; bottom: 0; }

.itm-sq.lv i:first-child { background: #E9E4F5; }
.itm-sq.lv i:last-child { background: #D9D0EF; }
.itm-sq.am i:first-child { background: #FDEFD8; }
.itm-sq.am i:last-child { background: #FBE0B8; }
.itm-sq.ol i:first-child { background: #EFEDDC; }
.itm-sq.ol i:last-child { background: #DEDBB8; }
.itm-sq.or i:first-child { background: #FBE5DC; }
.itm-sq.or i:last-child { background: #F6CDBD; }

/* Active card: hovered, focused, or the first card while none is hovered */
:is(.itm-c:hover, .itm-c:focus-visible, .itm-grid:not(:has(.itm-c:hover, .itm-c:focus-visible)) .itm-c.f) {
  background: var(--purple);
  color: var(--paper);
  box-shadow: 0 30px 50px -34px rgba(60, 40, 120, .75);
}

:is(.itm-c:hover, .itm-c:focus-visible, .itm-grid:not(:has(.itm-c:hover, .itm-c:focus-visible)) .itm-c.f) .itm-ic {
  color: var(--paper);
}

:is(.itm-c:hover, .itm-c:focus-visible, .itm-grid:not(:has(.itm-c:hover, .itm-c:focus-visible)) .itm-c.f) .itm-d {
  color: rgba(251, 250, 242, .86);
}

:is(.itm-c:hover, .itm-c:focus-visible, .itm-grid:not(:has(.itm-c:hover, .itm-c:focus-visible)) .itm-c.f) .itm-sq i:first-child {
  background: rgba(206, 196, 234, .42);
}

:is(.itm-c:hover, .itm-c:focus-visible, .itm-grid:not(:has(.itm-c:hover, .itm-c:focus-visible)) .itm-c.f) .itm-sq i:last-child {
  background: rgba(206, 196, 234, .72);
}

.itm-c:hover .itm-go {
  transform: translateX(4px);
}

.itm-c:hover .itm-sq i:first-child {
  transform: translate(3px, -3px);
}

.itm-c:hover .itm-sq i:last-child {
  transform: translate(-3px, 3px);
}

/* Aligned subgrid rows */
@container page (min-width: 641px) {
  .itm-grid li { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .itm-c { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .itm-t { align-self: end; }
}

@media (min-width: 641px) {
  .itm-grid li { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .itm-c { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .itm-t { align-self: end; }
}

/* RESPONSIVE */
@container page (max-width: 1100px) {
  .itm-sec .dsv-head { grid-template-columns: minmax(0, 1.25fr) 1px minmax(0, .75fr); }
  .itm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .itm-c { min-height: 0; }
}

@media (max-width: 1100px) {
  .itm-sec .dsv-head { grid-template-columns: minmax(0, 1.25fr) 1px minmax(0, .75fr); }
  .itm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .itm-c { min-height: 0; }
}

@container page (max-width: 860px) {
  .itm-sec .dsv-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dsv-rule { display: none; }
}

@media (max-width: 860px) {
  .itm-sec .dsv-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dsv-rule { display: none; }
}

@container page (max-width: 640px) {
  .itm-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad);
    padding: 4px var(--pad) 14px;
    scrollbar-width: none;
  }
  .itm-grid::-webkit-scrollbar { display: none; }
  .itm-grid li { flex: 0 0 80%; scroll-snap-align: start; }
}

@media (max-width: 640px) {
  .itm-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad);
    padding: 4px var(--pad) 14px;
    scrollbar-width: none;
  }
  .itm-grid::-webkit-scrollbar { display: none; }
  .itm-grid li { flex: 0 0 80%; scroll-snap-align: start; }
}
