/* ===== ROOT & THEME VARIABLES ===== */
:root {
  --primary: #1a472a;
  --primary-light: #2d6a3f;
  --accent: #f4a259;
  --accent-light: #ffc857;
  --background: #fafaf8;
  --surface: #ffffff;
  --text: #2c3e50;
  --text-secondary: #5a6c7d;
  --border: #e8e6e1;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --primary: #4a9d6f;
  --primary-light: #5cb87e;
  --accent: #ffc857;
  --accent-light: #ffd966;
  --background: #0f1419;
  --surface: #1a1f2e;
  --text: #e8e6e1;
  --text-secondary: #b8b3a6;
  --border: #2d3544;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', 'Garamond', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.75rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--accent);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ===== PAGE LOAD STAGGER ANIMATIONS ===== */
main > section {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

main > section:nth-child(1) { animation-delay: 0.1s; }
main > section:nth-child(2) { animation-delay: 0.2s; }
main > section:nth-child(3) { animation-delay: 0.3s; }
main > section:nth-child(4) { animation-delay: 0.4s; }
main > section:nth-child(5) { animation-delay: 0.5s; }

/* ===== HEADER & NAVIGATION ===== */
nav.navbar {
  background-color: var(--surface) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.navbar-brand {
  font-family: 'Georgia', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary) !important;
  letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
  color: var(--text) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: color var(--transition);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--accent) !important;
}

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

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

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background-color: var(--primary);
  color: var(--surface);
  transform: rotate(20deg);
}

/* Language Switcher */
.lang-switcher {
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 0.5rem;
}

.lang-switcher:hover {
  background-color: var(--primary);
  color: var(--surface);
}

.lang-switcher.active {
  background-color: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary) !important;
  color: var(--surface) !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover {
  background-color: var(--primary-light) !important;
  border-color: var(--primary-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 71, 42, 0.25);
}

.btn-secondary {
  background-color: var(--accent) !important;
  color: var(--primary) !important;
  border-color: var(--accent) !important;
}

.btn-secondary:hover {
  background-color: var(--accent-light) !important;
  border-color: var(--accent-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 162, 89, 0.25);
}

.btn-outline-light {
  border: 2px solid var(--surface) !important;
  color: var(--surface) !important;
}

.btn-outline-light:hover {
  background-color: var(--surface) !important;
  color: var(--primary) !important;
}

/* ===== HERO SECTION ===== */
.hero-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
  position: relative;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  animation: fadeInUp 0.8s ease-out;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-banner h1 {
  color: var(--surface);
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.hero-banner p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.25rem;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-banner .btn {
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
  margin-bottom: 0.5rem;
}

/* ===== BENTO GRID SYSTEM ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

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

  .bento-item {
    grid-column: span 3;
  }

  .bento-item.large {
    grid-column: span 6;
  }

  .bento-item.tall {
    grid-row: span 2;
  }

  .bento-item.wide {
    grid-column: span 6;
  }

  .bento-item.wide-tall {
    grid-column: span 6;
    grid-row: span 2;
  }

  .bento-item.featured {
    grid-column: span 12;
  }

  .bento-item.featured-half {
    grid-column: span 6;
  }
}

.bento-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  animation: scaleIn 0.6s ease-out;
}

.bento-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

/* ===== CARDS ===== */
.card {
  background-color: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow) !important;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2) !important;
}

.card-body {
  color: var(--text);
}

.card-title {
  color: var(--primary);
  font-family: 'Georgia', serif;
}

.card-text {
  color: var(--text-secondary);
}

/* ===== TESTIMONIALS ===== */
.testimonial-section {
  background: linear-gradient(135deg, rgba(26, 71, 42, 0.05) 0%, rgba(244, 162, 89, 0.05) 100%);
  padding: 3rem 1rem;
  border-radius: var(--radius-lg);
}

.blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  color: var(--text);
  font-style: italic;
}

.blockquote-footer {
  color: var(--text-secondary);
}

/* ===== FORMS ===== */
.form-control,
.form-select {
  background-color: var(--surface);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--surface);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(244, 162, 89, 0.25);
}

.form-label {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ===== ACCORDION ===== */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion-button {
  background-color: var(--surface);
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.accordion-button:not(.collapsed) {
  background-color: rgba(244, 162, 89, 0.1);
  color: var(--primary);
  box-shadow: none;
  border-color: var(--accent);
}

.accordion-button:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(244, 162, 89, 0.25);
}

.accordion-body {
  background-color: var(--surface);
  color: var(--text-secondary);
}

/* ===== SECTIONS & LAYOUTS ===== */
section {
  padding: 3rem 1rem;
}

@media (min-width: 768px) {
  section {
    padding: 4rem 2rem;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

section.py-5 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

section.bg-light {
  background-color: rgba(26, 71, 42, 0.02);
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--surface);
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

footer h6 {
  color: var(--accent);
  font-size: 0.875rem;
  letter-spacing: 1px;
}

footer p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

footer a {
  color: var(--primary);
}

footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.border-top {
  border-top: 1px solid var(--border) !important;
}

.border-secondary {
  border-color: var(--border) !important;
}

footer .text-center.p-4 {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ===== ICONS ===== */
.icon-small {
  width: 48px;
  height: 48px;
  color: var(--primary);
  transition: all var(--transition);
}

.icon-lg {
  width: 60px;
  height: 60px;
  color: var(--primary);
}

/* ===== UTILITY CLASSES ===== */
.text-primary {
  color: var(--primary) !important;
}

.text-accent {
  color: var(--accent) !important;
}

.bg-primary-light {
  background-color: var(--primary-light) !important;
  color: var(--surface) !important;
}

.text-muted {
  color: var(--text-secondary) !important;
}

.shadow-sm {
  box-shadow: var(--shadow) !important;
}

.shadow-lg {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

/* ===== BADGES & FEATURES ===== */
.badge {
  background-color: var(--accent);
  color: var(--primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
}

/* ===== IMAGES ===== */
img {
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

img:hover {
  transform: scale(1.02);
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

/* ===== COOKIE BANNER ===== */
#cookieConsentBanner {
  background-color: var(--primary) !important;
  color: var(--surface);
  z-index: 1000;
  animation: slideInUp 0.3s ease-out;
}

#cookieConsentBanner p {
  color: var(--surface);
}

#cookieConsentBanner .btn-light {
  background-color: var(--surface) !important;
  color: var(--primary) !important;
  border-color: var(--surface) !important;
}

/* ===== CAROUSEL ===== */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: brightness(0) saturate(100%);
}

.carousel-indicators [data-bs-target] {
  background-color: var(--accent);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }

  .hero-banner {
    min-height: 400px;
  }

  section {
    padding: 2rem 1rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .theme-toggle {
    margin-left: 0.5rem;
  }

  .btn-group {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .hero-banner {
    min-height: 350px;
    padding: 1rem;
  }

  section {
    padding: 1.5rem 1rem;
  }

  .bento-item {
    padding: 1.5rem;
  }
}

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

/* ===== PRINT STYLES ===== */
@media print {
  .theme-toggle,
  .lang-switcher,
  .btn-outline-light {
    display: none;
  }
}
