/* ==========================================================================
   ROMOGOOD STUDIO - Main Theme & Responsive Stylesheet
   Color System: Dark Navy, Pure White, Royal Modern Blue, WhatsApp Green
   ========================================================================== */

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

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Light Mode Colors (Default fallback) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-badge: #eff6ff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.85);
  --modal-overlay: rgba(15, 23, 42, 0.65);
  
  /* Brand Accents */
  --brand-navy: #0b1329;
  --brand-navy-card: #131d38;
  --brand-blue: #2563eb;
  --brand-blue-hover: #1d4ed8;
  --brand-sky: #0284c7;
  --brand-green: #25D366;
  --brand-green-hover: #20ba5a;
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  --brand-dark-grad: linear-gradient(135deg, #0b1329 0%, #172554 100%);
  --wa-gradient: linear-gradient(135deg, #25D366 0%, #16a34a 100%);
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
  --shadow-glow-wa: 0 0 25px rgba(37, 211, 102, 0.4);
}

/* Dark Mode Tokens */
[data-theme="dark"] {
  --bg-body: #070d1e;
  --bg-surface: #0b1329;
  --bg-surface-elevated: #111c3a;
  --bg-card: #0f1a36;
  --bg-card-hover: #16244a;
  --bg-badge: #172554;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  --header-bg: rgba(11, 19, 41, 0.85);
  --modal-overlay: rgba(3, 7, 18, 0.85);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Glassmorphism & Header */
.glass-header {
  background-color: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.glass-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: var(--brand-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Gradients & Badges */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  opacity: 0.95;
}

.btn-whatsapp {
  background: var(--wa-gradient);
  color: #ffffff;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-wa);
  opacity: 0.95;
}

/* Floating WhatsApp Button */
.floating-wa {
  position: fixed;
  bottom: 85px;
  right: 20px;
  z-index: 45;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--wa-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Floating Scroll-to-Top (Button UP) Directly Above WA */
.btn-scroll-top {
  position: fixed;
  bottom: 155px;
  right: 26px;
  z-index: 44;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface-elevated, #0f172a);
  color: var(--text-main, #ffffff);
  border: 1px solid var(--border-strong, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.btn-scroll-top:hover {
  background: var(--brand-blue, #2563eb);
  color: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
}

@media (min-width: 768px) {
  .floating-wa {
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
  }

  .btn-scroll-top {
    bottom: 105px;
    right: 37px;
    width: 50px;
    height: 50px;
  }
}

.floating-wa:hover {
  transform: scale(1.1) rotate(5deg);
}

.floating-wa::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0.75;
  animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Sticky Bottom Nav on Mobile */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background-color: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
  padding: 6px 12px;
  border-radius: 12px;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
  color: var(--brand-blue);
}

/* Portfolio Card Mobile & Desktop Polish */
.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.2);
  border-color: rgba(37, 99, 235, 0.4);
}

.portfolio-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--border-subtle);
}

.portfolio-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-card:hover .portfolio-img-wrapper img {
  transform: scale(1.06);
}

/* Filter Buttons */
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  background-color: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--brand-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Pricing Card Best Seller Glow */
.pricing-popular {
  border: 2px solid var(--brand-blue);
  position: relative;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
}

/* Modal styling */
.custom-modal {
  position: fixed;
  inset: 0;
  background-color: var(--modal-overlay);
  backdrop-filter: blur(8px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.custom-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal.active .modal-content-box {
  transform: scale(1);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-blue);
}

/* Hero Slider Animations */
.slide-item {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  body {
    padding-bottom: 70px; /* Space for bottom nav */
  }
}

/* Custom WhatsApp Order Builder App */
.order-choice-card {
  cursor: pointer;
  border: 2px solid var(--border-subtle);
  background-color: var(--bg-surface);
  border-radius: 1rem;
  padding: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.order-choice-card:hover {
  border-color: var(--brand-blue);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.order-choice-card.selected {
  border-color: var(--brand-blue);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(2, 132, 199, 0.08) 100%);
  box-shadow: 0 0 0 1px var(--brand-blue), 0 4px 14px rgba(37, 99, 235, 0.15);
}

.order-checkbox-card {
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  border-radius: 0.875rem;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
}

.order-checkbox-card:hover {
  border-color: var(--brand-blue);
}

.order-checkbox-card.selected {
  border-color: #22c55e;
  background-color: rgba(34, 197, 94, 0.08);
}

.wa-preview-box {
  background-color: #0b141a;
  border: 1px solid #222e35;
  border-radius: 1.25rem;
  padding: 1.25rem;
  color: #e9edef;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}

