/* ===== SHARED STYLES ===== */
/* Typography Design - Common Styles
   For all pages with standardized components

   Table of Contents:
   1. Variables
   2. Base Styles
   3. Common Utility Classes
   4. Media Queries
*/

/* ===== 1. Variables ===== */
:root {
  /* Typography */
  --td-font-primary: 'Montserrat', sans-serif;
  --td-font-secondary: 'Playfair Display', serif;
  --td-font-chinese: 'Noto Serif SC', serif;
  --td-font-size-base: 16px;
  --td-line-height: 1.6;

  /* Spacing */
  --td-spacing-xs: 0.25rem;
  --td-spacing-sm: 0.5rem;
  --td-spacing-md: 1rem;
  --td-spacing-lg: 2rem;
  --td-spacing-xl: 3rem;

  /* Borders */
  --td-border-radius: 4px;
  --td-transition: all 0.3s ease;
}

/* ===== 2. Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--td-font-primary);
  font-size: var(--td-font-size-base);
  line-height: var(--td-line-height);
  color: var(--text-dark);
  background-color: var(--bg-main);
}

a {
  text-decoration: none;
  color: var(--text-dark);
  transition: var(--td-transition);
}

a:hover {
  color: var(--primary);
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* ===== 3. Common Utility Classes ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--td-spacing-md);
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* SVG animations */
.svg-animate-float {
  animation: float 3s ease-in-out infinite;
}

.svg-animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.svg-animate-rotate {
  animation: rotate 20s linear infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 4. Media Queries ===== */
/* Mobile devices */
@media (max-width: 768px) {
  :root {
    --td-font-size-base: 14px;
    --td-spacing-lg: 1.5rem;
    --td-spacing-xl: 2rem;
  }

  .container {
    padding: 0 var(--td-spacing-sm);
  }
}

/* Tablet devices */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 90%;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}
