:root {
  /* Sellathurai House Colors - Enhanced */
  --house-primary: #ff0033;
  --house-primary-rgb: 255, 0, 51;
  --house-dark: #cc0033;
  --house-light: #ff3366;
  --house-gradient: linear-gradient(135deg, #ff0033 0%, #990000 100%);
  --house-gradient-light: linear-gradient(135deg, #ff3366 0%, #ff0033 100%);

  /* UI Colors */
  --dark-bg: #0a0a0a;
  --darker-bg: #050505;
  --card-bg: rgba(30, 0, 0, 0.9);
  --card-bg-solid: #1a0000;
  --light-text: #ffffff;
  --gray-text: #e0e0e0;
  --light-gray: #666666;

  /* Shadows */
  --shadow-red: 0 10px 30px rgba(255, 0, 51, 0.3);
  --shadow-red-hover: 0 20px 50px rgba(255, 0, 51, 0.5);
  --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-light: 0 5px 15px rgba(255, 255, 255, 0.05);

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Glass effect */
  --glass-bg: rgba(20, 0, 0, 0.7);
  --glass-border: rgba(255, 0, 51, 0.2);
  --glass-blur: blur(20px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

/* =================================== */
/* RESPONSIVE NAVIGATION - ENHANCED */
/* =================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 2px solid rgba(255, 0, 51, 0.3);
  z-index: 1000;
  padding: 1rem 5%;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.8rem 5%;
  background: rgba(10, 0, 0, 0.98);
  box-shadow: var(--shadow-red);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Logo - Enhanced hover */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  z-index: 1002;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.logo:hover {
  background: rgba(255, 0, 51, 0.1);
  transform: translateY(-2px);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  line-height: 1.1;
  transition: var(--transition-fast);
}

.logo:hover .logo-main {
  text-shadow: 0 0 15px rgba(255, 0, 51, 0.5);
}

.logo-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--house-light);
  letter-spacing: 0.5px;
  transition: var(--transition-fast);
}

.logo:hover .logo-sub {
  color: white;
}

/* Menu Toggle - Enhanced */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  position: relative;
  transition: var(--transition);
}

.menu-toggle:hover span {
  background: white;
  box-shadow: 0 0 10px rgba(255, 0, 51, 0.5);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--house-primary);
  border-radius: 3px;
  transition: var(--transition);
  transform-origin: left center;
}

/* Navigation Links - Enhanced hover effects */
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.nav-link {
  color: var(--gray-text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 0, 51, 0.1);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
  height: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 0, 51, 0.15);
  transform: translateY(-2px);
}

.nav-link i {
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.nav-link:hover i {
  transform: scale(1.1);
  color: var(--house-light);
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 999;
  backdrop-filter: blur(5px);
}

/* =================================== */
/* HERO SECTION - ENHANCED HOVER EFFECTS */
/* =================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 5% 50px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  opacity: 70%;
  background-image: url(../images/back.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: zoomEffect 20s infinite alternate;
  transition: transform 0.5s ease;
}

@keyframes zoomEffect {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.1) rotate(0.5deg);
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 0, 0, 0.95) 0%,
    rgba(255, 0, 51, 0.2) 50%,
    rgba(10, 0, 0, 0.98) 100%
  );
}

.hero-content {
  text-align: center;
  max-width: 900px;
  width: 100%;
  z-index: 1;
  position: relative;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.1;
  transition: var(--transition);
}

.hero-title:hover .hero-highlight {
  text-shadow: 0 0 40px rgba(255, 0, 51, 0.5);
}

.hero-highlight {
  display: block;
  background: var(--house-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 0, 51, 0.3);
  transition: var(--transition);
}

.hero-subtitle {
  display: block;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--gray-text);
  font-weight: 400;
  margin-top: 0.5rem;
  transition: var(--transition);
}

.hero-title:hover .hero-subtitle {
  color: white;
  transform: translateY(2px);
}

.hero-description {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--gray-text);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.hero-stat-item {
  text-align: center;
  padding: 1rem;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  min-width: 100px;
  flex: 1;
  max-width: 180px;
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.hero-stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 0, 51, 0.1),
    transparent
  );
  transition: left 0.6s;
}

.hero-stat-item:hover::before {
  left: 100%;
}

.hero-stat-item:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--house-primary);
  box-shadow: var(--shadow-red-hover);
}

.hero-stat-number {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  background: var(--house-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  transition: var(--transition);
}

.hero-stat-item:hover .hero-stat-number {
  -webkit-text-fill-color: white;
  text-shadow: 0 0 20px rgba(255, 0, 51, 0.5);
}

.hero-stat-label {
  color: var(--gray-text);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  margin-top: 0.5rem;
  font-weight: 500;
  transition: var(--transition);
}

.hero-stat-item:hover .hero-stat-label {
  color: white;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.cta-btn {
  padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1rem);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cta-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
  z-index: -1;
}

.cta-btn:hover::before {
  width: 300px;
  height: 300px;
}

.primary-btn {
  background: var(--house-gradient);
  color: white;
  border: 2px solid transparent;
}

.primary-btn:hover {
  background: var(--house-gradient-light);
  border-color: white;
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-red-hover);
}

.secondary-btn {
  background: transparent;
  color: var(--house-primary);
  border: 2px solid var(--house-primary);
}

.secondary-btn:hover {
  background: rgba(255, 0, 51, 0.1);
  color: white;
  border-color: white;
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-red-hover);
}

.cta-btn i {
  transition: var(--transition-fast);
}

.cta-btn:hover i {
  transform: translateX(3px) scale(1.1);
}

/* =================================== */
/* SECTION STYLES - ENHANCED */
/* =================================== */

.section {
  padding: clamp(40px, 8vw, 80px) 5%;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  background: var(--house-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  display: inline-block;
  transition: var(--transition);
}

.section-title:hover {
  transform: translateY(-3px);
  text-shadow: 0 5px 15px rgba(255, 0, 51, 0.3);
}

.section-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--gray-text);
  font-weight: 400;
  transition: var(--transition);
}

