/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================
   TOP NAVIGATION
   ============================================ */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  transition: transform 0.3s ease;
}

.top-nav.nav-hidden {
  transform: translateY(-100%);
}

.nav-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-name {
  font-size: 15px;
  font-weight: 600;
  color: rgba(202, 28, 86, 1);
  letter-spacing: -0.01em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-secondary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--text-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

:root {
  /* Base design tokens */
  --card-bg: #F7F7F7;
  --text-primary: #342B21;
  --text-secondary: rgba(52, 43, 33, 0.8);
  
  /* Column percentages - middle column emphasized (must total ~92% to account for gaps) */
  --column-1-percent: 22%;
  --column-2-percent: 52%;
  --column-3-percent: 22%;
  
  /* Mobile-first defaults (will be overridden by media queries) */
  --container-max-width: 100%;
  --container-padding: 16px;
  --gap: 20px;
  --card-radius: 12px;
  --project-height: auto;
  --card-small-height: 100px;
  --card-tall-height: 160px;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #ffffff;
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Container - responsive with fluid scaling */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 40px var(--container-padding);
  padding-top: 104px; /* Account for fixed nav (64px) + spacing */
  position: relative;
  overflow: hidden;
}

/* Section Header - Apple-inspired */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-title {
  font-size: 52px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 32px;
  line-height: 1.1;
  text-align: center;
}


/* Toggle Switch - Cursor-style */
.toggle-switch {
  display: inline-flex;
  align-items: stretch;
  position: relative;
  background-color: rgba(247, 247, 247, 1);
  border-radius: 999px;
  padding: 8px;
  gap: 4px;
  color: rgba(221, 221, 221, 1);
  width: fit-content;
  border: 1px solid rgba(221, 221, 221, 1);
}

.toggle-option {
  position: relative;
  z-index: 1;
  padding: 16px 32px;
  height: 50px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: rgba(0, 0, 0, 1);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.toggle-option:hover {
  color: rgba(0, 0, 0, 1);
}

.toggle-option.active {
  background: transparent;
  color: white;
}

.toggle-slider {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  background: linear-gradient(90deg, rgba(174, 48, 89, 1) 0%, rgba(246, 78, 101, 1) 100%);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toggle-option:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

/* Legacy Category Navigation (if needed) */
.category-nav {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 10px 24px;
  font-size: 17px;
  font-weight: 400;
  font-family: inherit;
  color: var(--text-primary);
  background-color: unset;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  position: relative;
  height: 50px;
}

.category-tab:hover {
  background-color: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 1);
}

.category-tab.active {
  background-color: unset;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 1);
}

.category-tab:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

/* Carousel wrapper */
.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

/* Carousel track */
.carousel {
  display: flex;
  gap: var(--gap);
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  width: fit-content;
  /* Start position accounts for first project alignment */
}

/* Project container - holds 5 cards in 3-column layout */
.project {
  display: flex;
  flex-shrink: 0;
  width: calc(100vw - var(--container-padding) * 2);
  height: var(--project-height);
}

.project.project-hidden {
  display: none !important;
}

/* Column layouts */
.column {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  flex-shrink: 0;
}

.column-1 {
  flex: 0 0 var(--column-1-percent);
  max-width: var(--column-1-percent);
  margin-right: var(--gap);
}

.column-2 {
  flex: 0 0 var(--column-2-percent);
  max-width: var(--column-2-percent);
  margin-right: var(--gap);
}

.column-3 {
  flex: 0 0 var(--column-3-percent);
  max-width: var(--column-3-percent);
  margin-right: 0;
  /* Staggered animation - column lags behind and catches up */
  transform: translateX(var(--column-3-lag, 0px));
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* When carousel is animating, column-3 lags behind */
.carousel.is-animating .column-3 {
  --column-3-lag: 0px;
  transition: transform 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Card base styles */
.card {
  background-color: var(--card-bg);
  border-radius: var(--card-radius);
  overflow: hidden;
  position: relative;
}

.card-small {
  height: var(--card-small-height);
  flex-shrink: 0;
  flex-grow: 0;
}

.card-tall {
  height: var(--card-tall-height);
  flex-shrink: 0;
  flex-grow: 0;
}

.card-full {
  height: 100%;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Video in cards */
video.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left bottom;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

/* Card with content (logo + text) */
.card-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  padding: 40px 32px;
}

.card-content-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
}

.card-logo {
  width: 106px;
  height: 120px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.card-logo svg {
  width: 88px;
  height: 88px;
}

.card-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
  width: 100%;
  flex-shrink: 0;
}

.card-company {
  font-size: 28px;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
  letter-spacing: 0.5px;
  line-height: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  line-height: 1.3;
  text-align: left;
}

.card-explore-btn {
  margin-top: auto;
  align-self: flex-start;
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-primary);
  background-color: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-explore-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.4);
}

