/* Modern UI Enhancements for Horta Inteligente */

/* Smooth animations and transitions */
* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hero section */
.hero {
  background: linear-gradient(135deg, #e8f0d7 0%, #d4e8c4 50%, #c5dcc0 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(107, 162, 74, 0.1) 0%, transparent 70%);
  animation: float 20s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, 20px) rotate(5deg); }
}

.hero-copy {
  animation: fadeInUp 1s ease-out;
}

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

/* Modern button styles */
.button {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.button:active {
  transform: translateY(0);
}

.primary {
  background: linear-gradient(135deg, #2d7651 0%, #3d8a62 100%);
}

.primary:hover {
  background: linear-gradient(135deg, #3d8a62 0%, #4d9e73 100%);
}

.ghost {
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #6fa24a;
}

/* Enhanced cards and sections */
.section {
  padding: 80px 32px;
  position: relative;
}

.calendar-card, .culture-grid article, .tool-grid article, .store-cta {
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.calendar-card:hover, .culture-grid article:hover, .tool-grid article:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Modern navigation */
.topbar {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav a {
  position: relative;
  padding: 8px 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #6fa24a;
  transition: width 0.3s ease;
}

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

/* Enhanced culture cards */
.culture-grid article {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9f5 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.culture-grid article:hover {
  background: linear-gradient(145deg, #f8f9f5 0%, #f0f2eb 100%);
  border-color: rgba(107, 162, 74, 0.3);
}

.culture-icon {
  font-size: 48px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Modern tool cards */
.tool-grid article {
  background: linear-gradient(145deg, #ffffff 0%, #f5f7f0 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.tool-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tool-icon.green { background: linear-gradient(135deg, #6fa24a 0%, #8bc34a 100%); }
.tool-icon.orange { background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%); }
.tool-icon.blue { background: linear-gradient(135deg, #2196f3 0%, #64b5f6 100%); }

/* Enhanced calculator */
.calculator-form {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.calculator-form input, .calculator-form select {
  border-radius: 12px;
  border: 2px solid #e8e3d5;
  padding: 16px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.calculator-form input:focus, .calculator-form select:focus {
  border-color: #6fa24a;
  box-shadow: 0 0 0 4px rgba(107, 162, 74, 0.1);
  outline: none;
}

/* Modern dialogs */
dialog {
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: none;
  max-width: 90vw;
  width: 500px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

/* Enhanced chat interface */
.chat {
  background: #f8f9f5;
  border-radius: 16px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e8e3d5;
}

.user-message {
  background: linear-gradient(135deg, #2d7651 0%, #3d8a62 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  margin: 8px 0;
  max-width: 80%;
  margin-left: auto;
  box-shadow: 0 4px 15px rgba(45, 118, 81, 0.2);
}

.bot-message {
  background: white;
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  margin: 8px 0;
  max-width: 80%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Modern footer */
footer {
  background: linear-gradient(135deg, #18342a 0%, #2d4a3f 100%);
  color: white;
  padding: 60px 32px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(107, 162, 74, 0.1) 0%, transparent 50%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

footer .brand {
  color: white;
}

.social-links a {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Enhanced store CTA */
.store-cta {
  background: linear-gradient(135deg, #e8f0d7 0%, #d4e8c4 100%);
  border: 2px solid rgba(107, 162, 74, 0.3);
  animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 40px rgba(107, 162, 74, 0.1); }
  50% { box-shadow: 0 15px 50px rgba(107, 162, 74, 0.2); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6fa24a 0%, #8bc34a 100%);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5d8a3d 0%, #7ab33a 100%);
}

/* Loading animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(107, 162, 74, 0.3);
  border-top-color: #6fa24a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Responsive enhancements */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 400px;
    padding: 40px 20px;
  }
  
  .hero-copy {
    padding: 20px;
    margin: 0;
  }
  
  .section {
    padding: 40px 20px;
  }
  
  .topbar {
    padding: 0 16px;
  }
  
  nav {
    display: none;
  }
}

/* Micro-interactions */
.button:active {
  transform: scale(0.98);
}

.culture-grid article:active {
  transform: scale(0.98);
}

/* Enhanced focus states for accessibility */
button:focus, a:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(107, 162, 74, 0.5);
  outline-offset: 2px;
}

/* Smooth section transitions */
.section {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

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