.section-header:hover .section-subtitle {
  color: white;
  transform: translateY(2px);
}

/* Latest Year Section - Enhanced */
.highlight-section {
  background: linear-gradient(
    135deg,
    rgba(10, 0, 0, 0.95) 0%,
    rgba(26, 0, 0, 0.95) 100%
  );
  border-radius: var(--radius-xl);
  margin: 1rem auto;
  width: 100%;
  border: 1px solid rgba(255, 0, 51, 0.1);
  transition: var(--transition);
}

.highlight-section:hover {
  border-color: rgba(255, 0, 51, 0.3);
  box-shadow: var(--shadow-red);
}

.latest-year-container {
  padding: clamp(1rem, 3vw, 2rem);
}

.latest-year-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(255, 0, 51, 0.3);
  transition: var(--transition);
}

.latest-year-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-red-hover);
  border-color: var(--house-primary);
}

.latest-year-header {
  background: var(--house-gradient);
  padding: clamp(1rem, 3vw, 2rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.latest-year-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shine 3s infinite linear;
  z-index: 1;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.latest-year-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.latest-year-body {
  padding: clamp(1rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
}

.year-stat-card {
  text-align: center;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: rgba(255, 0, 51, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 0, 51, 0.2);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.year-stat-card:hover {
  background: rgba(255, 0, 51, 0.2);
  border-color: var(--house-primary);
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-red);
}

.year-stat-card h4 {
  color: var(--house-light);
  margin-bottom: 0.5rem;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  transition: var(--transition);
}

.year-stat-card:hover h4 {
  color: white;
}

.year-stat-value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: white;
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.year-stat-card:hover .year-stat-value {
  text-shadow: 0 0 15px rgba(255, 0, 51, 0.5);
}

.year-stat-label {
  color: var(--gray-text);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  transition: var(--transition);
}

.year-stat-card:hover .year-stat-label {
  color: white;
}

.latest-year-footer {
  padding: clamp(1rem, 3vw, 2rem);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 0, 51, 0.05);
}

.view-year-btn {
  background: var(--house-gradient);
  color: white;
  border: none;
  padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  font-size: clamp(0.9rem, 2vw, 1rem);
  position: relative;
  overflow: hidden;
}

.view-year-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.view-year-btn:hover::after {
  width: 300px;
  height: 300px;
}

.view-year-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-red-hover);
}

.view-year-btn i {
  transition: var(--transition-fast);
}

.view-year-btn:hover i {
  transform: translateX(3px) rotate(360deg);
}

/* Years Grid Section - Enhanced hover */
.years-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
}

.search-input {
  padding: clamp(0.7rem, 1.5vw, 0.8rem) clamp(1rem, 2vw, 1.2rem);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 0, 51, 0.3);
  border-radius: var(--radius-full);
  color: white;
  font-size: clamp(0.9rem, 2vw, 1rem);
  flex: 1;
  min-width: 200px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--house-primary);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(255, 0, 51, 0.1);
  transform: translateY(-2px);
}

