/* ============================================================
   Temirkhan Sabdenbek — athlete portfolio
   Palette: American flag
     --navy  : deep blue (backgrounds, headings)
     --red   : accent (highlights, buttons, stripes)
     --white : text on dark, card backgrounds
   Fonts:
     Barlow Condensed — display/headings (sporty, condensed)
     Inter            — body text
   Convention: no shorthand properties — every property is written
   out in its longhand form (border-*-width, padding-top, etc.).
   ============================================================ */

:root {
  --navy: #0a1f44;
  --navy-dark: #061229;
  --red: #bf0a30;
  --red-bright: #e0163c;
  --white: #ffffff;
  --off-white: #f4f6fa;
  --text-muted: #5a6579;

  --font-display: "Barlow Condensed", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: #1c2333;
  background-color: var(--off-white);
}

h1, h2, h3, .navbar-brand {
  font-family: var(--font-display);
  letter-spacing: .02em;
}

.text-red { color: var(--red-bright); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-usa {
  background-color: var(--red);
  color: var(--white);
  font-weight: 600;
  border-style: none;
  border-width: 0;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
  transition-property: transform, box-shadow, background-color;
  transition-duration: .2s, .2s, .2s;
  transition-timing-function: ease, ease, ease;
}
.btn-usa:hover, .btn-usa:focus {
  background-color: var(--red-bright);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(191, 10, 48, .35);
}

.btn-light-usa {
  background-color: var(--white);
  color: var(--navy);
  font-weight: 600;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
  transition-property: transform, box-shadow;
  transition-duration: .2s, .2s;
  transition-timing-function: ease, ease;
}
.btn-light-usa:hover {
  color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

/* ============================================================
   NAVBAR
   ============================================================ */
#mainNav {
  padding-top: 1rem;
  padding-right: 0;
  padding-bottom: 1rem;
  padding-left: 0;
  transition-property: background-color, padding, box-shadow;
  transition-duration: .3s, .3s, .3s;
  transition-timing-function: ease, ease, ease;
}
#mainNav.scrolled {
  background-color: var(--navy-dark);
  padding-top: .5rem;
  padding-bottom: .5rem;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .4);
}
/* solid background when the mobile menu is open, so links stay readable */
#mainNav:has(.navbar-collapse.show),
#mainNav:has(.navbar-collapse.collapsing) {
  background-color: var(--navy-dark);
}

#mainNav .navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  column-gap: .5rem;
  row-gap: .5rem;
}
#mainNav .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
  position: relative;
}
#mainNav .nav-link::after {
  content: "";
  position: absolute;
  left: .5rem;
  right: .5rem;
  bottom: .3rem;
  height: 2px;
  background-color: var(--red-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition-property: transform;
  transition-duration: .25s;
  transition-timing-function: ease;
}
#mainNav .nav-link:hover::after { transform: scaleX(1); }

/* small striped-flag mark next to the brand */
.brand-flag, .mini-flag {
  display: inline-block;
  width: 26px;
  height: 16px;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  border-bottom-left-radius: 2px;
  background-image:
    linear-gradient(180deg,
      var(--red) 0 20%, var(--white) 20% 40%,
      var(--red) 40% 60%, var(--white) 60% 80%, var(--red) 80% 100%);
  position: relative;
}
.brand-flag::before, .mini-flag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 45%;
  height: 60%;
  background-color: var(--navy);
}
.mini-flag {
  width: 20px;
  height: 12px;
  vertical-align: -1px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 7rem;
  padding-right: 0;
  padding-bottom: 4rem;
  padding-left: 0;
  color: var(--white);
  overflow-x: hidden;
  overflow-y: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url("../assets/img/hero-obstacle.jpg");
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
  animation-name: heroZoom;
  animation-duration: 14s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

.hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image:
    linear-gradient(100deg,
      rgba(6, 18, 41, .95) 0%,
      rgba(10, 31, 68, .82) 45%,
      rgba(10, 31, 68, .35) 100%);
}
/* red stripe on the left edge — flag accent */
.hero-overlay::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background-image: linear-gradient(180deg, var(--red-bright), var(--red));
}

.hero-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.hero-title {
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  font-weight: 800;
  line-height: .95;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 620px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, .85);
  margin-top: 1.25rem;
}

/* stats strip */
.hero-stats {
  column-gap: 2.2rem;
  row-gap: 1.2rem;
  margin-top: 1.8rem;
  margin-right: 0;
  margin-bottom: 2rem;
  margin-left: 0;
}
.hero-stats .stat {
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: var(--red-bright);
  padding-left: .8rem;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.stat-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .7);
}