/* Project 2 specific styling */
.project-2 .card {
  background-color: #F7F7F7;
}

.project-2 .card.card-tall.card-content {
  width: 100%;
}

.project-2 .card-content .card-logo {
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  height: 200px;
}

.project-2 .card-content .card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left top;
}

/* Project 2 logo - maximize size at breakpoints */
@media (min-width: 1440px) {
  .project-2 .card-content .card-logo {
    height: 220px;
  }
}

@media (min-width: 1280px) and (max-width: 1439px) {
  .project-2 .card-content .card-logo {
    height: 190px;
  }
}

@media (max-width: 767px) and (min-width: 640px) {
  .project-2 .card-content .card-logo {
    height: 140px;
  }
}

@media (max-width: 639px) {
  .project-2 .card-content .card-logo {
    height: 120px;
  }
}

/* Navigation buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  color: rgba(202, 28, 86, 1);
}

.carousel-nav:hover {
  background-color: #f5f5f5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.05);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav:disabled {
  display: none;
}

.carousel-nav-next {
  /* Button center at right edge of project, half outside */
  right: -24px;
}

.carousel-nav-prev {
  /* Button center at left edge of project, half outside */
  left: -24px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.pagination-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #d4d4d4;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-dot:hover {
  background-color: #a0a0a0;
}

.pagination-dot.active {
  background-color: var(--text-primary);
  width: 28px;
  border-radius: 5px;
}

/* ============================================
   RESPONSIVE STYLES - AP-inspired scaling
   ============================================ */

/* Large desktop (1440px - 1599px) */
@media (min-width: 1440px) and (max-width: 1599px) {
  :root {
    --container-padding: 60px;
    --gap: 20px;
    --card-radius: 24px;
    --project-height: 592px;
    --card-small-height: 186px;
    --card-tall-height: 382px;
    --column-1-percent: 24.24%;
    --column-2-percent: 48.48%;
    --column-3-percent: 24.24%;
  }
}

/* Extra large desktop (1600px - 1919px) - same card sizes, more margins */
@media (min-width: 1600px) and (max-width: 1919px) {
  :root {
    --container-padding: calc((100vw - 1320px) / 2);
    --gap: 20px;
    --card-radius: 24px;
    --project-height: 592px;
    --card-small-height: 186px;
    --card-tall-height: 382px;
    --column-1-percent: 24.24%;
    --column-2-percent: 48.48%;
    --column-3-percent: 24.24%;
  }
}

/* Full HD and above (1920px - 2559px) - same card sizes, more margins */
@media (min-width: 1920px) and (max-width: 2559px) {
  :root {
    --container-padding: calc((100vw - 1320px) / 2);
    --gap: 20px;
    --card-radius: 24px;
    --project-height: 592px;
    --card-small-height: 186px;
    --card-tall-height: 382px;
    --column-1-percent: 24.24%;
    --column-2-percent: 48.48%;
    --column-3-percent: 24.24%;
  }
}

/* 2K / QHD and above (2560px+) - same card sizes, more margins */
@media (min-width: 2560px) {
  :root {
    --container-padding: calc((100vw - 1320px) / 2);
    --gap: 20px;
    --card-radius: 24px;
    --project-height: 592px;
    --card-small-height: 186px;
    --card-tall-height: 382px;
    --column-1-percent: 24.24%;
    --column-2-percent: 48.48%;
    --column-3-percent: 24.24%;
  }
}

/* Desktop (1280px - 1439px) */
@media (max-width: 1439px) and (min-width: 1280px) {
  :root {
    --container-padding: 50px;
    --gap: 18px;
    --card-radius: 22px;
    --project-height: 520px;
    --card-small-height: 163px;
    --card-tall-height: 340px;
    --column-1-percent: 24.24%;
    --column-2-percent: 48.48%;
    --column-3-percent: 24.24%;
  }
  
  .section-title {
    font-size: 44px;
  }
  
  .card-content {
    padding: 42px 36px;
  }
  
  .card-logo {
    width: 88px;
    height: 100px;
  }
  
  .card-logo svg {
    width: 72px;
    height: 72px;
  }
  
  .card-title {
    font-size: 16px;
  }
}

