/* ============================================
   Dream Enterprises - Modern Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@600;700;800&display=swap');

:root {
  --primary: #B8860B;
  --primary-dark: #9A7209;
  --primary-light: #D4A84B;
  --accent: #8B5E3C;
  --accent-light: #A0785A;
  --secondary: #1F1F1F;
  --dark: #1F1F1F;
  --darker: #111111;
  --gray-50: #F8F6F2;
  --gray-100: #EDEAE4;
  --gray-200: #D5D0C8;
  --gray-300: #B8B2A8;
  --gray-400: #9A9488;
  --gray-500: #7A7468;
  --gray-600: #5C574E;
  --gray-700: #3E3A34;
  --gray-800: #222222;
  --gray-900: #1F1F1F;
}

* {
  font-family: 'Inter', sans-serif;
}

.font-display {
  font-family: 'Playfair Display', serif;
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.4); }
  50% { box-shadow: 0 0 0 15px rgba(184, 134, 11, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -30px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.9); }
  75% { transform: translate(30px, 10px) scale(1.05); }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s infinite; }
.animate-blob { animation: blob 7s infinite; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* ---- Glassmorphism ---- */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---- Card Styles ---- */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  transform: translateY(-4px);
}

.card-gradient {
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-gradient:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, #D4A017 100%);
  color: #1F1F1F;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(184, 134, 11, 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: white;
  color: var(--primary);
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid var(--primary);
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-secondary:hover {
  background: var(--primary);
  color: #1F1F1F;
  transform: translateY(-2px);
}

.btn-accent,
.btn-walnut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: white;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.btn-accent:hover,
.btn-walnut:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(139, 94, 60, 0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  color: var(--gray-700);
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}
.btn-ghost:hover {
  background: var(--gray-100);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 10px;
}

/* ---- Input Style (shortcut) ---- */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
  color: var(--gray-800);
}
.input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.12);
}

/* ---- Card hover effect ---- */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ---- Modal Backdrop ---- */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

/* ---- Form Styles ---- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
  color: var(--gray-800);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.12);
}
.form-input::placeholder {
  color: var(--gray-400);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
  color: var(--gray-800);
  cursor: pointer;
}
.form-select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.12);
}

.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  resize: vertical;
  background: white;
}
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.12);
}

/* ---- Badge / Status Styles ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #d1fae5; color: #059669; }
.badge-yellow { background: #fef3c7; color: #d97706; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-purple { background: #f3e8ff; color: #7c3aed; }
.badge-teal { background: #ccfbf1; color: #0d9488; }
.badge-indigo { background: #e0e7ff; color: #4338ca; }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* ---- Section Styles ---- */
.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 36rem;
}

/* ---- Table Styles ---- */
.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-modern thead th {
  background: var(--gray-50);
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-200);
}
.table-modern tbody tr {
  transition: background 0.2s;
}
.table-modern tbody tr:hover {
  background: var(--gray-50);
}
.table-modern tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}
.toast-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #059669;
}
.toast-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #dc2626;
}

/* ---- Skeleton Loading ---- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ---- Scrollbar ---- */
@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: var(--gray-100); }
  ::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
}
body { overflow-x: clip; }
@media (max-width: 767px) {
  ::-webkit-scrollbar { display: none; width: 0; height: 0; }
  * { scrollbar-width: none; -ms-overflow-style: none; }
  .whatsapp-float, #backToTop { right: 12px; }
  .footer-links-mobile { display: inline-block; width: calc(50% - 0.75rem); vertical-align: top; }
}

/* ---- Hero Blob Background ---- */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  z-index: 0;
}

/* ---- Grid pattern background ---- */
.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---- Dot pattern ---- */
.bg-dots {
  background-image: radial-gradient(rgba(0,0,0,0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---- Hero Slider ---- */
.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0f172a;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  background-size: cover;
  background-position: center;
  background-color: #1e293b;
}
.hero-slide.active {
  opacity: 1;
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(31,31,31,0.85) 0%, rgba(184,134,11,0.55) 50%, rgba(31,31,31,0.5) 100%);
}
.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: 2px solid rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}
.hero-dot.active {
  background: white;
  border-color: white;
  transform: scale(1.2);
}
.hero-dot:hover {
  background: rgba(255,255,255,0.6);
}

