﻿/* ==========================================================================
   image-vectorizer.css  —  ADS Yaatra Image Vectorizer (Fully Responsive)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero / Page Shell
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 170px 0 80px;
  text-align: center;
  background: linear-gradient(135deg, #f8f9ff 0%, #eef4ff 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #262262, #27aae1);
}

.hero-text h1 {
  font-size: 3.4rem;
  font-weight: 700;
  color: #262262;
  margin-bottom: 1.2rem;
  line-height: 1.1;
  margin-top: -35px;
}

.lead {
  font-size: 1.4rem;
  color: #444;
  max-width: 1200px;
  margin: 0 auto 2.2rem;
  line-height: 1.6;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 0;
}

.badge {
  background: #262262;
  color: white;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge .material-icons-round {
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Tool Wrapper & Grid Architecture
   -------------------------------------------------------------------------- */
.tool-with-sidebar {
  display: flex;
  gap: 20px;
  justify-content: center;
  max-width: 2000px;
  margin: 40px auto;
  padding: 0 15px;
}

.upscaler-tool-box {
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Default state: 3-column split grid for large viewports */
.ad-row,
.scale-row {
  display: grid;
  grid-template-columns: 300px minmax(320px, 1fr) 300px;
  gap: 1.5rem;
  align-items: start; /* Prevents stretching side elements */
  margin-bottom: 1.8rem;
}

/* --------------------------------------------------------------------------
   Ad Slots
   -------------------------------------------------------------------------- */
.ad-slot,
.feature-ad-slot {
  background: #f4f7ff;
  border: 1px dashed #c8d4f5;
  border-radius: 20px;
  width: 300px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto; /* Center when stacked */
}

.ad-slot ins,
.feature-ad-slot ins {
  display: block;
  width: 100%;
  height: 250px !important;
}

.adsense-banner {
  display: flex;
  justify-content: center;
  margin: 24px auto 0;
  width: 100%;
  max-width: 780px;
  min-height: 60px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Upload Area
   -------------------------------------------------------------------------- */
.upload-area {
  border: 3px dashed #c0d4ff;
  border-radius: 20px;
  padding: 6rem 1.5rem;
  text-align: center;
  background: white;
  transition: all 0.35s ease;
  box-shadow: 0 8px 30px rgba(38, 34, 98, 0.06);
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #27aae1;
  background: rgba(39, 170, 225, 0.04);
  box-shadow: 0 12px 40px rgba(39, 170, 225, 0.12);
}

.upload-icon-wrap {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #eef4ff, #dbeeff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
}

.upload-icon {
  font-size: 3.5rem !important;
  color: #27aae1;
}

.upload-content h3 {
  color: #262262;
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

.upload-hint {
  color: #7a85a0;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.upscaler-tool-box .btn-primary {
  background: #262262;
  color: #fff !important;
  padding: 14px 44px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(38, 34, 98, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

.upscaler-tool-box .btn-primary:hover {
  background: #27aae1;
  transform: translateY(-3px);
  box-shadow: 0 4px 25px rgba(39, 170, 225, 0.4);
}

/* --------------------------------------------------------------------------
   Upscaler Layout Workspace
   -------------------------------------------------------------------------- */
.upscaler-layout {
  display: block;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow:
    0 15px 35px rgba(38, 34, 98, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.scale-card {
  background: white;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 22px 45px rgba(38, 34, 98, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.file-info-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f4f7ff;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: #262262;
  font-weight: 500;
  overflow: hidden;
}

.file-info-strip .material-icons-round {
  color: #27aae1;
  flex-shrink: 0;
}

#fileNameLabel {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-change-img {
  background: none;
  border: 1.5px solid #27aae1;
  color: #27aae1;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-change-img:hover {
  background: #27aae1;
  color: white;
}

.control-section h3 {
  color: #262262;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.control-section h3 .material-icons-round {
  font-size: 1.1rem;
  color: #27aae1;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.form-group {
  flex: 1;
  min-width: 240px;
}

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: #262262;
}

select {
  width: 100%;
  padding: 0.95rem 1.2rem;
  border: 2px solid #d0d8ff;
  border-radius: 14px;
  font-size: 1rem;
  background: white;
}

.btn-upscale {
  background: linear-gradient(135deg, #262262 0%, #27aae1 100%);
  color: white;
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(38, 34, 98, 0.3);
  letter-spacing: 0.02em;
}

.btn-upscale:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(39, 170, 225, 0.4);
}

.btn-upscale:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.info-text {
  color: #7a85a0;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Mid Banner Ad Block
   -------------------------------------------------------------------------- */
.banner-ad {
  margin: 1.6rem 0;
  display: flex;
  justify-content: center;
  min-height: 70px;
}

.banner-ad ins {
  width: 100%;
  max-width: 750px;
}

/* --------------------------------------------------------------------------
   Preview Workspace Compartment
   -------------------------------------------------------------------------- */
.preview-container {
  background: white;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 22px 45px rgba(38, 34, 98, 0.08);
  margin-top: 1.6rem;
}

.image-comparison {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.comparison-item {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5edff;
  padding: 0.9rem;
  background: white;
}

.comparison-header {
  background: #262262;
  color: white;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.comparison-header.upscaled-header {
  background: linear-gradient(90deg, #262262, #27aae1);
}

.comparison-header h4 {
  margin: 0;
  font-size: 1rem;
}

.preview {
  position: relative;
  background: #f4f7ff;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.preview-img {
  width: 100%;
  height: auto;
  max-height: 260px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.vector-preview {
  background: white;
  padding: 1.5rem;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 16px 16px;
}

.vector-preview svg {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.comparison-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.divider-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #d0d8ff, transparent);
}

.divider-badge {
  background: linear-gradient(135deg, #262262, #27aae1);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Loading Indicators
   -------------------------------------------------------------------------- */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
}

.spinner-ring {
  width: 64px;
  height: 64px;
  border: 6px solid rgba(38, 34, 98, 0.12);
  border-top-color: #262262;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-text {
  margin: 0;
  color: #262262;
  font-size: 1rem;
  font-weight: 600;
}

.spinner-sub {
  margin: 0;
  color: #7a85a0;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Asset Ready UI / Downloader Area
   -------------------------------------------------------------------------- */
.upscale-tier-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: #27aae1;
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
}

.tier-message {
  margin: 0;
  color: #5a617f;
  font-size: 0.95rem;
  text-align: center;
}

.download-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.8rem;
}

.btn-download {
  background: linear-gradient(135deg, #262262, #27aae1);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.btn-download:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: #f4f7ff;
  border: 1px solid #d0d8ff;
  color: #262262;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #e8efff;
}

/* --------------------------------------------------------------------------
   Features Display Section
   -------------------------------------------------------------------------- */
.features-section {
  padding: 60px 0;
  background: white;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title-wrap h2 {
  color: #262262;
  font-size: 2.8rem;
  margin: 0;
}

.accent {
  color: #27aae1;
}

.section-sub {
  color: #5a617f;
  max-width: 810px;
  margin: 1rem auto 0;
  line-height: 1.5;
}

.features-grid-8 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #f9faff;
  border-radius: 20px;
  padding: 2.5rem 1.8rem;
  border: 1px solid #e5edff;
  transition: all 0.3s ease;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(38, 34, 98, 0.12);
  border-color: #27aae1;
}

.feature-icon-wrap {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #eef4ff, #dbeeff);
  margin-bottom: 1.4rem;
}

.feature-icon-wrap .material-icons-round {
  font-size: 2rem;
  color: #27aae1;
}

.feature-card h3 {
  color: #262262;
  margin-bottom: 0.85rem;
  font-size: 1.3rem;
}

.feature-card p {
  color: #5a617f;
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   System Operational Worksteps Section
   -------------------------------------------------------------------------- */
.how-section {
  padding: 60px 0;
  background: #f8f9ff;
}

.steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.step-card {
  background: white;
  border-radius: 20px;
  padding: 2.2rem 1.8rem;
  text-align: center;
  flex: 1;
  min-width: 240px;
  max-width: 280px;
  box-shadow: 0 10px 30px rgba(38, 34, 98, 0.08);
  border: 1px solid #e5edff;
  position: relative;
  transition: transform 0.3s;
}

.step-card:hover {
  transform: translateY(-6px);
}

.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #262262, #27aae1);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
}

.step-icon {
  font-size: 2.8rem !important;
  color: #27aae1;
  margin: 0.8rem 0 1rem;
  display: block;
}

.step-card h3 {
  color: #262262;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.step-card p {
  color: #5a617f;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-arrow .material-icons-round {
  font-size: 2rem;
  color: #c0d4ff;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* ==========================================================================
   CASCADE BREAKPOINTS OVERRIDES (FIXED ALIGNMENT)
   ========================================================================== */

/* ── Breakpoint 5: Large Desktops (1440px) ── */
@media (max-width: 1440px) {
  .hero-text h1 {
    font-size: 3.2rem;
  }
  .lead {
    max-width: 1080px;
  }
  .tool-with-sidebar {
    padding: 0 24px;
  }
  .upscaler-tool-box {
    max-width: 1440px;
  }
}

/* ── Breakpoint 4: Desktops (1280px) ── */
@media (max-width: 1280px) {
  .hero-text h1 {
    font-size: 3rem;
  }
  .lead {
    max-width: 980px;
  }
  .ad-row,
  .scale-row {
    grid-template-columns: 240px minmax(320px, 1fr) 240px;
    gap: 1rem;
  }
  .ad-slot {
    width: 240px;
  }
}

/* ── Breakpoint 3: Laptops & Medium Screens (1024px) ── */
@media (max-width: 1024px) {
  .hero-text h1 {
    font-size: 2.6rem;
  }
  .lead {
    font-size: 1.2rem;
    max-width: 800px;
  }

  .ad-row,
  .scale-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    justify-items: center; /* Center items inside the grid container */
  }

  .ad-slot,
  .feature-ad-slot {
    width: 300px;
    height: 250px;
    order: 2; /* Move ads below the main interaction cards on smaller screens */
  }

  .upload-area,
  .scale-card {
    width: 100%;
    max-width: 600px; /* Contain card sizes nicely */
    order: 1; /* Keep processing area on top */
  }

  .tool-with-sidebar {
    flex-direction: column;
    align-items: center;
  }
}

/* ── Breakpoint 2: Tablets (768px) ── */
@media (max-width: 768px) {
  .hero-section {
    padding: 130px 0 60px;
  }
  .hero-text h1 {
    font-size: 2.2rem;
  }
  .lead {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

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

  .upscaler-layout {
    padding: 1.25rem;
    width: 100%;
    box-sizing: border-box;
  }

  .scale-card {
    padding: 1.5rem;
  }

  .image-comparison {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .comparison-divider {
    padding: 0.5rem 0;
  }

  .divider-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, transparent, #d0d8ff, transparent);
  }

  .steps-row {
    flex-direction: column;
    gap: 2rem;
  }
  .step-arrow {
    transform: rotate(90deg);
  }
  .step-card {
    max-width: 100%;
    width: 100%;
  }
}

/* ── Breakpoint 1: Small Mobile viewports (480px) ── */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }
  .lead {
    font-size: 1rem;
  }
  .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .upload-area {
    padding: 3.5rem 1rem;
  }
  .upload-content h3 {
    font-size: 1.25rem;
  }

  .form-group {
    min-width: 100%;
  }

  .btn-download,
  .btn-secondary,
  .upscaler-tool-box .btn-primary,
  .btn-upscale {
    width: 100%;
    justify-content: center;
  }

  .ad-slot,
  .feature-ad-slot {
    max-width: 100%;
  }
}