/* round social icons */
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: .6rem;
  /*margin-bottom: 20px;*/
  border-top-width: 1px;
  border-right-width: 1px;
  border-bottom-width: 1px;
  border-left-width: 1px;
  border-top-style: solid;
  border-right-style: solid;
  border-bottom-style: solid;
  border-left-style: solid;
  border-top-color: rgba(255, 255, 255, .35);
  border-right-color: rgba(255, 255, 255, .35);
  border-bottom-color: rgba(255, 255, 255, .35);
  border-left-color: rgba(255, 255, 255, .35);
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
  border-bottom-left-radius: 50%;
  color: var(--white);
  font-size: 1.2rem;
  text-decoration-line: none;
  transition-property: background-color, border-color, transform;
  transition-duration: .2s, .2s, .2s;
  transition-timing-function: ease, ease, ease;
}
.icon-link i {
  margin-bottom: 8px;
}
.icon-link:hover {
  background-color: var(--red);
  border-top-color: var(--red);
  border-right-color: var(--red);
  border-bottom-color: var(--red);
  border-left-color: var(--red);
  color: var(--white);
  transform: translateY(-3px);
}

/* bouncing scroll hint */
.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .7);
  font-size: 1.6rem;
  animation-name: bounce;
  animation-duration: 2s;
  animation-timing-function: ease;
  animation-iteration-count: infinite;
}
.scroll-down:hover { color: var(--white); }
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 10px); }
}

/* hero entrance animation */
.anim-fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation-name: fadeUp;
  animation-duration: .8s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .3s; }
.delay-3 { animation-delay: .45s; }
.delay-4 { animation-delay: .6s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .25rem;
}
.section-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--navy);
}
.stripe {
  width: 120px;
  height: 6px;
  margin-top: .6rem;
  background-image: repeating-linear-gradient(90deg,
    var(--red) 0 24px, var(--white) 24px 36px, var(--navy) 36px 60px);
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
}

/* ============================================================
   JOURNEY CARDS
   ============================================================ */
.section-journey { background-color: var(--off-white); }

.j-card {
  border-style: none;
  border-width: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  overflow-x: hidden;
  overflow-y: hidden;
  box-shadow: 0 6px 22px rgba(10, 31, 68, .08);
  transition-property: transform, box-shadow;
  transition-duration: .25s, .25s;
  transition-timing-function: ease, ease;
}
.j-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(10, 31, 68, .16);
}

.j-card-img {
  position: relative;
  overflow-x: hidden;
  overflow-y: hidden;
}
.j-card-img img {
  height: 230px;
  width: 100%;
  object-fit: cover;
  transition-property: transform;
  transition-duration: .5s;
  transition-timing-function: ease;
}
.j-card:hover .j-card-img img { transform: scale(1.06); }

.j-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
  padding-top: .25rem;
  padding-right: .7rem;
  padding-bottom: .25rem;
  padding-left: .7rem;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
}

.j-card .card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
}
.j-card .card-text { color: var(--text-muted); }

.j-list {
  padding-left: 1.1rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.j-list li { margin-bottom: .35rem; }

.j-link {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--red);
  text-decoration-line: none;
  margin-top: .35rem;
}
.j-link:hover {
  color: var(--red-bright);
  text-decoration-line: underline;
}

/* Read more / Show less toggle */
.btn-toggle {
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  font-weight: 600;
  color: var(--navy);
  border-style: none;
  border-width: 0;
}
.btn-toggle:hover { color: var(--red); }
.btn-toggle .bi {
  transition-property: transform;
  transition-duration: .3s;
  transition-timing-function: ease;
  display: inline-block;
}
.btn-toggle[aria-expanded="true"] .bi { transform: rotate(180deg); }
.btn-toggle[aria-expanded="true"] .when-closed { display: none; }
.btn-toggle:not([aria-expanded="true"]) .when-open { display: none; }

/* CTA card — navy with subtle stars pattern */
.j-card-cta {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .06) 0 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .05) 0 2px, transparent 2px),
    linear-gradient(150deg, var(--navy) 0%, var(--navy-dark) 100%);
  background-position: 0 0, 12px 20px, 0 0;
  background-size: 46px 46px, 52px 52px, auto;
  background-repeat: repeat, repeat, no-repeat;
  color: rgba(255, 255, 255, .85);
}
.j-card-cta .card-text { color: rgba(255, 255, 255, .75); }
.cta-icon {
  font-size: 2.4rem;
  color: var(--red-bright);
}

/* ============================================================
   GALLERY — expandable slider
   (Bootstrap carousel; click/tap a slide to open it full-size
   in the lightbox modal. Indicators are generated by js/main.js.)
   ============================================================ */
.section-gallery { background-color: var(--white); }

#galleryCarousel {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  overflow-x: hidden;
  overflow-y: hidden;
  box-shadow: 0 10px 30px rgba(10, 31, 68, .15);
}