/* Medium-large screens (1024px - 1279px) */
@media (max-width: 1279px) and (min-width: 1024px) {
  :root {
    --container-padding: 40px;
    --gap: 16px;
    --card-radius: 20px;
    --project-height: 440px;
    --card-small-height: 138px;
    --card-tall-height: 290px;
    --column-1-percent: 24.24%;
    --column-2-percent: 48.48%;
    --column-3-percent: 24.24%;
  }
  
  .section-header {
    margin-bottom: 48px;
  }
  
  .section-title {
    font-size: 38px;
  }
  
  .category-tab {
    padding: 8px 18px;
    font-size: 14px;
  }
  
  .card-content {
    padding: 24px;
    gap: 8px;
  }
  
  .card-logo {
    width: 72px;
    height: 82px;
  }
  
  .card-logo svg {
    width: 56px;
    height: 56px;
  }
  
  .card-title {
    font-size: 14px;
  }
}

/* Tablet landscape (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  :root {
    --container-padding: 40px;
    --gap: 12px;
    --card-radius: 18px;
    --project-height: auto;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  .section-title {
    font-size: 32px;
  }
  
  .category-tab {
    padding: 8px 16px;
    font-size: 14px;
    height: 44px;
  }
  
  /* Keep horizontal carousel - 2-column layout for each project */
  .carousel-wrapper {
    overflow: hidden;
  }
  
  .carousel {
    display: flex;
    flex-direction: row;
    width: fit-content;
  }
  
  .project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    width: calc(100vw - var(--container-padding) * 2);
    height: auto;
    gap: var(--gap);
    flex-shrink: 0;
  }
  
  /* Hero takes full width on first row */
  .column-2 {
    grid-column: 1 / -1;
    grid-row: 1;
    flex: none;
    max-width: none;
  }
  
  /* Side columns share second row */
  .column-1 {
    grid-column: 1;
    grid-row: 2;
    flex: none;
    max-width: none;
  }
  
  .column-3 {
    grid-column: 2;
    grid-row: 2;
    flex: none;
    max-width: none;
  }
  
  .column,
  .column-1,
  .column-2,
  .column-3 {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin-right: 0;
  }
  
  .card {
    width: 100%;
    flex: none;
  }
  
  .card-small {
    height: 180px;
  }
  
  .card-tall {
    height: 260px;
  }
  
  .card-full {
    height: 340px;
    width: 100%;
  }
  
  .card-content {
    padding: 24px;
    gap: 8px;
  }
  
  .card-logo {
    width: 64px;
    height: 72px;
  }
  
  .card-logo svg {
    width: 52px;
    height: 52px;
  }
  
  .card-title {
    font-size: 14px;
  }
  
  .card-company {
    font-size: 22px;
  }
  
  .carousel-nav {
    display: none;
  }
  
  .pagination {
    margin-top: 24px;
  }
}

/* Tablet portrait (640px - 767px) */
@media (max-width: 767px) and (min-width: 640px) {
  :root {
    --container-padding: 32px;
    --gap: 10px;
    --card-radius: 16px;
    --project-height: auto;
  }
  
  .nav-container {
    height: 56px;
  }
  
  .section-header {
    margin-bottom: 32px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .category-tab {
    padding: 6px 14px;
    font-size: 13px;
    height: 40px;
  }
  
  /* Keep horizontal carousel - 2-column layout for each project */
  .carousel-wrapper {
    overflow: hidden;
  }
  
  .carousel {
    display: flex;
    flex-direction: row;
    width: fit-content;
  }
  
  .project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    width: calc(100vw - var(--container-padding) * 2);
    height: auto;
    gap: var(--gap);
    flex-shrink: 0;
  }
  
  /* Hero takes full width on first row */
  .column-2 {
    grid-column: 1 / -1;
    grid-row: 1;
    flex: none;
    max-width: none;
  }
  
  /* Side columns share second row */
  .column-1 {
    grid-column: 1;
    grid-row: 2;
    flex: none;
    max-width: none;
  }
  
  .column-3 {
    grid-column: 2;
    grid-row: 2;
    flex: none;
    max-width: none;
  }
  
  .column,
  .column-1,
  .column-2,
  .column-3 {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin-right: 0;
  }
  
  .card {
    width: 100%;
    flex: none;
  }
  
  .card-small {
    height: 160px;
  }
  
  .card-tall {
    height: 240px;
  }
  
  .card-full {
    height: 300px;
    width: 100%;
  }
  
  .card-content {
    padding: 20px;
    gap: 6px;
  }
  
  .card-logo {
    width: 56px;
    height: 64px;
  }
  
  .card-logo svg {
    width: 44px;
    height: 44px;
  }
  
  .card-title {
    font-size: 13px;
  }
  
  .card-company {
    font-size: 20px;
  }
  
  .carousel-nav {
    display: none;
  }
  
  .pagination {
    margin-top: 20px;
    gap: 10px;
  }
  
  .pagination-dot {
    width: 8px;
    height: 8px;
  }
  
  .pagination-dot.active {
    width: 22px;
  }
}

