@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #7CB342;
  --primary-dark: #558b2f;
  --primary-light: #aed581;
  --text-main: #2C3E50;
  --text-muted: #7F8C8D;
  --bg-color: #F8F9FA;
  --white: #FFFFFF;
  --border-color: #E2E8F0;
  --accent-color: #F59E0B;
  --footer-bg: #2C3E50;
  --footer-text: #FFFFFF;
}

body.dark-mode {
  --primary-color: #8BC34A;
  --primary-dark: #689F38;
  --primary-light: #C5E1A5;
  --text-main: #E0E0E0;
  --text-muted: #B0BEC5;
  --bg-color: #121212;
  --white: #1E1E1E;
  --border-color: #333333;
  --accent-color: #FFCA28;
  --footer-bg: #0a0a0a;
  --footer-text: #E0E0E0;
}

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

html,
body {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
}

img,
video,
iframe,
section,
div,
header,
footer,
.container,
.card,
.banner {
  max-width: 100%;
  box-sizing: border-box;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.mt-4 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

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

/* Striped Pattern */
.pattern-bg {
  background: repeating-linear-gradient(45deg,
      var(--white),
      var(--white) 10px,
      var(--primary-light) 10px,
      var(--primary-light) 20px);
  opacity: 0.1;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

/* Header */
.main-header {
  background: var(--white);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 0;
}

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

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.logo-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
}

.brand-info h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
  white-space: nowrap;
}

.brand-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
}

/* Navigation */
.nav-menu {
  display: flex;
  justify-content: center;
  flex: 1;
  gap: 20px;
  align-items: center;
  list-style: none;
  padding: 0 20px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  white-space: nowrap;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

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

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

/* Language Toggle */
.lang-toggle-container {
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  background: var(--bg-color);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.lang-btn {
  padding: 5px 15px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.3s;
}

.lang-btn.active {
  background: var(--primary-color);
  color: var(--white);
}

/* Theme Toggle */
.theme-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.theme-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Hero Section */
.hero {
  position: relative;
  background-color: var(--primary-dark);
  /* Fallback */
  color: #FFFFFF;
  /* Hardcoded white because of the dark image overlay */
  padding: 120px 20px;
  text-align: center;
  overflow: hidden;
}

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

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fade 15s infinite;
}

.hero-slide:nth-child(1) {
  background-image: url('/images/slider_1.png');
  animation-delay: 0s;
}

.hero-slide:nth-child(2) {
  background-image: url('/images/slider_2.png');
  animation-delay: 5s;
}

.hero-slide:nth-child(3) {
  background-image: url('/images/slider_3.png');
  animation-delay: 10s;
}

@keyframes fade {
  0% {
    opacity: 0;
    transform: scale(1);
  }

  10% {
    opacity: 1;
    transform: scale(1.02);
  }

  33% {
    opacity: 1;
    transform: scale(1.05);
  }

  43% {
    opacity: 0;
    transform: scale(1.06);
  }

  100% {
    opacity: 0;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.btn-primary {
  display: inline-block;
  background: var(--white);
  color: var(--primary-dark);
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: var(--white);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 4px solid var(--primary-color);
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.card-grid>*:nth-child(1) .card,
.card-grid>.card:nth-child(1) {
  animation-delay: 0.1s;
}

.card-grid>*:nth-child(2) .card,
.card-grid>.card:nth-child(2) {
  animation-delay: 0.2s;
}

.card-grid>*:nth-child(3) .card,
.card-grid>.card:nth-child(3) {
  animation-delay: 0.3s;
}

.card-grid>*:nth-child(4) .card,
.card-grid>.card:nth-child(4) {
  animation-delay: 0.4s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
  margin-bottom: 20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

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

.card h3 {
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

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

.badge {
  display: inline-block;
  padding: 5px 12px;
  background: var(--accent-color);
  color: var(--white);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 10px;
}

/* Modern Banner */
.modern-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  margin-bottom: 50px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.modern-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.banner-logo-container {
  flex-shrink: 0;
  background: var(--white);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 15px;
  z-index: 1;
}

.banner-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.banner-content {
  flex-grow: 1;
  z-index: 1;
}

.banner-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
}

.banner-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.banner-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  font-size: 1.05rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

.banner-detail-item i {
  margin-top: 4px;
  color: var(--accent-color);
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .modern-banner {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }

  .banner-title {
    font-size: 1.5rem;
  }

  .banner-detail-item {
    text-align: left;
  }
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.custom-table th,
.custom-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.custom-table th {
  background: var(--primary-color);
  color: var(--white);
  font-weight: 600;
}

.custom-table tr:hover {
  background-color: #f1f8e9;
}

body.dark-mode .custom-table tr:hover {
  background-color: rgba(139, 195, 74, 0.15);
}

/* Contact Form */
.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.btn-submit {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

/* Footer */
.main-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 20px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  margin-bottom: 20px;
  color: var(--primary-light);
  font-size: 1.2rem;
}

.footer-col p {
  opacity: 0.8;
  margin-bottom: 10px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Mobile Nav */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    margin-left: auto;
    font-size: 1.2rem;
  }

  .hero {
    width: 100vw;
    margin: 0;
    padding: 60px 15px;
    box-sizing: border-box;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .brand-info {
    min-width: 0;
  }

  .brand-info h1 {
    font-size: 0.95rem;
    white-space: normal;
    line-height: 1.2;
    word-break: break-word;
  }

  .brand-info p {
    font-size: 0.75rem;
    white-space: normal;
  }

  .logo-img {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
  }

  .header-container {
    padding: 10px;
    flex-wrap: wrap;
  }

  .logo-area {
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin-right: 10px;
  }

  /* Stack all flex/grid layouts vertically */
  .footer-grid,
  .card-grid,
  .modern-banner {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .modern-banner {
    gap: 20px;
    text-align: center;
    padding: 20px;
  }

  .header-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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