/* =========================
   SAIL TYPES — cards + CTA + hover + load animation
========================= */

.sail-types{
  --cs-ink: #0f2140;
  --cs-muted: #5f6b7a;
  --cs-border: rgba(15, 33, 64, .10);

  --st-container: 72rem;
  --st-gutter: clamp(1rem, 4vw, 3rem);
  --st-py: clamp(2.75rem, 6vw, 5rem);

  --st-card-bg: rgba(255, 255, 255, .6);
  --st-card-bg-hover: rgba(255, 255, 255, .82);
  --st-card-border: rgba(15, 33, 64, .12);
  --st-card-border-hover: rgba(15, 33, 64, .22);
  --st-card-shadow: 0 18px 50px rgba(15, 33, 64, .12);
  --st-card-shadow-hover: 0 14px 10px rgba(15, 33, 64, .16);

  --st-title: #005598;
  --st-btn-light: rgb(0, 85, 152);
  --st-btn-dark: rgb(32, 46, 82);
  --st-btn-text: #fafafa;
  --st-btn-border: rgba(255, 255, 255, 0.18);
  --st-btn-shadow: 0 10px 24px rgba(15, 33, 64, .12);

  --st-radius: 28px;

  position: relative;
  text-align: center;
  background: #fafafa;
}

.st-wrap{
  width: min(100%, var(--st-container));
  margin-inline: auto;
}

.st-header{
  margin-bottom: clamp(1.6rem, 4vw, 2.8rem);
}

.img-title-sailing-content{
  width: clamp(140px, 28vw, 240px);
  margin: 0 auto 1rem;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: transform .45s ease, opacity .45s ease;
  z-index: 1;
}

.img-title-sailing-content img{
  display: block;
  width: 80%;
  height: auto;
  margin-inline: auto;
}

.sail_types_title{
  max-width: 800px;
  margin: 0.5rem auto 1.5rem;
  color: var(--st-title);
  font-size: clamp(3rem, 4.5vw, 6rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
  z-index: 1;

  opacity: 0;
  transform: translateY(16px);
  transition: transform .55s ease, opacity .55s ease;
}

.sail_types_title::after{
  content: "";
  display: block;
  width: clamp(90px, 10vw, 140px);
  height: 2px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, rgba(15, 33, 64, .45), transparent);
  transform: scaleX(.6);
  transform-origin: center;
  opacity: 0;
  transition: transform .9s ease, opacity .9s ease;
}

/* Visible state */

.sail-types.is-visible .img-title-sailing-content{
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: .05s;
}

.sail-types.is-visible .sail_types_title{
  opacity: 1;
  transform: translateY(0);
  transition-delay: .14s;
}

.sail-types.is-visible .sail_types_title::after{
  opacity: 1;
  transform: scaleX(1);
  transition-delay: .28s;
}

/* =========================
   Grid
========================= */

.st-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  justify-items: center;
  align-items: stretch;
  gap: clamp(1.25rem, 3vw, 2.1rem);
  padding: 0;
  list-style: none;
}

/* =========================
   Card
========================= */

.st-card{
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  text-align: center;
  background: var(--st-card-bg);
  border: 1px solid var(--st-card-border);
  box-shadow: var(--st-card-shadow);
  backdrop-filter: blur(8px);

  opacity: 0;
  transform: translateY(24px) scale(.985);
  transition:
    transform .55s ease,
    box-shadow .35s ease,
    border-color .35s ease,
    background-color .35s ease,
    opacity .55s ease;
}

.sail-types.is-visible .st-card{
  opacity: 1;
  transform: translateY(0) scale(1);
}

.st-card:nth-child(1){ transition-delay: .18s; }
.st-card:nth-child(2){ transition-delay: .30s; }
.st-card:nth-child(3){ transition-delay: .42s; }

.st-card:hover,
.st-card:focus-within{
  transform: translateY(-6px);
  box-shadow: var(--st-card-shadow-hover);
  border-color: var(--st-card-border-hover);
  background: var(--st-card-bg-hover);
}

.st-icon{
  display: flex;
  justify-content: center;
  margin: 0 auto clamp(.9rem, 2vw, 1.1rem);
}

.st-icon-img{
  display: block;
  width: clamp(170px, 18vw, 220px);
  height: clamp(170px, 18vw, 220px);
  object-fit: contain;
  border-radius: 30px;
}

.st-card-title{
  max-width: 28ch;
  margin: 0 auto;
  color: var(--st-title);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.2;
  font-weight: 500;
}

.st-card-text{
  max-width: 34ch;
  margin: clamp(.65rem, 1.6vw, .9rem) auto 0;
  color: var(--cs-muted);
  font-size: clamp(1rem, 1.6vw, 1.05rem);
  line-height: 1.65;
}

/* =========================
   Buttons
========================= */

.st-btn{
  display: inline-block;
  width: max-content;
  margin-top: 1.2rem;
  padding: 3px 20px;
  color: var(--st-btn-text);
  border: 1px solid var(--st-btn-border);
  box-shadow: var(--st-btn-shadow);
  font-size: 1.3em;
  font-weight: 300;
  text-decoration: none;
  cursor: pointer;
  transition: transform .4s, background-color .4s;
}

.st-btn-dark{
  background: var(--st-btn-dark);
}

.st-btn-clear{
  background: var(--st-btn-light);
}

.st-btn-dark:hover{
  background: var(--st-btn-light);
  transform: translateY(-2px) !important;
}

.st-btn-clear:hover{
  background: var(--st-btn-dark);
  transform: translateY(-2px) !important;
}

/* Small button motion on card hover */

.st-card:hover .st-btn,
.st-card:focus-within .st-btn{
  transform: translateY(2px);
}

/* =========================
   Responsive
========================= */

@media (max-width: 1100px){
  .st-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .st-grid{
    grid-template-columns: 1fr;
  }

  .st-card-text{
    max-width: 52ch;
  }

  .sail_types_title{
    margin-bottom: 1.1rem;
  }
}

@media (max-width: 360px){
  .sail-types{
    padding-inline: 1rem;
  }
}

/* =========================
   Reduced motion
========================= */

@media (prefers-reduced-motion: reduce){
  .sail-types *,
  .sail-types *::before,
  .sail-types *::after{
    transition: none !important;
    animation: none !important;
  }

  .img-title-sailing-content,
  .sail_types_title,
  .sail_types_title::after,
  .st-card{
    opacity: 1 !important;
    transform: none !important;
  }
}