/* Mobile landscape / Large mobile (480px - 639px) */
@media (max-width: 639px) and (min-width: 480px) {
  :root {
    --container-padding: 24px;
    --gap: 8px;
    --card-radius: 14px;
    --project-height: auto;
  }
  
  .nav-container {
    height: 52px;
  }
  
  .section-header {
    margin-bottom: 24px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .category-nav {
    gap: 6px;
  }
  
  .category-tab {
    padding: 6px 12px;
    font-size: 12px;
    height: 36px;
  }
  
  /* Keep horizontal carousel - single column layout per project */
  .carousel-wrapper {
    overflow: hidden;
  }
  
  .carousel {
    display: flex;
    flex-direction: row;
    width: fit-content;
  }
  
  .project {
    display: flex;
    flex-direction: column;
    width: calc(100vw - var(--container-padding) * 2);
    height: auto;
    gap: var(--gap);
    flex-shrink: 0;
  }
  
  .column,
  .column-1,
  .column-2,
  .column-3 {
    width: 100%;
    max-width: 100%;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin-right: 0;
  }
  
  .column-2 {
    order: -1;
  }
  
  .card {
    width: 100%;
    flex: none;
  }
  
  .card-small {
    height: 160px;
  }
  
  .card-tall {
    height: 200px;
  }
  
  .card-full {
    height: 260px;
    width: 100%;
  }
  
  .card-content {
    padding: 16px;
    gap: 6px;
  }
  
  .card-logo {
    width: 48px;
    height: 56px;
  }
  
  .card-logo svg {
    width: 40px;
    height: 40px;
  }
  
  .card-title {
    font-size: 12px;
  }
  
  .card-company {
    font-size: 18px;
  }
  
  .carousel-nav {
    display: none;
  }
  
  .pagination {
    margin-top: 16px;
    gap: 8px;
  }
  
  .pagination-dot {
    width: 6px;
    height: 6px;
  }
  
  .pagination-dot.active {
    width: 18px;
  }
}

/* Mobile (up to 479px) - Single project view, swipe navigation */
@media (max-width: 479px) {
  :root {
    --container-padding: 16px;
    --gap: 8px;
    --card-radius: 12px;
    --project-height: auto;
  }
  
  .nav-container {
    height: 52px;
  }
  
  .nav-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }
  
  .nav-name {
    font-size: 14px;
  }
  
  .nav-menu {
    gap: 16px;
  }
  
  .nav-link {
    font-size: 13px;
  }
  
  .container {
    padding: 24px var(--container-padding);
    padding-top: 76px;
  }
  
  .section-header {
    margin-bottom: 20px;
  }
  
  .section-title {
    font-size: 22px;
    margin-bottom: 8px;
  }
  
  .category-nav {
    gap: 4px;
  }
  
  .category-tab {
    padding: 6px 12px;
    font-size: 12px;
    height: 34px;
  }
  
  /* Keep horizontal carousel - single column layout per project */
  .carousel-wrapper {
    overflow: hidden;
  }
  
  .carousel {
    display: flex;
    flex-direction: row;
    width: fit-content;
  }
  
  .project {
    display: flex;
    flex-direction: column;
    width: calc(100vw - var(--container-padding) * 2);
    height: auto;
    gap: var(--gap);
    flex-shrink: 0;
  }
  
  .column,
  .column-1,
  .column-2,
  .column-3 {
    width: 100%;
    max-width: 100%;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin-right: 0;
  }
  
  /* Reorder for mobile - main content first */
  .column-2 {
    order: -1;
  }
  
  .card {
    width: 100%;
    flex: none;
  }
  
  .card-small {
    height: 140px;
  }
  
  .card-tall {
    height: 180px;
  }
  
  .card-full {
    height: 220px;
    width: 100%;
  }
  
  .card-content {
    padding: 12px;
    gap: 4px;
  }
  
  .card-logo {
    width: 40px;
    height: 48px;
  }
  
  .card-logo svg {
    width: 32px;
    height: 32px;
  }
  
  .card-title {
    font-size: 11px;
    line-height: 1.2;
  }
  
  .card-company {
    font-size: 16px;
  }
  
  .carousel-nav {
    display: none;
  }
  
  .pagination {
    margin-top: 16px;
  }
  
  .pagination-dot {
    width: 6px;
    height: 6px;
  }
  
  .pagination-dot.active {
    width: 16px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .carousel-nav {
    min-width: 44px;
    min-height: 44px;
  }
  
  .pagination-dot {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .pagination-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: inherit;
    border-radius: inherit;
  }
  
  .pagination-dot.active::before {
    width: 20px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .carousel {
    transition: none;
  }
  
  .carousel-nav,
  .pagination-dot {
    transition: none;
  }
  
  .p2-slide {
    animation: none;
  }
  
  .p2-slide-1 {
    opacity: 1;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--text-primary);
  }
  
  .carousel-nav {
    border: 2px solid var(--text-primary);
  }
}

/* Navigation responsive styles - merged with main breakpoints above */

/* Dark mode support */
/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: #F7F7F7;
  padding: 60px 0 40px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 980px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.footer-link:hover {
  background-color: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.3);
}

