/* =========================================
   1. CSS Variables & Design Tokens
   ========================================= */
:root {
  /* Color Palette */
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-gray-dark: #333333;
  --color-gray-light: #F5F5F5;
  --color-gray-text: #888888;
  --color-navy: #003366;
  --color-beige: #F5F5DC;
  
  /* Typography */
  --font-family-base: 'Source Han Sans CN', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-h1: 2.25rem; /* 36px */
  --font-size-h2: 1.75rem; /* 28px */
  --font-size-body: 1.125rem; /* 18px */
  --font-size-small: 0.875rem; /* 14px */
  
  /* Spacing */
  --spacing-unit: 8px;
  --spacing-md: 24px;
  --spacing-lg: 48px;
  --spacing-xl: 80px;
  
  /* Layout */
  --header-height: 70px;
  --container-width: 1200px;
  
  /* Transition */
  --transition-base: all 0.3s ease-in-out;
  --transition-slow: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-gray-dark);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--header-height);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

ul {
  list-style: none;
}

/* =========================================
   3. Typography
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-black);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
p { margin-bottom: 1rem; }

.text-center { text-align: center; }
.text-small { font-size: var(--font-size-small); }
.text-uppercase { text-transform: uppercase; letter-spacing: 1px; }

/* =========================================
   4. Layout Components
   ========================================= */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   5. Navigation (Header)
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  transition: var(--transition-base);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-black);
  letter-spacing: 1px;
  z-index: 1001;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--color-gray-dark);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-navy);
  transition: var(--transition-base);
}

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

/* Mobile Menu Toggle */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.bar {
  width: 25px;
  height: 2px;
  background-color: var(--color-black);
  transition: var(--transition-base);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: var(--spacing-md) 0;
  color: var(--color-gray-text);
  font-size: var(--font-size-small);
  background-color: var(--color-gray-light);
}
.breadcrumbs span { margin: 0 5px; }

/* =========================================
   6. Page: Home (Carousel & Hero)
   ========================================= */
.hero-slider {
  position: relative;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
  margin-top: 0; /* Override padding for hero */
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  z-index: 10;
  color: var(--color-white);
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  max-width: 800px;
  padding: 20px;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
}

/* =========================================
   7. Components: Cards & Grids
   ========================================= */
.grid-gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--spacing-md);
}

.card {
  position: relative;
  overflow: hidden;
  background-color: var(--color-white);
  transition: var(--transition-base);
}

.card-image-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding-top: 133%; /* 3:4 Aspect Ratio */
}

.card-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
}

.card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: var(--color-white);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-base);
}

.card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.card-info {
  padding: 1rem 0;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-black);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--color-gray-text);
}

/* =========================================
   8. Page: Declaration
   ========================================= */
.declaration-section {
  background-color: var(--color-gray-light);
  text-align: center;
  padding: 100px 20px;
}

.declaration-text {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--color-gray-dark);
  font-style: italic;
}

/* =========================================
   9. Page: Seasonal & Tabs
   ========================================= */
.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  padding: 1rem 0;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--color-gray-text);
  cursor: pointer;
  transition: var(--transition-base);
  border-bottom: 2px solid transparent;
}

.tab-btn:hover,
.tab-btn.active {
  color: var(--color-black);
  border-bottom-color: var(--color-black);
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--spacing-md);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   10. Page: Details & Lightbox
   ========================================= */
.detail-block {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-xl);
  gap: var(--spacing-md);
}

.detail-text {
  padding: var(--spacing-md);
  background: var(--color-gray-light);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

/* =========================================
   11. Footer
   ========================================= */
footer {
  margin-top: auto;
  background-color: var(--color-white);
  border-top: 1px solid #eee;
  text-align: center;
  padding: 20px 0;
  color: var(--color-gray-text);
  font-size: 14px;
}

/* =========================================
   12. Responsive Design (Media Queries)
   ========================================= */

/* Tablet (≥768px) */
@media (min-width: 768px) {
  :root {
    --font-size-h1: 3rem;
  }
  
  .grid-gallery, .tab-content.active {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .detail-block {
    flex-direction: row;
    align-items: center;
  }
  
  .detail-block:nth-child(even) {
    flex-direction: row-reverse;
  }
  
  .detail-image, .detail-text {
    flex: 1;
  }
}

/* Desktop (≥1024px) */
@media (min-width: 1024px) {
  .nav-menu {
    position: static;
    flex-direction: row;
    background-color: transparent;
    width: auto;
    height: auto;
    padding: 0;
    box-shadow: none;
  }
  
  .hamburger {
    display: none;
  }
  
  .grid-gallery.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid-gallery.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Menu Styles (<1024px) */
@media (max-width: 1023px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--color-white);
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }
  
  .nav-menu.active {
    max-height: 300px; /* Enough for 5 links */
  }
  
  .nav-link {
    display: block;
    padding: 15px 5%;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
}