.search-input:hover {
  border-color: var(--house-light);
}

.years-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  transition: all 0.5s ease;
}

.year-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 0, 51, 0.2);
  transition: var(--transition);
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
}

.year-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 0, 51, 0.05) 50%,
    transparent 70%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: var(--transition);
}

.year-card:hover::before {
  opacity: 1;
  animation: cardShine 2s ease-in-out;
}

@keyframes cardShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.year-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--house-primary);
  box-shadow: var(--shadow-red-hover);
}

.year-card-header {
  background: var(--house-gradient);
  padding: clamp(1rem, 2vw, 1.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.year-card-year {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: white;
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.year-card:hover .year-card-year {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.year-card-body {
  padding: clamp(1rem, 2vw, 1.5rem);
}

.year-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.5rem, 1vw, 1rem);
  margin-bottom: 1rem;
}

.year-card-stat {
  text-align: center;
  padding: clamp(0.8rem, 1.5vw, 1rem);
  background: rgba(255, 0, 51, 0.1);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.year-card-stat:hover {
  background: rgba(255, 0, 51, 0.2);
  transform: translateY(-2px) scale(1.05);
}

.year-card-stat-value {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  color: white;
  margin-bottom: 0.2rem;
  transition: var(--transition);
}

.year-card-stat:hover .year-card-stat-value {
  color: var(--house-light);
  text-shadow: 0 0 10px rgba(255, 0, 51, 0.5);
}

.year-card-stat-label {
  font-size: clamp(0.7rem, 1.5vw, 0.8rem);
  color: var(--gray-text);
  transition: var(--transition);
}

.year-card-stat:hover .year-card-stat-label {
  color: white;
}

.year-card-footer {
  padding: clamp(1rem, 2vw, 1.5rem);
  text-align: center;
  background: rgba(255, 0, 51, 0.05);
  border-top: 1px solid rgba(255, 0, 51, 0.1);
}

/* =================================== */
/* YEARS SECTION MOBILE - ENHANCED */
/* =================================== */

.years-section {
  position: relative;
}

.years-more-container {
  text-align: center;
  margin-top: clamp(1rem, 3vw, 2rem);
  display: none;
}

.years-more-btn {
  background: var(--house-gradient);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: var(--shadow-red);
  position: relative;
  overflow: hidden;
}

.years-more-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.years-more-btn:hover::before {
  width: 200px;
  height: 200px;
}

.years-more-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-red-hover);
}

.years-more-btn i {
  transition: transform 0.3s ease;
}

.years-more-btn.showing-all i {
  transform: rotate(180deg);
}

/* =================================== */
/* RECORDS SECTION - SEPARATE TABLES PER CATEGORY */
/* =================================== */

.records-section {
  background: linear-gradient(
    135deg,
    rgba(10, 0, 0, 0.95) 0%,
    rgba(26, 0, 0, 0.95) 100%
  );
  border-radius: var(--radius-xl);
  margin: 2rem auto;
  padding: clamp(30px, 5vw, 50px) 5%;
  border: 1px solid rgba(255, 0, 51, 0.1);
  transition: var(--transition);
}

.records-section:hover {
  border-color: rgba(255, 0, 51, 0.3);
  box-shadow: var(--shadow-red);
}

.records-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
}

/* Categories Container */
.categories-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

/* Category Card */
.category-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 0, 51, 0.2);
  transition: var(--transition);
  width: 100%;
}

.category-card:hover {
  border-color: var(--house-primary);
  box-shadow: var(--shadow-red);
  transform: translateY(-2px);
}

.category-header {
  background: var(--house-gradient);
  padding: 1rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.category-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: categoryShine 3s infinite linear;
  z-index: 1;
}

@keyframes categoryShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.category-header h3 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 700;
  color: white;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.category-body {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
}

/* Table Container - Responsive */
.category-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--house-primary) rgba(255, 0, 51, 0.1);
}

.category-table-container::-webkit-scrollbar {
  height: 6px;
}

.category-table-container::-webkit-scrollbar-track {
  background: rgba(255, 0, 51, 0.1);
  border-radius: 10px;
}

.category-table-container::-webkit-scrollbar-thumb {
  background: var(--house-primary);
  border-radius: 10px;
}

