/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #FFFFFF;
  background-color: #212121;
  -webkit-font-smoothing: antialiased;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ===== CSS Variables ===== */
:root {
  --color-red: #E53935;
  --color-blue: #1E88E5;
  --color-yellow: #FFC107;
  --color-bg-dark: #212121;
  --color-bg-card: #2C2C2C;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0BEC5;
  --color-line-grad: linear-gradient(135deg, #E53935, #1E88E5);
  --font-heading: 'Impact', 'Montserrat Black', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --container-max: 1280px;
  --container-padding: 20px;
  --nav-height: 60px;
  --transition-speed: 0.3s;
}

/* ===== Container ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-red);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  font-weight: bold;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition: background-color var(--transition-speed) ease,
              box-shadow var(--transition-speed) ease;
  min-height: var(--nav-height);
}

.site-header.is-scrolled {
  background-color: var(--color-bg-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  position: relative;
}

/* Brand */
.header__brand {
  flex-shrink: 0;
}

.site-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  color: #fff;
}

.logo__main {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--color-red);
  transform: skewX(-10deg);
  display: inline-block;
  letter-spacing: 1px;
}

.logo__sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: -2px;
}

/* Navigation */
.header__nav {
  display: flex;
  align-items: center;
}

.nav__list {
  display: flex;
  gap: 8px;
}

.nav__link {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-primary);
  padding: 8px 12px;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
  position: relative;
  letter-spacing: 0.5px;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-yellow);
  background: rgba(255,255,255,0.08);
}

.nav__link[aria-current="page"] {
  color: var(--color-red);
  border-bottom: 2px solid var(--color-red);
}

/* Tools */
.header__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-icon {
  background: none;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: 6px;
  line-height: 0;
  transition: color 0.2s;
}

.search-icon:hover,
.search-icon:focus-visible {
  color: var(--color-yellow);
}

.lang-switch {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 1px;
  border: 1px solid var(--color-text-secondary);
  padding: 2px 6px;
  border-radius: 2px;
}

/* Nav Toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-line-grad);
  transition: width 0.1s linear;
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--color-bg-card);
  border-top: 2px solid var(--color-blue);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.footer__brand .footer-logo {
  display: flex;
  flex-direction: column;
}

.footer__brand .logo__main {
  font-size: 20px;
  transform: skewX(-10deg);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__link {
  color: var(--color-blue);
  font-size: 14px;
  transition: color 0.2s;
  position: relative;
  padding-left: 16px;
}

.footer__link::before {
  content: '►';
  position: absolute;
  left: 0;
  color: var(--color-red);
  font-size: 10px;
  top: 2px;
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--color-yellow);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.footer__meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.footer__icp,
.footer__copyright {
  opacity: 0.7;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 28px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
  letter-spacing: 0.5px;
}

.btn:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-red);
  color: #fff;
}

.btn--primary:hover {
  background: #c62828;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(229,57,53,0.4);
}

.btn--secondary {
  background: var(--color-blue);
  color: #fff;
}

.btn--secondary:hover {
  background: #1565C0;
  transform: scale(1.05);
}

.btn--cta {
  background: var(--color-yellow);
  color: #000;
  font-weight: 800;
}

.btn--cta:hover {
  background: #FFB300;
  transform: scale(1.05) translateX(3px);
  box-shadow: 0 4px 12px rgba(255,193,7,0.4);
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: '/';
  margin-right: 8px;
  color: var(--color-text-secondary);
}

.breadcrumbs__link {
  color: var(--color-blue);
  transition: color 0.2s;
}

.breadcrumbs__link:hover {
  color: var(--color-yellow);
}

.breadcrumbs__current {
  color: var(--color-red);
  font-weight: 600;
}

/* ===== Grid System ===== */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Image Placeholder ===== */
.img-placeholder {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: var(--color-bg-card);
  border: 1px dashed var(--color-text-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.img-placeholder::after {
  content: '📷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  opacity: 0.4;
}

/* ===== Main Content wrappr ===== */
.main-content {
  padding-top: calc(var(--nav-height) + 20px);
  min-height: 60vh;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .header__nav {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--color-bg-dark);
    flex-direction: column;
    padding: 16px 20px;
    gap: 0;
    transform: translateY(-120%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 999;
  }

  .header__nav[data-open] {
    transform: translateY(0);
  }

  .nav__list {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  .nav__link {
    display: block;
    padding: 12px 8px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav-link[aria-current="page"] {
    border-bottom: 2px solid var(--color-red);
  }

  .header__tools .lang-switch {
    display: none;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__links {
    align-items: center;
  }

  .footer__link::before {
    display: none;
  }

  .footer__meta {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
}

/* ===== Focus Visible ===== */
:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: 2px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .nav-toggle__bar {
    transition: none;
  }

  .header__nav {
    transition: none;
  }

  .scroll-progress {
    transition: none;
  }
}
