/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* CSS Custom Properties for Portugal Colors */
:root {
  --color-primary: #DC143C;     /* Portuguese Red - Heritage/Passion */
  --color-secondary: #FFD700;   /* Gold - Prosperity/Opportunity */
  --color-accent: #228B22;      /* Green - Success/Growth */
}

/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
}

/* CRITICAL: Tailwind Color Integration - These override Tailwind's utilities */
.bg-primary { background-color: var(--color-primary) !important; }
.text-primary { color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.bg-accent { background-color: var(--color-accent) !important; }
.text-accent { color: var(--color-accent) !important; }

/* Border and ring utilities */
.border-primary { border-color: var(--color-primary) !important; }
.border-secondary { border-color: var(--color-secondary) !important; }
.border-accent { border-color: var(--color-accent) !important; }
.ring-primary { --tw-ring-color: var(--color-primary) !important; }

/* Gradient utilities */
.from-primary { --tw-gradient-from: var(--color-primary) !important; }
.to-primary { --tw-gradient-to: var(--color-primary) !important; }
.from-secondary { --tw-gradient-from: var(--color-secondary) !important; }
.to-secondary { --tw-gradient-to: var(--color-secondary) !important; }
.from-accent { --tw-gradient-from: var(--color-accent) !important; }
.to-accent { --tw-gradient-to: var(--color-accent) !important; }

/* Form Enhancement */
input:focus, 
select:focus, 
textarea:focus {
  transform: scale(1.01);
  transition: all 0.3s ease;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1) !important;
  outline: none !important;
}

/* Button Hover Effects */
button:hover, 
.btn:hover {
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

.bg-primary:hover {
  background-color: rgba(220, 20, 60, 0.9) !important;
}

/* Layout Fixes */
/* Desktop Layout - Keep sticky behavior */
@media (min-width: 1024px) {
  .right-column {
    position: sticky;
    top: 2rem;
    height: fit-content;
  }
  
  .left-column {
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding-right: 1rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }
  
  /* Custom Scrollbar for Better UX */
  .left-column::-webkit-scrollbar {
    width: 6px;
  }
  
  .left-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }
  
  .left-column::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
  }
  
  .left-column::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 20, 60, 0.8);
  }
}

/* Mobile Layout Fix - CRITICAL for your styling issues */
@media (max-width: 1023px) {
  /* Fix mobile stacking order */
  .order-1 {
    position: relative !important;
    z-index: 1;
  }
  
  .order-2 {
    position: relative !important;
    z-index: 2;
  }
  
  /* Prevent content from going under form */
  .left-column {
    position: relative !important;
    z-index: 3;
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0;
  }
  
  /* Disable sticky behavior ONLY on mobile */
  .right-column {
    position: static !important;
    top: auto !important;
    height: auto !important;
    z-index: 2;
  }
  
  /* Fix content overflow */
  body {
    overflow-x: hidden;
  }
  
  /* Ensure proper mobile spacing */
  .grid.grid-cols-1.lg\\:grid-cols-2 {
    display: block !important;
  }
  
  .grid.grid-cols-1.lg\\:grid-cols-2 > * {
    width: 100% !important;
    margin-bottom: 2rem;
  }
}

/* Card Hover Effects */
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Portugal Animations */
@keyframes floating {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.4);
  }
  50% {
    box-shadow: 0 15px 40px rgba(220, 20, 60, 0.6);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Success Page Styles */
.bounce-in {
  animation: bounce-in-portugal 0.8s ease-out;
}

@keyframes bounce-in-portugal {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  70% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulse-success {
  animation: pulse-success-portugal 2s infinite;
}

@keyframes pulse-success-portugal {
  0%, 100% {
    box-shadow: 0 0 20px rgba(34, 139, 34, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(34, 139, 34, 0.6), 0 0 40px rgba(255, 215, 0, 0.4);
  }
}

/* Download Button Effects */
.download-button {
  transition: all 0.3s ease;
}

.download-button:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(34, 139, 34, 0.4);
}

.download-button:active {
  transform: scale(0.98);
}

/* Form Validation Styles */
.input-error {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.input-success {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1) !important;
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles for Keyboard Navigation */
*:focus {
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px;
}

/* Button focus override */
button:focus,
.btn:focus {
  outline: 2px solid var(--color-accent) !important;
  outline-offset: 2px;
}

/* Loading Spinner */
.loading, .spinner {
  animation: spin 1s linear infinite;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Custom select dropdown */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}
select::-ms-expand { display: none; }

/* Portugal testimonial cards */
.testimonial-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, #F472B6 100%);
  border-radius: 15px;
  padding: 20px;
  color: white;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 15px;
  font-size: 4rem;
  opacity: 0.2;
  font-family: serif;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(220, 20, 60, 0.2);
}

/* Trust Badge Styles */
.trust-badge {
  background: linear-gradient(135deg, var(--color-accent) 0%, #059669 100%);
  border-radius: 50px;
  padding: 8px 16px;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Success notification styles */
.success-notification {
  background: rgba(34, 139, 34, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 139, 34, 0.3);
  animation: notification-slide-in 0.5s ease-out;
}

@keyframes notification-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Portugal info cards */
.portugal-info-card {
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.05), rgba(255, 215, 0, 0.05));
  border: 1px solid rgba(220, 20, 60, 0.1);
  transition: all 0.3s ease;
}

.portugal-info-card:hover {
  border-color: rgba(220, 20, 60, 0.3);
  transform: translateY(-2px);
}

/* Vendor-specific Form Styling */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1) !important;
  outline: none !important;
}