.category-table-container::-webkit-scrollbar-thumb:hover {
  background: var(--house-light);
}

/* Table Styles */
.category-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
}

.category-table thead {
  background: rgba(255, 0, 51, 0.2);
  border-bottom: 2px solid var(--house-primary);
}

.category-table th {
  padding: 1rem 0.8rem;
  text-align: left;
  color: var(--house-light);
  font-weight: 600;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  white-space: nowrap;
}

.category-table th i {
  margin-right: 8px;
  font-size: 0.9em;
  color: white;
}

.category-table tbody tr {
  border-bottom: 1px solid rgba(255, 0, 51, 0.1);
  transition: var(--transition);
}

.category-table tbody tr:hover {
  background: rgba(255, 0, 51, 0.1);
}

.category-table td {
  padding: 0.8rem;
  color: var(--light-text);
  transition: var(--transition);
}

.category-table tbody tr:hover td {
  color: white;
}

.category-table td:first-child {
  font-weight: 500;
  color: var(--house-light);
}

.category-table td:nth-child(2) {
  font-weight: 700;
  color: white;
}

.category-table td:nth-child(3) {
  font-style: italic;
}

.category-table td:last-child {
  font-weight: 500;
  color: var(--gray-text);
}

/* Empty state for categories */
.category-empty {
  text-align: center;
  padding: 2rem;
  color: var(--gray-text);
  background: rgba(255, 0, 51, 0.05);
  border-radius: var(--radius-md);
  font-style: italic;
}

/* Records count badge */
.records-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  margin-left: 1rem;
  color: white;
  font-weight: 500;
}

/* Show more button for records */
.records-more-container {
  text-align: center;
  margin-top: 2rem;
  display: none;
}

.records-more-btn {
  background: var(--house-gradient);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: var(--shadow-red);
  position: relative;
  overflow: hidden;
}

.records-more-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.records-more-btn:hover::before {
  width: 200px;
  height: 200px;
}

.records-more-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-red-hover);
}

.records-more-btn i {
  transition: transform 0.3s ease;
}

