/* ==========================================================================
   AVRIXXX - Digital Greeting Collection
   Design System & Styling Rules
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;1,500;1,600&display=swap');

:root {
  /* Color Palette - Sky Blue Theme */
  --bg-dark: #060c18;
  --bg-surface: #0c182b;
  --bg-card: rgba(12, 24, 44, 0.7);
  --bg-card-hover: rgba(18, 36, 66, 0.88);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-strong: rgba(255, 255, 255, 0.08);

  --accent-primary: #0ea5e9;
  --accent-rose: #38bdf8;
  --accent-pink: #06b6d4;
  --accent-purple: #6366f1;
  --accent-glow: rgba(56, 189, 248, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(56, 189, 248, 0.3);
  --border-accent-strong: rgba(56, 189, 248, 0.6);

  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Playfair Display', Georgia, serif;

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.3);

  /* Spacing & Layout */
  --container-max: 1280px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
  border: none;
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Background Ambient Orbs Container */
.bg-orbs-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  animation: pulseOrb 8s infinite alternate ease-in-out;
}

.bg-orb-1 {
  width: 450px;
  height: 450px;
  background: #38bdf8;
  top: -100px;
  left: -100px;
}

.bg-orb-2 {
  width: 450px;
  height: 450px;
  background: #6366f1;
  top: 30%;
  right: -100px;
  animation-delay: 3s;
}

.bg-orb-3 {
  width: 400px;
  height: 400px;
  background: #0284c7;
  bottom: 10%;
  left: -100px;
  animation-delay: 5s;
}