.g-slide {
  width: 100%;
  height: 62vh;
  min-height: 320px;
  max-height: 640px;
  object-fit: cover;
  cursor: zoom-in;
}

/* small "expand" badge in the corner of the slider */
.g-expand-hint {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  column-gap: .4rem;
  row-gap: .4rem;
  background-color: rgba(6, 18, 41, .65);
  color: var(--white);
  font-size: .8rem;
  padding-top: .3rem;
  padding-right: .6rem;
  padding-bottom: .3rem;
  padding-left: .6rem;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
  pointer-events: none;
}

/* lightbox: fullscreen photo view */
.lightbox-modal .modal-content {
  background-color: transparent;
  border-style: none;
  border-width: 0;
  box-shadow: none;
}
.lightbox-modal img {
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 6px;
}
.lightbox-close {
  position: absolute;
  top: -2.4rem;
  right: 0;
  z-index: 10;
}

/* lightbox prev/next arrows — the slider keeps working while zoomed in */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background-color: rgba(6, 18, 41, .55);
  color: var(--white);
  font-size: 1.4rem;
  border-style: none;
  border-width: 0;
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
  border-bottom-left-radius: 50%;
  transition-property: background-color, transform;
  transition-duration: .2s, .2s;
  transition-timing-function: ease, ease;
}
.lightbox-nav:hover {
  background-color: var(--red);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-prev { left: .8rem; }
.lightbox-next { right: .8rem; }

@media (max-width: 575.98px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .lightbox-prev { left: .4rem; }
  .lightbox-next { right: .4rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background-image:
    linear-gradient(0deg, rgba(6, 18, 41, .97), rgba(6, 18, 41, .97)),
    url("../assets/img/worldcup-budapest-group.jpg");
  background-position: center, center;
  background-size: auto, cover;
  background-repeat: repeat, no-repeat;
  color: rgba(255, 255, 255, .85);
  border-top-width: 6px;
  border-top-style: solid;
  border-top-color: var(--red);
}
.footer-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}
.footer-text {
  color: rgba(255, 255, 255, .65);
  max-width: 420px;
}

.contact-list li {
  display: flex;
  align-items: center;
  column-gap: .9rem;
  row-gap: .9rem;
  margin-bottom: .9rem;
  font-size: 1.05rem;
}
.contact-list .bi {
  color: var(--red-bright);
  font-size: 1.2rem;
}
.contact-list a {
  color: rgba(255, 255, 255, .9);
  text-decoration-line: none;
  transition-property: color;
  transition-duration: .2s;
  transition-timing-function: ease;
}
.contact-list a:hover { color: var(--red-bright); }

.footer-hr {
  border-top-color: rgba(255, 255, 255, .15);
  margin-top: 2rem;
  margin-right: 0;
  margin-bottom: 1rem;
  margin-left: 0;
}
.footer-bottom {
  color: rgba(255, 255, 255, .5);
  column-gap: .5rem;
  row-gap: .5rem;
}

/* developer credit in the footer */
.dev-credit a {
  color: rgba(255, 255, 255, .5);
  text-decoration-line: none;
  margin-left: .35rem;
  transition-property: color;
  transition-duration: .2s;
  transition-timing-function: ease;
}
.dev-credit a:hover { color: var(--red-bright); }

/* ============================================================
   SCROLL-REVEAL (elements with .reveal get .visible from js/main.js)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition-property: opacity, transform;
  transition-duration: .7s, .7s;
  transition-timing-function: ease, ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim-fade-up, .hero-bg, .scroll-down {
    animation-name: none;
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition-property: none;
  }
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 991.98px) {
  #mainNav .navbar-collapse { padding-bottom: 1rem; }
}

/* phones: vertical hero photo + tighter typography */
@media (max-width: 767.98px) {
  .hero-bg {
    background-image: url("../assets/img/climb-uipm.jpg");
    background-position: center top;
  }
  /* vertical photo needs a slightly stronger, more even overlay */
  .hero-overlay {
    background-image:
      linear-gradient(180deg,
        rgba(6, 18, 41, .93) 0%,
        rgba(10, 31, 68, .78) 55%,
        rgba(10, 31, 68, .55) 100%);
  }
}

@media (max-width: 575.98px) {
  .hero {
    padding-top: 6rem;
  }
  .hero-kicker {
    font-size: .85rem;
    letter-spacing: .22em;
  }
  .hero-title {
    font-size: 2.7rem;
  }
  .hero-lead {
    font-size: .95rem;
    line-height: 1.55;
  }
  .hero-stats {
    column-gap: 1.2rem;
    row-gap: .9rem;
  }
  .stat-num { font-size: 1.5rem; }
  .stat-label { font-size: .7rem; }
  .g-slide {
    height: 46vh;
    min-height: 260px;
  }
}