.records-more-btn.showing-all i {
  transform: rotate(180deg);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .category-header {
    padding: 0.8rem 1rem;
  }

  .category-header h3 {
    font-size: 1.2rem;
  }

  .records-count {
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
  }

  .category-body {
    padding: 1rem;
  }

  .category-table {
    min-width: 100%;
  }

  .category-table th,
  .category-table td {
    padding: 0.8rem 0.5rem;
    font-size: 0.8rem;
  }

  .category-table th i {
    margin-right: 4px;
    font-size: 0.8em;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .category-header {
    padding: 0.7rem;
  }

  .category-header h3 {
    font-size: 1rem;
  }

  .records-count {
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
  }

  .category-body {
    padding: 0.8rem;
  }

  .category-table th,
  .category-table td {
    padding: 0.6rem 0.4rem;
    font-size: 0.75rem;
  }

  .category-table th i {
    display: none;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .category-table th,
  .category-table td {
    padding: 0.5rem 0.3rem;
    font-size: 0.7rem;
  }

  .category-table th:nth-child(3),
  .category-table td:nth-child(3) {
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
  .category-table {
    min-width: 600px;
  }

  .category-table th,
  .category-table td {
    padding: 0.9rem 0.8rem;
  }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
  .category-table tbody tr:hover {
    background: rgba(255, 0, 51, 0.15);
  }
}

/* Print styles */
@media print {
  .records-filters,
  .records-more-container {
    display: none;
  }

  .category-card {
    break-inside: avoid;
    border: 1px solid #000;
  }

  .category-header {
    background: #ccc;
  }

  .category-header h3 {
    color: #000;
  }

  .category-table th {
    background: #eee;
    color: #000;
  }

  .category-table td {
    color: #333;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .category-header::before {
    animation: none;
  }

  .category-card:hover {
    transform: none;
  }
}

/* =================================== */
/* SLIDESHOW - ENHANCED HOVER EFFECTS */
/* =================================== */

.gallery-section {
  background: linear-gradient(
    135deg,
    rgba(10, 0, 0, 0.95) 0%,
    rgba(26, 0, 0, 0.95) 100%
  );
  border-radius: var(--radius-xl);
  margin: 1rem auto;
  border: 1px solid rgba(255, 0, 51, 0.1);
  transition: var(--transition);
}

.gallery-section:hover {
  border-color: rgba(255, 0, 51, 0.3);
  box-shadow: var(--shadow-red);
}

.slideshow-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 20px);
  width: 100%;
}

.slideshow-container {
  position: relative;
  height: clamp(300px, 50vh, 500px);
  overflow: hidden;
  border-radius: 15px;
  box-shadow: var(--shadow-dark);
  background: var(--card-bg);
  width: 100%;
  transition: var(--transition);
}

.slideshow-container:hover {
  box-shadow: var(--shadow-red-hover);
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide-image-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.slide:hover .slide-image {
  transform: scale(1.05);
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: clamp(1rem, 2vw, 2rem);
  color: white;
  transform: translateY(20px);
  opacity: 0.9;
  transition: var(--transition);
}

.slide:hover .slide-overlay {
  transform: translateY(0);
  opacity: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
}

.slide-caption {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
  transform: translateY(10px);
  transition: var(--transition);
  opacity: 0.9;
}

.slide:hover .slide-caption {
  transform: translateY(0);
  opacity: 1;
  color: var(--house-light);
}

.slide-details {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
  transform: translateY(10px);
  transition: var(--transition);
  opacity: 0;
}

.slide:hover .slide-details {
  transform: translateY(0);
  opacity: 1;
}

.slide-year {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.slide:hover .slide-year {
  color: white;
}

.slide-year i {
  font-size: 0.9em;
  transition: var(--transition);
}

.slide:hover .slide-year i {
  color: var(--house-light);
}

/* Navigation arrows - Enhanced */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: clamp(30px, 6vw, 50px);
  height: clamp(30px, 6vw, 50px);
  margin-top: -20px;
  background: rgba(255, 0, 51, 0.7);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 2vw, 1.5rem);
  transition: var(--transition);
  z-index: 100;
  border: 2px solid transparent;
}

.prev:hover,
.next:hover {
  background: var(--house-primary);
  transform: scale(1.2) translateY(-50%);
  border-color: white;
  box-shadow: var(--shadow-red);
}

.prev:active,
.next:active {
  transform: scale(1.1) translateY(-50%);
}

.prev {
  left: clamp(10px, 2vw, 20px);
}

.next {
  right: clamp(10px, 2vw, 20px);
}

/* Slide indicators - Enhanced */
.slide-indicators {
  position: absolute;
  bottom: clamp(10px, 2vw, 20px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(5px, 1vw, 10px);
  z-index: 100;
}

.dot {
  cursor: pointer;
  height: clamp(8px, 1.5vw, 12px);
  width: clamp(8px, 1.5vw, 12px);
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: inline-block;
  transition: var(--transition);
  border: 2px solid transparent;
}

.dot:hover {
  background-color: var(--house-light);
  transform: scale(1.3);
  border-color: white;
}

.dot.active {
  background-color: var(--house-primary);
  transform: scale(1.4);
  box-shadow: 0 0 10px rgba(255, 0, 51, 0.8);
}

/* Play/Pause button - Enhanced */
.play-pause-btn {
  position: absolute;
  top: clamp(10px, 2vw, 20px);
  right: clamp(10px, 2vw, 20px);
  width: clamp(30px, 5vw, 40px);
  height: clamp(30px, 5vw, 40px);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  transition: var(--transition);
  z-index: 100;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.play-pause-btn:hover {
  background: var(--house-primary);
  transform: scale(1.2);
  border-color: white;
  box-shadow: var(--shadow-red);
}

/* =================================== */
/* FOOTER - ENHANCED */
/* =================================== */

.footer {
  background: var(--darker-bg);
  border-top: 2px solid rgba(255, 0, 51, 0.2);
  margin-top: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 0, 51, 0.03) 50%,
    transparent 70%
  );
  animation: footerShine 8s infinite linear;
}

@keyframes footerShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.footer-bottom {
  text-align: center;
  padding-top: clamp(1rem, 3vw, 1.5rem);
  color: var(--gray-text);
  position: relative;
  z-index: 1;
}

.footer-bottom p {
  margin-bottom: 0.8rem;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  line-height: 1.5;
  transition: var(--transition);
}

.footer:hover .footer-bottom p {
  color: white;
}

.credits {
  color: var(--house-light);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  opacity: 0.8;
  transition: var(--transition);
}

.credits:hover {
  opacity: 1;
}

.credits a {
  color: var(--house-light) !important;
  text-decoration: none !important;
  transition: var(--transition);
  position: relative;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
}

.credits a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--house-primary);
  transition: var(--transition);
}

