/* Main styles for DurianPenang.com PHP version */

/* Custom Properties */
:root {
  --primary-color: #2F855A; /* Forest Green */
  --primary-hover: #276749; /* Darker Green */
  --secondary-color: #F6E05E; /* Yellow */
  --secondary-hover: #ECC94B; /* Darker Yellow */
  --text-color: #1A202C;
  --text-color-light: #4A5568;
  --background-light: #F7FAFC;
  --white: #FFFFFF;
  --border-color: #E2E8F0;
  --error: #E53E3E;
  --success: #38A169;
  --warning: #DD6B20;
  --info: #3182CE;
}

/* General Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

/* Link styles */
a {
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  text-decoration: none;
}

/* Utility Classes */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card hover effect */
.durian-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.durian-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Pagination styling enhancements */
.pagination {
  display: inline-flex;
  overflow: hidden;
  border-radius: 0.375rem;
}

.pagination-link {
  display: inline-flex;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  color: var(--text-color-light);
  background-color: var(--white);
  transition: all 0.2s ease-in-out;
}

.pagination-link:hover {
  background-color: var(--background-light);
  color: var(--text-color);
}

.pagination-link.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* Form styling enhancements */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.2);
}

/* Error and alert messages */
.alert {
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: rgba(56, 161, 105, 0.1);
  color: var(--success);
  border: 1px solid rgba(56, 161, 105, 0.2);
}

.alert-error {
  background-color: rgba(229, 62, 62, 0.1);
  color: var(--error);
  border: 1px solid rgba(229, 62, 62, 0.2);
}

/* Mobile navigation enhancements */
.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
}

.mobile-nav-link:hover {
  background-color: var(--background-light);
}

/* Navigation styles */
.nav-link {
  transition: all 0.3s ease;
  position: relative;
}

/* Desktop navigation highlight animation */
nav a {
  transition: color 0.3s ease, font-weight 0.2s ease, border-bottom 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

/* Active page in desktop navigation */
nav a.text-green-600 {
  position: relative;
  font-weight: bold;
}

nav a.text-green-600.border-b-2:after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transform-origin: bottom;
  animation: navHighlight 0.3s ease-in-out forwards;
}

/* Mobile navigation highlight animation */
.mobile-menu a {
  transition: background-color 0.3s ease, color 0.3s ease, padding 0.3s ease;
}

/* Active page in mobile navigation */
.mobile-menu a.text-green-600 {
  position: relative;
  font-weight: bold;
}

.mobile-menu a.bg-green-50 {
  box-shadow: 0 0 0 1px rgba(47, 133, 90, 0.2);
}

/* Active mobile navigation styling */
.active-nav-mobile {
  position: relative;
  box-shadow: 0 0 0 1px rgba(47, 133, 90, 0.2);
  transition: all 0.3s ease;
}

.active-nav-mobile:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #2F855A; /* Forest green */
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

/* Footer navigation highlight animation */
footer a {
  transition: color 0.3s ease, font-weight 0.2s ease, border-bottom 0.3s ease;
}

/* Active page in footer navigation */
footer a.text-white.font-bold {
  position: relative;
}

footer a.text-white.border-b:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
}

/* Navigation highlight animation classes */
.nav-highlight-active {
  animation: borderGrow 0.5s ease-in-out;
}

.footer-highlight-active {
  animation: borderPulse 0.5s ease-in-out;
}

.nav-clicked {
  animation: clickPulse 0.3s ease-in-out;
}

@keyframes borderGrow {
  0% {
    border-bottom-width: 0;
    opacity: 0.7;
  }
  100% {
    border-bottom-width: 2px;
    opacity: 1;
  }
}

@keyframes borderPulse {
  0% {
    border-bottom-width: 0;
    opacity: 0.7;
  }
  50% {
    border-bottom-width: 2px;
    opacity: 1;
  }
  75% {
    border-bottom-width: 1px;
    opacity: 0.9;
  }
  100% {
    border-bottom-width: 1px;
    opacity: 1;
  }
}

@keyframes clickPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Banner and hero section styling */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Footer styling */
.footer-link {
  transition: color 0.2s ease-in-out;
}

.footer-link:hover {
  color: var(--white);
}

/* Media query for better responsive design */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Print styles */
@media print {
  header, footer, .no-print {
    display: none;
  }
  
  body {
    font-size: 12pt;
  }
  
  a {
    text-decoration: underline;
  }
}