/* CSS Variables based on Custom Color Palette */
:root {
  --color-primary: #6F8F7B;      /* Sage Green */
  --color-secondary: #AFC8B4;    /* Soft Green */
  --color-bg-light: #F4EBDD;     /* Warm Cream */
  --color-accent: #D8C7A6;       /* Tan-Beige */
  --color-dark: #3E5F4D;         /* Forest Green */
  
  --color-white: #FFFFFF;
  --color-shadow: rgba(62, 95, 77, 0.15);
  --color-shadow-hover: rgba(62, 95, 77, 0.25);
  --border-radius: 16px;
  --transition-speed: 0.3s;
}

/* Reset & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  overflow-x: hidden;
  position: relative;
}



/* Background Decoration for organic look */
.background-decor {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(175, 200, 180, 0.3) 0%, rgba(244, 235, 221, 0) 70%);
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.background-decor::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -40%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(111, 143, 123, 0.2) 0%, rgba(244, 235, 221, 0) 70%);
  border-radius: 50%;
  filter: blur(40px);
}

/* Base Containers */
.container {
  width: 100%;
  max-width: 680px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header & Logo styling */
.app-header {
  text-align: center;
  margin-top: 10px;
}

.app-header .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-dark);
}

.logo-emoji {
  font-size: 2.8rem;
  filter: drop-shadow(0 4px 6px var(--color-shadow));
  transition: transform 0.5s ease;
  user-select: none;
}

.app-header .logo:hover .logo-emoji {
  transform: rotate(-10deg) scale(1.1);
}

.app-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Progress Tracker Bar styling */
.progress-bar-container {
  background: var(--color-white);
  padding: 20px 24px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px var(--color-shadow);
  border: 1px solid rgba(175, 200, 180, 0.4);
}

.progress-line {
  height: 6px;
  background: var(--color-bg-light);
  border-radius: 3px;
  position: relative;
  margin-bottom: 12px;
}

.progress-line-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.steps-indicators {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.step-dot span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-primary);
  transition: all var(--transition-speed) ease;
}

.step-dot label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  opacity: 0.7;
  transition: all var(--transition-speed) ease;
  text-align: center;
}

.step-dot.active span {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 0 4px rgba(111, 143, 123, 0.2);
}

.step-dot.active label {
  opacity: 1;
  font-weight: 600;
}

.step-dot.completed span {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-dark);
}

/* Wizard Card & step transitions */
.wizard-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px var(--color-shadow);
  border: 1px solid rgba(175, 200, 180, 0.4);
  padding: 40px;
  min-height: 380px;
  position: relative;
  overflow: hidden;
}

.wizard-card::before {
  content: '';
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 170px;
  height: 170px;
  background-image: url('mallard.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.08; /* beautiful faded watermark inside card */
  z-index: 0;
  pointer-events: none;
}

.wizard-step {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: relative;
  z-index: 1; /* render content above watermark */
}

.wizard-step.active {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  transform: translateY(0);
  height: 100%;
  animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Content Typographies */
.step-header {
  margin-bottom: 28px;
}

.step-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.step-header p {
  font-size: 0.95rem;
  color: var(--color-primary);
  line-height: 1.5;
}

.step-body {
  flex-grow: 1;
  margin-bottom: 32px;
}

/* Buttons style */
.btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-speed) ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(111, 143, 123, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(62, 95, 77, 0.4);
}

.btn-secondary {
  background-color: var(--color-bg-light);
  color: var(--color-dark);
  border: 1px solid var(--color-accent);
}

.btn-secondary:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
}

.btn-text {
  background-color: transparent;
  color: var(--color-primary);
  padding: 12px 16px;
}

.btn-text:hover {
  color: var(--color-dark);
  background-color: rgba(175, 200, 180, 0.15);
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--color-bg-light);
  padding-top: 24px;
}

.wizard-actions.center {
  justify-content: center;
  border-top: none;
  padding-top: 10px;
}

/* Step 0: Welcome Elements */
.welcome-hero {
  text-align: center;
  margin-bottom: 32px;
}

.welcome-hero h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 12px;
}