.credits a:hover::before {
  width: 100%;
}

.credits a:hover {
  color: white !important;
  background: rgba(255, 0, 51, 0.1);
}

/* =================================== */
/* LOADING STATES - ENHANCED */
/* =================================== */

.loading {
  text-align: center;
  padding: clamp(2rem, 4vw, 3rem);
  grid-column: 1 / -1;
}

.loading i {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--house-primary);
  margin-bottom: 1rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.95);
  }
}

.loading p {
  color: var(--gray-text);
  font-size: clamp(0.9rem, 2vw, 1rem);
  transition: var(--transition);
}

.loading:hover p {
  color: white;
}

.loading-spinner {
  text-align: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.loading-spinner i {
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--house-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error-message {
  text-align: center;
  padding: clamp(1rem, 3vw, 2rem);
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid #ff6b6b;
  transition: var(--transition);
}

.error-message:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: #ff5252;
  transform: translateY(-2px);
}

.error-message i {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.no-data {
  text-align: center;
  padding: clamp(1rem, 3vw, 2rem);
  color: var(--gray-text);
  font-style: italic;
  transition: var(--transition);
}

.no-data:hover {
  color: white;
  transform: translateY(-2px);
}

/* =================================== */
/* RESPONSIVE DESIGN - ENHANCED */
/* =================================== */

/* Extra Small Devices (Phones) */
@media (max-width: 480px) {
  .navbar {
    padding: 0.8rem 4%;
  }

  .logo-main {
    font-size: 1.1rem;
  }

  .logo-sub {
    font-size: 0.6rem;
  }

  .hero {
    padding: 80px 4% 40px;
  }

  .hero-stats {
    gap: 0.5rem;
  }

  .hero-stat-item {
    min-width: 80px;
    padding: 0.8rem;
  }

  .year-card-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .slideshow-container {
    height: 250px;
  }

  .slide-overlay {
    padding: 0.8rem;
  }

  .slide-caption {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  .prev,
  .next {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  /* Better touch targets */
  .year-card,
  .view-year-btn,
  .nav-link {
    min-height: 44px;
  }
}

/* Small Devices (Tablets) */
@media (max-width: 1185px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(10, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    padding: 5rem 2rem 2rem;
    transition: right 0.4s ease;
    z-index: 1001;
    border-left: 2px solid rgba(255, 0, 51, 0.3);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-overlay.active {
    display: block;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .cta-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .years-filters {
    flex-direction: column;
  }

  .search-input {
    min-width: 100%;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Better spacing for mobile */
  .years-section {
    padding: 2rem 4%;
  }

  /* Adjust grid item sizes */
  .year-card {
    padding: 0.8rem;
  }

  .year-card-body {
    padding: 1rem 0.8rem;
  }

  .year-card-footer {
    padding: 0.8rem;
  }

  /* Smooth scrolling for mobile */
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
  }
}

/* Medium Devices (Small Laptops) */
@media (max-width: 992px) {
  .latest-year-body {
    grid-template-columns: repeat(2, 1fr);
  }

  .years-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* Large mobile screens */
@media (min-width: 481px) and (max-width: 768px) {
  .years-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Show first 4 years on medium mobile */
  .years-grid:not(.show-all) {
    max-height: 800px;
  }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 80px 5% 30px;
  }

  .hero-stats {
    margin: 1rem 0;
  }

  .hero-stat-item {
    padding: 0.5rem;
  }

  .slideshow-container {
    height: 350px;
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-bg-image {
    background-size: cover;
  }

  .slide-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Large Screens */
@media (min-width: 1400px) {
  .section {
    max-width: 1400px;
  }
}

/* Print Styles */
@media print {
  .hero-bg-image,
  .hero-overlay,
  .slideshow-container,
  .view-all-btn,
  .menu-toggle {
    display: none;
  }

  .hero-content,
  .section {
    padding: 20px 0;
  }

  .hero-title,
  .section-title {
    color: #000;
    -webkit-text-fill-color: #000;
  }

  /* Ensure good contrast for printing */
  .year-card,
  .latest-year-card {
    border: 1px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-bg-image {
    animation: none !important;
  }
}

/* March Past Badge */
.marchpast-badge {
    background: linear-gradient(135deg, #ff0033 0%, #990000 100%);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Slide result styling */
.slide-result {
    color: #ffd700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.slide-result i {
    color: #ffd700;
    font-size: 0.75rem;
}