/* Checkbox Styling */
input[type="checkbox"]:checked {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

/* Mobile-specific fixes to prevent common issues */
@media (max-width: 768px) {
  /* Prevent zoom on input focus in iOS Safari */
  input, select, textarea {
    font-size: 16px !important;
  }
  
  /* Fix button tap highlighting */
  button, .btn {
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Ensure proper touch targets */
  button, .btn, input, select {
    min-height: 44px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #fd0054;
    --color-secondary: #ffd93d;
    --color-accent: #6bcf7f;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .bg-white\/80 {
    background-color: white !important;
  }
  
  .backdrop-blur-sm,
  .backdrop-blur-md {
    backdrop-filter: none !important;
  }
}

/* Print Styles */
@media print {
  .no-print, .pulse-glow, .floating {
    display: none !important;
    animation: none !important;
  }
  
  * {
    background: white !important;
    color: black !important;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating, .pulse-glow, .bounce-in {
    animation: none !important;
  }
}
/* Add this to your existing style.css file at the top */

/* Portugal Flag - Browser Compatible Solution */
.portugal-flag {
  display: inline-block;
  width: 24px;
  height: 16px;
  background: linear-gradient(to right, #046a38 40%, #da020e 40%);
  border-radius: 2px;
  margin-right: 8px;
  position: relative;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.portugal-flag::after {
  content: '';
  position: absolute;
  left: 35%;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #ffed00;
  border-radius: 50%;
  border: 1px solid #da020e;
}

/* Larger version for headers */
.portugal-flag-lg {
  width: 32px;
  height: 20px;
}

.portugal-flag-lg::after {
  width: 8px;
  height: 8px;
}

/* Text alternative flag */
.portugal-text-flag {
  background: #046a38;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block;
}

/* SVG flag container */
.portugal-flag-svg {
  margin-right: 8px;
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Your existing CSS continues here... */


/* Social Proof Mobile-Friendly Styles */
.social-proof-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.social-proof-avatars {
  display: flex;
  margin-left: -0.5rem;
  flex-shrink: 0;
}

.social-proof-avatars img {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 2px solid white;
  margin-left: -0.5rem;
  transition: transform 0.2s;
}

.social-proof-avatars img:hover {
  transform: scale(1.1);
  z-index: 10;
  position: relative;
}

.social-proof-avatars > div {
  margin-left: -0.5rem;
  z-index: 5;
}

.social-proof-text {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #4b5563;
  text-align: center;
  min-width: 0;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .social-proof-container {
      flex-direction: column;
      gap: 0.75rem;
      padding: 0 0.5rem;
  }
  
  .social-proof-avatars {
      margin-left: -0.25rem;
  }
  
  .social-proof-avatars img,
  .social-proof-avatars > div {
      margin-left: -0.25rem;
  }
  
  .social-proof-avatars img {
      width: 1.75rem;
      height: 1.75rem;
  }
  
  .social-proof-avatars > div {
      font-size: 0.6rem;
      width: 1.75rem !important;
      height: 1.75rem !important;
  }
  
  .social-proof-text {
      font-size: 0.8rem;
      flex-direction: column;
      gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .social-proof-avatars img {
      width: 1.5rem;
      height: 1.5rem;
  }
  
  .social-proof-avatars > div {
      width: 1.5rem !important;
      height: 1.5rem !important;
      font-size: 0.5rem;
  }
  
  .social-proof-text {
      font-size: 0.75rem;
  }
}

/* --- Custom Mobile Column Reversal --- */
@media (max-width: 1023px) {
  .right-column {
    order: 2 !important;
  }

  .order-2 {
    order: 1 !important;
  }

  .order-1 {
    order: 2 !important;
  }
}