.welcome-hero .hero-desc {
  font-size: 1.05rem;
  color: var(--color-primary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.feature-item {
  background: var(--color-bg-light);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--color-accent);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px var(--color-shadow);
  border-color: var(--color-primary); /* highlight border on hover */
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
}

.app-logo-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform var(--transition-speed) ease;
}

.feature-item:hover .app-logo-icon {
  transform: scale(1.12);
}

.feature-item h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--color-dark);
  opacity: 0.8;
}

/* Step 1 & integration layout cards */
.info-box {
  background-color: rgba(175, 200, 180, 0.2);
  border-left: 4px solid var(--color-primary);
  padding: 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.action-card {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-accent);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
}

.action-card-content {
  flex-grow: 1;
}

.action-card-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.action-card-content p {
  font-size: 0.88rem;
  opacity: 0.8;
  line-height: 1.4;
}

.notes-box {
  margin-top: 24px;
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-accent);
  border-radius: 12px;
  padding: 20px;
}

.notes-box h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--color-dark);
  font-size: 1rem;
  margin-bottom: 12px;
}

.notes-box ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notes-box li {
  font-size: 0.88rem;
  line-height: 1.5;
  position: relative;
  padding-left: 20px;
}

.notes-box li::before {
  content: '•';
  color: var(--color-primary);
  font-weight: bold;
  position: absolute;
  left: 5px;
  top: 0;
}

/* Step 2 Form design */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
}

.required {
  color: #C0392B;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid var(--color-secondary);
  background-color: var(--color-white);
  color: var(--color-dark);
  transition: all var(--transition-speed) ease;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(111, 143, 123, 0.15);
}

.form-help {
  font-size: 0.8rem;
  color: var(--color-primary);
  opacity: 0.8;
}

/* Custom checkbox custom design */
.toggle-group {
  margin-top: 10px;
}

.checkbox-container {
  display: block;
  position: relative;
  padding-left: 32px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500 !important;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: var(--color-white);
  border: 2px solid var(--color-secondary);
  border-radius: 4px;
  transition: all var(--transition-speed) ease;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--color-primary);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Form actions */
.form-actions {
  margin-top: 28px;
}

.form-status {
  margin: 15px 0;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.form-status.error {
  display: block;
  background-color: #FADBD8;
  color: #78281F;
  border-left: 4px solid #CD6155;
}

.form-status.loading {
  display: block;
  background-color: var(--color-bg-light);
  color: var(--color-dark);
  border-left: 4px solid var(--color-accent);
}

/* Alert Boxes style */
.success-alert {
  text-align: center;
  padding: 20px 10px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--color-secondary);
  color: var(--color-dark);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: popScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon.finish {
  background-color: var(--color-primary);
  color: var(--color-white);
}

@keyframes popScale {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-alert h3,
.success-alert h2 {
  font-family: 'Outfit', sans-serif;
  margin-bottom: 12px;
  color: var(--color-dark);
}

.success-alert p {
  font-size: 0.98rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 480px;
  margin: 0 auto;
}

/* Step 3: Optimization Guide Tabs & Cards */
.tab-container {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--color-bg-light);
  margin-bottom: 20px;
}

.tab-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--color-primary);
  opacity: 0.7;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-speed) ease;
}

.tab-btn:hover {
  opacity: 1;
  color: var(--color-dark);
}

.tab-btn.active {
  opacity: 1;
  color: var(--color-dark);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.guide-card {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-accent);
  border-radius: 12px;
  padding: 24px;
}

.guide-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.guide-badge.urgent {
  background-color: #E6B0AA;
  color: #78281F;
}

.guide-badge.info {
  background-color: var(--color-secondary);
  color: var(--color-dark);
}

.guide-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.guide-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
  opacity: 0.9;
}

.instructions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inst-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--color-white);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(62, 95, 77, 0.05);
}

.inst-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.inst-text {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-dark);
}

.inst-text a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.inst-text a:hover {
  text-decoration: underline;
}

/* Step 4 & 5 Integrations Card style */
.integration-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-accent);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.card-logo {
  font-size: 3rem;
  line-height: 1;
  background: var(--color-white);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 10px var(--color-shadow);
}

.card-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-details h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
}

.card-details p {
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.9;
}