@keyframes pulseOrb {
  0% { transform: scale(1) translate(0, 0); opacity: 0.4; }
  100% { transform: scale(1.15) translate(20px, 30px); opacity: 0.65; }
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 0.85rem 0;
  background: rgba(9, 7, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.nav-logo-text-wrapper {
  display: inline-flex;
  align-items: center;
  width: 140px;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo-accent {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 0 15px var(--accent-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-rose), var(--accent-purple));
  transition: var(--transition-smooth);
  border-radius: 2px;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-purple));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(244, 63, 94, 0.45);
  filter: brightness(1.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  transition: var(--transition-smooth);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Navigation Actions & Sub-elements */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-text-mobile {
  display: none;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 18, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.nav-menu-header {
  display: none;
}

.mobile-menu-cta {
  display: none;
}

.w-full {
  width: 100%;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.mobile-toggle:active {
  transform: scale(0.94);
}

/* Floating WhatsApp Quick Action Button for Mobile */
.floating-wa-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  transition: var(--transition-smooth);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.floating-wa-btn:hover, .floating-wa-btn:active {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

.wa-icon-glow {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: waPulse 2s infinite ease-in-out;
}

.wa-tooltip {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

@keyframes waPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* Hero Section */
.hero {
  padding: 10rem 0 6rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-badge-icon {
  animation: spinSlow 6s linear infinite;
}

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

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
  color: #ffffff;
}

.hero-title-highlight {
  background: linear-gradient(135deg, #ffffff 20%, #38bdf8 65%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-cursor {
  display: inline-block;
  color: #38bdf8;
  font-weight: 300;
  margin-left: 2px;
  font-size: 1.2rem;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 540px;
  font-weight: 400;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Hero Visual Collage */
.hero-visual {
  position: relative;
}

.collage-container {
  position: relative;
  width: 100%;
  height: 480px;
}

.collage-card {
  position: absolute;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

.collage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage-card-1 {
  width: 320px;
  height: 220px;
  top: 0;
  left: 0;
  z-index: 3;
  transform: rotate(-4deg);
  border-color: rgba(244, 63, 94, 0.3);
}

.collage-card-2 {
  width: 340px;
  height: 230px;
  top: 60px;
  right: 0;
  z-index: 2;
  transform: rotate(5deg);
}

.collage-card-3 {
  width: 350px;
  height: 240px;
  bottom: 0;
  left: 40px;
  z-index: 4;
  transform: rotate(-1deg);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(244, 63, 94, 0.2);
}

.collage-card:hover {
  transform: translateY(-8px) scale(1.03) rotate(0deg) !important;
  z-index: 10 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), var(--shadow-glow);
}

.hero-float-badge {
  position: absolute;
  bottom: 20px;
  right: 10px;
  z-index: 12;
  background: rgba(18, 14, 30, 0.85);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-accent);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--shadow-md);
}

.float-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.float-badge-text p:first-child {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.float-badge-text p:last-child {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Template Section */
.templates-section {
  padding: 6rem 0;
  position: relative;
}

/* Filter Controls */
.filter-wrapper {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

/* Search Bar */
.search-box {
  position: relative;
  width: 100%;
  max-width: 540px;
}

.search-input {
  width: 100%;
  padding: 1.05rem 1.4rem 1.05rem 3.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 0.95rem;
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--accent-rose);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
  background: rgba(12, 24, 44, 0.9);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  transition: var(--transition-smooth);
}

.search-clear:hover {
  color: #fff;
}

/* Category Filter Chips */
.category-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.chip {
  padding: 0.55rem 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.chip.active {
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-purple));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* Template Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Template Card */
.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  position: relative;
}

.template-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(244, 63, 94, 0.2);
  background: var(--bg-card-hover);
}

.card-preview-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #000;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.template-card:hover .card-img {
  transform: scale(1.07);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 11, 24, 0.9) 0%, transparent 60%);
  opacity: 0.6;
  transition: var(--transition-smooth);
}

.template-card:hover .card-overlay {
  opacity: 0.3;
}

.card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.85rem;
  background: rgba(18, 14, 30, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  color: #fb7185;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 2;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: auto;
}

.btn-card-preview {
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-purple));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-card-preview:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

.btn-card-details {
  padding: 0.65rem 1rem;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-card-details:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* Empty State */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: none;
}

.no-results-icon {
  font-size: 3rem;
  color: var(--accent-rose);
  margin-bottom: 1rem;
}

.no-results-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.no-results-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Modal Styling */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  transform: scale(0.92) translateY(20px);
  transition: var(--transition-smooth);
  position: relative;
}

.modal-backdrop.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.modal-close:hover {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
  transform: rotate(90deg);
}

.modal-content {
  padding: 2.5rem;
}

/* Device Preview Toggle */
.device-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.4rem;
  border-radius: var(--radius-pill);
  width: fit-content;
  margin: 0 auto 1.5rem;
  border: 1px solid var(--border-light);
}