/* ---- Mobile Responsive Fixes ---- */
@media (max-width: 768px) {
  .section-title { font-size: 1.75rem; }
  .hide-mobile { display: none; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrapper table { min-width: 500px; }
  .card-grid { grid-template-columns: 1fr !important; }
  .content-padding { padding-left: 1rem !important; padding-right: 1rem !important; }
  h1.text-2xl { font-size: 1.25rem !important; }
  .flex-wrap.gap-2 { gap: 0.375rem !important; }
  .flex-wrap.gap-2 a, .flex-wrap.gap-2 button { font-size: 0.7rem !important; padding: 0.375rem 0.75rem !important; }
}
@media (max-width: 1023px) {
  body.sidebar-open { overflow: hidden; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrapper table { min-width: 500px; }
}

/* ---- Line clamp ---- */
/* ---- Brand Color Utilities ---- */
.bg-brand { background-color: #B8860B; }
.bg-brand\/5 { background-color: rgba(184,134,11,0.05); }
.bg-brand\/10 { background-color: rgba(184,134,11,0.1); }
.bg-brand\/15 { background-color: rgba(184,134,11,0.15); }
.bg-brand\/20 { background-color: rgba(184,134,11,0.2); }
.text-brand { color: #B8860B; }
.text-brand\/80 { color: rgba(184,134,11,0.8); }
.text-brand\/60 { color: rgba(184,134,11,0.6); }
.text-brand\/40 { color: rgba(184,134,11,0.4); }
.border-brand { border-color: #B8860B; }
.from-brand {
  --tw-gradient-from: #B8860B var(--tw-gradient-from-position);
  --tw-gradient-to: rgba(184,134,11,0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.to-brand {
  --tw-gradient-to: #D4A017 var(--tw-gradient-to-position);
}
.to-brand-dark {
  --tw-gradient-to: #9A7209 var(--tw-gradient-to-position);
}
.hover\:bg-brand:hover { background-color: #B8860B; }
.hover\:text-brand:hover { color: #B8860B; }
.hover\:bg-brand\/5:hover { background-color: rgba(184,134,11,0.05); }
.hover\:bg-brand\/10:hover { background-color: rgba(184,134,11,0.1); }
.bg-brand-dark { background-color: #9A7209; }
.shadow-brand\/20 { box-shadow: 0 4px 14px 0 rgba(184,134,11,0.2); }
.shadow-brand\/30 { box-shadow: 0 4px 14px 0 rgba(184,134,11,0.3); }
.shadow-brand\/40 { box-shadow: 0 4px 14px 0 rgba(184,134,11,0.4); }
.shadow-brand\/50 { box-shadow: 0 4px 14px 0 rgba(184,134,11,0.5); }

.bg-walnut { background-color: #8B5E3C; }
.bg-walnut\/10 { background-color: rgba(139,94,60,0.1); }
.text-walnut { color: #8B5E3C; }
.border-walnut { border-color: #8B5E3C; }
.hover\:bg-walnut:hover { background-color: #8B5E3C; }
.from-walnut {
  --tw-gradient-from: #8B5E3C var(--tw-gradient-from-position);
  --tw-gradient-to: rgba(139,94,60,0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.bg-charcoal { background-color: #1F1F1F; }
.text-charcoal { color: #1F1F1F; }
.border-charcoal { border-color: #1F1F1F; }

.bg-warm { background-color: #F8F6F2; }
.text-warm { color: #F8F6F2; }

/* Brand gradient */
.bg-brand-gradient {
  background: linear-gradient(135deg, #B8860B 0%, #D4A017 100%);
}
.hover\:bg-brand-gradient:hover {
  background: linear-gradient(135deg, #9A7209 0%, #B8860B 100%);
}
.text-brand-gradient {
  background: linear-gradient(135deg, #B8860B, #D4A017);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Walnut/Call to action gradient */
.bg-walnut-gradient {
  background: linear-gradient(135deg, #8B5E3C 0%, #A0785A 100%);
}
.hover\:bg-walnut-gradient:hover {
  background: linear-gradient(135deg, #6B4226 0%, #8B5E3C 100%);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   Apple-Style Mobile Premium UI
   ============================================ */
@media (max-width: 768px) {
  /* Smooth momentum scrolling */
  body { -webkit-overflow-scrolling: touch; }

  /* Larger touch targets */
  .btn-primary, .btn-secondary, .btn-accent, .btn-walnut { min-height: 48px; font-size: 0.95rem; }

  /* Generous section spacing */
  .py-20 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .py-16 { padding-top: 2rem; padding-bottom: 2rem; }

  /* Disable hover transforms on touch */
  .card:hover, .card-gradient:hover { transform: none; }

  /* Product cards */
  .product-card {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
  }
  .product-card:active { transform: scale(0.97); }

  /* Service cards */
  .service-card {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  }

  /* Input fields bigger on mobile */
  .input, .form-input, .form-select, .form-textarea {
    min-height: 48px;
    font-size: 16px; /* Prevents iOS zoom */
    border-radius: 14px;
    padding: 0.875rem 1rem;
  }

  /* Buttons bigger on mobile */
  button[type="submit"], .btn-primary, .btn-secondary {
    border-radius: 14px;
    padding: 0.875rem 1.5rem;
  }

  /* Section titles */
  .section-title { font-size: 1.5rem; line-height: 1.3; }
  .section-subtitle { font-size: 0.95rem; }
}

/* ---- Mobile Slide-Out Menu ---- */
.mobile-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0; visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-overlay.open { opacity: 1; visibility: visible; }

.mobile-slide-menu {
  position: fixed; top: 0; right: 0;
  width: 82%; max-width: 340px; height: 100vh;
  background: white; z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0,0,0,0.12);
}
.mobile-slide-menu.open { transform: translateX(0); }

/* ---- Glass Card ---- */
.glass-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.4);
}

/* ---- Touch Feedback ---- */
.touch-active:active { transform: scale(0.97); opacity: 0.85; }

/* ---- Safe Area (iPhone notch) ---- */
.bottom-safe { padding-bottom: env(safe-area-inset-bottom, 20px); }

/* ---- Smooth page load ---- */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-animate { animation: pageIn 0.4s ease-out; }

/* ---- Mobile sticky CTA bar ---- */
@media (max-width: 768px) {
  .sticky-mobile-cta {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white; padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 100;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}