.card-details .service-link-desc {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: -4px;
  opacity: 0.7;
}

.abs-details-box {
  background: var(--color-white);
  padding: 16px;
  border-radius: 8px;
  margin: 10px 0;
  font-size: 0.88rem;
  border: 1px dashed var(--color-secondary);
}

.abs-details-box code {
  background: var(--color-bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: bold;
}

/* Final Recap list */
.final-recap {
  background: var(--color-bg-light);
  border: 1px solid var(--color-accent);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  text-align: left;
  width: 100%;
}

.final-recap h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.final-recap ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.final-recap li {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.final-recap a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.final-recap a:hover {
  text-decoration: underline;
}

.final-footer {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 10px;
}

/* Footer layout credits */
.app-footer-credit {
  margin: 20px 0 10px;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Responsiveness adjustments */
@media (max-width: 600px) {
  body {
    padding: 12px;
  }
  
  .wizard-card {
    padding: 24px 20px;
  }
  
  .action-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .integration-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }
  
  .card-logo {
    margin-bottom: 8px;
  }
  
  .steps-indicators label {
    display: none;
  }
  
  .step-dot span {
    width: 32px;
    height: 32px;
  }

  .app-header h1 {
    font-size: 1.6rem;
  }
}

/* Welcome page buttons container styling */
.welcome-buttons-container {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Preview Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(62, 95, 77, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); /* Safari support */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.25s ease-out;
}

.modal-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: 0 15px 40px rgba(62, 95, 77, 0.25);
  border: 1px solid rgba(175, 200, 180, 0.5);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-bg-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-bg-light);
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  color: var(--color-dark);
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  cursor: pointer;
  transition: color var(--transition-speed) ease;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--color-dark);
}

.modal-tabs {
  display: flex;
  background-color: var(--color-bg-light);
  border-bottom: 1px solid var(--color-accent);
  padding: 0 16px;
  gap: 8px;
}

.modal-tab-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  opacity: 0.7;
  transition: all var(--transition-speed) ease;
  position: relative;
}

.modal-tab-btn:hover {
  opacity: 1;
  color: var(--color-dark);
}

.modal-tab-btn.active {
  opacity: 1;
  color: var(--color-dark);
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 3px 3px 0 0;
}

.modal-body {
  padding: 24px;
  flex-grow: 1;
  overflow-y: auto;
  background-color: var(--color-white);
  min-height: 300px;
}

.preview-grid {
  display: none;
}

.preview-grid.active {
  display: block;
}

.grid-loading {
  text-align: center;
  padding: 80px 40px;
  color: var(--color-primary);
  font-weight: 500;
  font-style: italic;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 20px;
}

/* Preview Card Styles */
.preview-card {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-accent);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(62, 95, 77, 0.05);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  position: relative;
}

.preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px var(--color-shadow);
  border-color: var(--color-primary);
}

.preview-img-wrapper {
  width: 100%;
  aspect-ratio: 2/3;
  background-color: var(--color-accent);
  overflow: hidden;
  position: relative;
}

.preview-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.preview-card:hover .preview-img-wrapper img {
  transform: scale(1.05);
}

.preview-info {
  padding: 10px 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.preview-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.preview-info p {
  font-size: 0.72rem;
  color: var(--color-primary);
  font-weight: 500;
  margin: 4px 0 0 0;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-bg-light);
  background-color: var(--color-bg-light);
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-dark);
  opacity: 0.9;
}

@media (max-width: 600px) {
  .welcome-buttons-container {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .welcome-buttons-container .btn {
    width: 100%;
  }
  
  .modal-card {
    width: 95%;
    max-height: 90vh;
  }

  .modal-body {
    padding: 16px 12px;
  }

  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
  }
  
  .preview-info {
    padding: 8px 6px;
  }
  
  .preview-info h4 {
    font-size: 0.78rem;
  }
  
  .preview-info p {
    font-size: 0.68rem;
  }
}

/* Modal search bar styling */
.modal-search-container {
  padding: 12px 24px;
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-accent);
}

.modal-search-container input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--color-accent);
  background-color: var(--color-bg-light);
  color: var(--color-dark);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
}

.modal-search-container input:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(111, 143, 123, 0.25);
}

/* Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

