/* Main CSS - Organiza Tu Día */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #5e7f5e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #5e7f5e;
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[src=""] {
  background: linear-gradient(135deg, #f3efe8 0%, #e4ebe4 100%);
  min-height: 200px;
}

/* Header scroll effect */
#site-header {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

#site-header.scrolled {
  box-shadow: 0 1px 8px rgba(58, 49, 42, 0.08);
}

/* Mobile Menu Animations */
#mobile-menu {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

#mobile-menu > div:last-child {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.active > div:last-child {
  transform: translateX(0);
}

/* FAQ Accordion */
.faq-item {
  transition: border-color 0.3s ease;
}

.faq-item.active {
  border-color: #a3b9a3;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-content.visible {
  max-height: 500px;
}

/* Form Styles */
.form-group {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #e8e0d2;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #3a312a;
  background: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:hover {
  border-color: #c9d7c9;
}

.form-input:focus {
  outline: none;
  border-color: #5e7f5e;
  box-shadow: 0 0 0 3px rgba(94, 127, 94, 0.12);
}

.form-input.error {
  border-color: #e57373;
  box-shadow: 0 0 0 3px rgba(229, 115, 115, 0.12);
}

.form-input.success {
  border-color: #5e7f5e;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #524538;
  margin-bottom: 0.5rem;
}

.form-error {
  font-size: 0.8125rem;
  color: #d32f2f;
  margin-top: 0.375rem;
  display: none;
}

.form-error.visible {
  display: block;
}

/* Checkbox custom style */
.checkbox-custom {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #d4c7b0;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  position: relative;
}

.checkbox-custom:checked {
  background-color: #5e7f5e;
  border-color: #5e7f5e;
}

.checkbox-custom:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-custom:focus-visible {
  outline: 2px solid #5e7f5e;
  outline-offset: 2px;
}

/* Cookie Banner Animation */
#cookie-banner {
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

#cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

/* Button hover effects */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.btn-primary:hover::after {
  transform: translateX(0);
}

/* Card hover animations */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
}

/* Toast notification */
.toast {
  position: fixed;
  top: 5rem;
  right: 1rem;
  max-width: 24rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
  transform: translateX(120%);
  transition: transform 0.4s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  background: #4a664a;
  color: white;
}

.toast-error {
  background: #c62828;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .faq-content.visible {
    max-height: 600px;
  }
}

/* Print styles */
@media print {
  #site-header,
  #mobile-menu,
  #cookie-banner,
  .toast {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
  }
}

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

/* Selection color */
::selection {
  background: #c9d7c9;
  color: #3a312a;
}

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

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

::-webkit-scrollbar-thumb {
  background: #d4c7b0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #bfaa8d;
}