.device-btn {
  padding: 0.45rem 1.1rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.device-btn.active {
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Viewport Preview Box */
.viewport-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #05030a;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
  min-height: 380px;
  transition: var(--transition-smooth);
}

.viewport-frame {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.viewport-frame.desktop {
  max-width: 100%;
}

.viewport-frame.tablet {
  max-width: 580px;
}

.viewport-frame.mobile {
  max-width: 340px;
}

.viewport-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.modal-category-badge {
  padding: 0.4rem 1rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--border-accent);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

.modal-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* How It Works Section */
.how-section {
  padding: 6rem 0;
  position: relative;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  transition: var(--transition-smooth);
  backdrop-filter: blur(16px);
}

.step-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(56, 189, 248, 0.15);
}

.step-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.8rem;
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
  line-height: 1;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Why AVRIXXX Section */
.why-section {
  padding: 6rem 0;
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  transition: var(--transition-smooth);
  backdrop-filter: blur(16px);
  text-align: left;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md), 0 0 25px rgba(56, 189, 248, 0.18);
  background: var(--bg-card-hover);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #38bdf8;
  margin-bottom: 1.5rem;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* FAQ Section */
.faq-section {
  padding: 6rem 0;
  position: relative;
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  backdrop-filter: blur(16px);
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.faq-item.active {
  border-color: var(--border-accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.faq-question {
  width: 100%;
  padding: 1.35rem 1.75rem;
  background: transparent;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--accent-rose);
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 1.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.75rem 1.5rem;
}

/* CTA Section */
.cta-section {
  padding: 6rem 0 8rem;
  position: relative;
}

.cta-box {
  background: linear-gradient(135deg, rgba(12, 24, 44, 0.9), rgba(20, 38, 68, 0.9));
  border: 1px solid var(--border-accent-strong);
  border-radius: var(--radius-lg);
  padding: 4.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  backdrop-filter: blur(20px);
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}

.cta-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: #05030a;
  border-top: 1px solid var(--border-light);
  padding: 4.5rem 0 2.5rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand .nav-logo {
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 320px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.social-icon:hover {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
  color: #fff;
  transform: translateY(-3px);
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--accent-rose);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Comprehensive Multi-Device Responsive System (All Viewports & Screens)
   ========================================================================== */

.btn-text-short {
  display: none;
}

.btn-text-full {
  display: inline;
}

/* 1. Large Desktop / 4K Displays (> 1400px Zoom Out Protection) */
@media (min-width: 1401px) {
  .container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
  }

  .templates-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* 2. Standard Desktop / Laptops (1025px - 1400px) */
@media (min-width: 1025px) and (max-width: 1400px) {
  .container {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
  }

  .templates-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* 3. Laptops & Landscape Tablets (992px - 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .collage-container {
    height: 360px;
    max-width: 480px;
    margin: 0 auto;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .templates-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* 4. Medium Tablets & iPad Portrait (769px - 991px) */
@media (max-width: 991px) {
  .templates-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .hero-title {
    font-size: 3.2rem;
  }
}

/* 5. Mobile & Small Tablets (< 768px) */
@media (max-width: 768px) {
  .btn-text-desktop {
    display: none;
  }

  .btn-text-mobile {
    display: inline;
  }

  .btn-text-full {
    display: none;
  }

  .btn-text-short {
    display: inline;
  }

  .btn-nav-cta {
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: rgba(8, 14, 28, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 1.5rem 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
  }

  .nav-menu-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-light);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
  }

  .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    display: block;
    width: 100%;
    padding: 0.4rem 0;
  }

  .mobile-menu-cta {
    display: block;
    width: 100%;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
  }

  /* Hero Section Mobile */
  .hero {
    padding: 6.5rem 0 3rem;
  }

  .hero-title {
    font-size: clamp(2rem, 7.5vw, 2.75rem);
    line-height: 1.18;
  }

  .hero-desc {
    font-size: 0.98rem;
    margin-bottom: 1.75rem;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.85rem;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
  }

  /* Hero Visual Collage Mobile Frame */
  .hero-visual {
    width: 100%;
    overflow: hidden;
  }

  .collage-container {
    height: 290px;
    width: 100%;
    max-width: 330px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
  }

  .collage-card-1 {
    width: 175px;
    height: 120px;
    top: 0;
    left: 0;
  }

  .collage-card-2 {
    width: 185px;
    height: 125px;
    top: 30px;
    right: 0;
  }

  .collage-card-3 {
    width: 195px;
    height: 130px;
    bottom: 0;
    left: 10px;
  }

  .hero-float-badge {
    padding: 0.5rem 0.75rem;
    bottom: 0px;
    right: 0px;
    backdrop-filter: blur(20px);
  }

  .float-badge-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .float-badge-text p:first-child {
    font-size: 0.8rem;
  }

  .float-badge-text p:last-child {
    font-size: 0.7rem;
  }

  /* Category Chips - Touch Horizontal App-Style Scroll Bar */
  .category-chips {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding: 0.35rem 0.25rem 0.65rem;
    gap: 0.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .category-chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
  }

  /* Search Input Mobile iOS Auto-zoom Fix */
  .search-input {
    font-size: 16px;
    padding: 0.9rem 1.25rem 0.9rem 2.8rem;
  }

  .search-icon {
    left: 1rem;
  }

  .section-header {
    margin-bottom: 2.25rem;
  }

  .section-title {
    font-size: 1.9rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .templates-section, .how-section, .why-section, .faq-section {
    padding: 3.5rem 0;
  }

  /* Templates Grid - 2 Columns per Row on HP */
  .templates-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    box-sizing: border-box;
  }

  .template-card {
    border-radius: var(--radius-md);
  }

  .card-preview-wrapper {
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 110px;
  }

  .card-badge {
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.65rem;
  }

  .card-body {
    padding: 0.85rem 0.65rem;
  }

  .card-title {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-desc {
    font-size: 0.75rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }

  .btn-card-preview, .btn-card-details {
    padding: 0.5rem 0.2rem;
    font-size: 0.75rem;
    width: 100%;
    border-radius: var(--radius-sm);
    justify-content: center;
    white-space: nowrap;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.75rem 1.5rem;
  }

  .step-card {
    padding: 1.75rem 1.5rem;
  }

  .faq-question {
    padding: 1.1rem 1.25rem;
    font-size: 1rem;
  }

  .faq-answer {
    padding: 0 1.25rem;
    font-size: 0.9rem;
  }

  .faq-item.active .faq-answer {
    padding: 0 1.25rem 1.25rem;
  }

  /* CTA Section Mobile */
  .cta-section {
    padding: 3.5rem 0 6.5rem;
  }

  .cta-box {
    padding: 2.75rem 1.25rem;
  }

  .cta-title {
    font-size: 1.95rem;
  }

  .cta-desc {
    font-size: 0.98rem;
    margin-bottom: 1.75rem;
  }

  .cta-actions {
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
  }

  .cta-actions .btn-primary,
  .cta-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Footer Mobile */
  .footer {
    padding: 3.5rem 0 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    margin-bottom: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  /* Modal Mobile HP Fixes */
  .modal-backdrop {
    padding: 0.5rem;
  }

  .modal-container {
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: var(--radius-md);
  }

  .modal-content {
    padding: 1.25rem 1rem 1.5rem;
  }

  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
  }

  .modal-title {
    font-size: 1.4rem;
  }

  .modal-desc {
    font-size: 0.95rem;
  }

  .viewport-wrapper {
    padding: 0.5rem;
    min-height: auto;
    margin-bottom: 1.25rem;
  }

  .viewport-frame {
    height: 250px;
  }

  .modal-footer-actions {
    flex-direction: column;
    padding-top: 1rem;
  }

  .modal-footer-actions .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* 6. Standard & Small HP Smartphones (< 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .templates-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }

  .card-body {
    padding: 0.65rem 0.45rem;
  }

  .card-title {
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
  }

  .card-desc {
    font-size: 0.72rem;
    margin-bottom: 0.5rem;
    -webkit-line-clamp: 2;
  }

  .btn-card-preview, .btn-card-details {
    padding: 0.45rem 0.15rem;
    font-size: 0.72rem;
  }

  .floating-wa-btn {
    bottom: 1.25rem;
    right: 0.85rem;
    padding: 0.6rem 0.95rem;
  }
  
  .wa-tooltip {
    font-size: 0.78rem;
  }

  .nav-logo-text-wrapper {
    width: 110px;
    font-size: 1.2rem;
  }

  .logo-accent {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
}

/* 7. Extra Small Smartphones (< 360px) */
@media (max-width: 360px) {
  .templates-grid {
    gap: 0.45rem;
  }
  .card-body {
    padding: 0.5rem 0.35rem;
  }
  .card-title {
    font-size: 0.82rem;
  }
  .card-desc {
    font-size: 0.68rem;
  }
  .btn-card-preview, .btn-card-details {
    font-size: 0.68rem;
    padding: 0.4rem 0.1rem;
  }
}