.footer-link svg {
  flex-shrink: 0;
}

.footer-copyright {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-copyright p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Footer responsive styles */
@media (max-width: 767px) {
  .site-footer {
    padding: 40px 0 32px;
    margin-top: 48px;
  }
  
  .footer-content {
    gap: 24px;
    margin-bottom: 32px;
  }
  
  .footer-title {
    font-size: 20px;
  }
  
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  .footer-link {
    font-size: 14px;
    padding: 10px 16px;
  }
}

@media (max-width: 479px) {
  .site-footer {
    padding: 32px 0 24px;
    margin-top: 32px;
  }
  
  .footer-content {
    gap: 20px;
    margin-bottom: 24px;
  }
  
  .footer-title {
    font-size: 18px;
  }
  
  .footer-link {
    font-size: 13px;
    padding: 8px 14px;
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #1a2332;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
  }
  
  body {
    background-color: #0a0a0a;
    background-image: radial-gradient(ellipse 80% 35% at 50% 0%, rgba(40, 28, 32, 1) 0%, rgba(30, 26, 28, 0.7) 40%, rgba(10, 10, 10, 0) 100%);
  }
  
  .category-tab {
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .category-tab:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 1);
  }
  
  .category-tab.active {
    background-color: unset;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 1);
  }
  
  .carousel-nav {
    background-color: #1a1a1a;
    color: #ffffff;
  }
  
  .carousel-nav:hover {
    background-color: #2a2a2a;
  }
  
  .pagination-dot {
    background-color: #4a4a4a;
  }
  
  .pagination-dot.active {
    background-color: #ffffff;
  }
  
  .top-nav {
    background-color: rgba(10, 10, 10, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  
  .nav-name {
    color: #ffffff;
  }
  
  .nav-link {
    color: #ffffff;
  }
  
  .nav-link:hover {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .nav-link::after {
    background-color: #ffffff;
  }
  
  .toggle-switch {
    background-color: #2a2a2a;
  }
  
  .toggle-option {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .toggle-option:hover {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .toggle-option.active {
    color: #ffffff;
  }
  
  .toggle-slider {
    background: linear-gradient(90deg, rgba(174, 48, 89, 1) 0%, rgba(246, 78, 101, 1) 100%);
  }
  
  .site-footer {
    background-color: #1a1a1a;
  }
  
  .footer-link {
    border-color: rgba(255, 255, 255, 0.15);
  }
  
  .footer-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
  }
  
  .footer-copyright {
    border-top-color: rgba(255, 255, 255, 0.1);
  }
}
