@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 210 20% 98%;
    --foreground: 220 39% 11%;
    --card: 0 0% 100%;
    --card-foreground: 220 39% 11%;
    --popover: 0 0% 100%;
    --popover-foreground: 220 39% 11%;
    --primary: 147 62% 44%; /* #2bb673 */
    --primary-foreground: 0 0% 100%;
    --secondary: 212 73% 59%;
    --secondary-foreground: 210 20% 98%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 147 62% 44%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 147 62% 44%;
    --radius: 0.75rem;

    --brand-green: #2bb673;
    --brand-navy: #1a3a52;

    /* Contact Section Custom Properties */
    --contact-card-bg: 0 0% 100%;
    --contact-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --contact-card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --contact-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 147 62% 44%;
    --primary-foreground: 222.2 47.4% 11.2%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 147 62% 44%;

    --contact-card-bg: 222.2 84% 4.9%;
    --contact-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --contact-card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
  }

  * {
    @apply border-border;
  }
  
  html {
    scroll-behavior: smooth;
  }

  body {
    @apply bg-background text-foreground font-sans antialiased overflow-x-hidden;
  }

  body[dir="rtl"], 
  [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6, 
  [dir="rtl"] p, [dir="rtl"] span, [dir="rtl"] a, [dir="rtl"] li, 
  [dir="rtl"] nav, [dir="rtl"] menu, [dir="rtl"] header, [dir="rtl"] footer, 
  [dir="rtl"] .container, [dir="rtl"] section {
    direction: rtl;
    text-align: right;
  }

  [dir="ltr"] h1, [dir="ltr"] h2, [dir="ltr"] h3, [dir="ltr"] h4, [dir="ltr"] h5, [dir="ltr"] h6, 
  [dir="ltr"] p, [dir="ltr"] span, [dir="ltr"] a, [dir="ltr"] li, 
  [dir="ltr"] nav, [dir="ltr"] menu, [dir="ltr"] header, [dir="ltr"] footer, 
  [dir="ltr"] .container, [dir="ltr"] section {
    direction: ltr;
    text-align: left;
  }

  button, .cta, .btn, [role="button"] {
    text-align: center !important;
  }

  h1, h2, h3, h4, h5, h6 {
    @apply font-bold tracking-tight text-slate-900;
  }
}

/* Contact Card Styles */
.contact-card {
  background-color: hsl(var(--contact-card-bg));
  box-shadow: var(--contact-card-shadow);
  transition: var(--contact-transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.contact-card:hover, .contact-card:focus-visible {
  transform: scale(1.05) translateY(-4px);
  box-shadow: var(--contact-card-hover-shadow);
  border-color: var(--brand-green);
  outline: none;
}

.contact-card:focus-visible {
  ring: 2px solid var(--brand-green);
  ring-offset: 2px;
}

.contact-icon-wrapper {
  transition: var(--contact-transition);
}

.contact-card:hover .contact-icon-wrapper {
  background-color: var(--brand-green);
  color: white;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 50;
  direction: rtl;
}

[dir="ltr"] .main-header {
  direction: ltr;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand-green);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
}

.logo-text h1 {
  font-size: 1.25rem;
  color: var(--brand-navy);
  margin: 0;
  line-height: 1.2;
  white-space: normal;
}

.sub-text {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
  white-space: normal;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: #475569;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease-in-out;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--brand-green);
}

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

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

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-switch:hover {
  background-color: #f1f5f9;
  border-color: var(--brand-green);
  color: var(--brand-green);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #334155;
  padding: 0.5rem;
}

.credibility-badge {
  @apply inline-flex items-center gap-2 bg-amber-50 border border-amber-200 text-amber-800 px-4 py-2 rounded-lg text-sm md:text-base font-bold shadow-sm;
}

.floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.floating-btn svg {
  width: 28px;
  height: 28px;
  color: white;
}

.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.floating-btn:active {
  transform: scale(0.95);
}

.floating-btn-whatsapp {
  background-color: #25D366;
}

.floating-btn-whatsapp:hover {
  background-color: #20ba58;
}

.floating-btn-call {
  background-color: #007bff;
}

.floating-btn-call:hover {
  background-color: #0056b3;
}

@media (max-width: 768px) {
  .main-header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .header-left {
    gap: 1rem;
  }
  
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
  }

  .nav-menu.mobile-open {
    display: flex;
    order: 3;
  }
  
  .mobile-menu-btn {
    display: block;
  }

  .logo-text h1 {
    font-size: 1.125rem;
  }

  .floating-buttons {
    bottom: 15px;
    right: 15px;
    gap: 8px;
  }

  .floating-btn {
    width: 55px;
    height: 55px;
  }

  .floating-btn svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 0.75rem;
  }
  
  .header-logo-icon {
    width: 40px;
    height: 40px;
  }
}