/* ==========================================================================
   image-upscaler.css  —  AdYaatra Image Upscaler
   Core brand colours: #262262 (navy) · #27aae1 (sky blue)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero / Page Shell
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 170px 0 0;
  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;
}

.lead {
  font-size: 1.3rem;
  color: #444;
  max-width: 1090px;
  margin: 0 auto 2.2rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.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;
}

/* --------------------------------------------------------------------------
   AdSense Banner (hero, responsive)
   -------------------------------------------------------------------------- */
.adsense-banner {
  display: flex;
  justify-content: center;
  margin: 24px auto 0;
  width: 100%;
  max-width: 780px;
  min-height: 60px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Tool Wrapper
   -------------------------------------------------------------------------- */
.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;
}

/* --------------------------------------------------------------------------
   Ad Row / Scale Row  (3-column: 300 | tool | 300)
   -------------------------------------------------------------------------- */
.ad-row,
.scale-row {
  display: grid;
  grid-template-columns: 300px minmax(320px, 1fr) 300px;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.8rem;
}

/* --------------------------------------------------------------------------
   Ad Slots (square 300×250)
   -------------------------------------------------------------------------- */
.ad-slot {
  background: #f4f7ff;
  border: 1px dashed #c8d4f5;
  border-radius: 20px;
  width: 300px;
  height: 250px;
  max-height: 250px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-slot ins {
  width: 100%;
  height: 250px !important;
  min-height: 250px !important;
  max-height: 250px !important;
}

.ad-slot ins iframe {
  width: 100% !important;
  height: 250px !important;
  min-height: 250px !important;
  max-height: 250px !important;
}

/* --------------------------------------------------------------------------
   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 (after upload)
   -------------------------------------------------------------------------- */
.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 (controls)
   -------------------------------------------------------------------------- */
.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 */
.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 label */
.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;
}

/* Scale buttons */
/* 4x and 8x scale options are currently commented out in the HTML markup */
.scale-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.scale-btn {
  padding: 14px 8px;
  border: 2px solid #d0d8ff;
  background: white;
  color: #262262;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.scale-label {
  font-size: 1.25rem;
  line-height: 1;
}

.scale-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: #7a85a0;
  letter-spacing: 0.05em;
}

.scale-btn:hover {
  border-color: #27aae1;
  background: rgba(39, 170, 225, 0.06);
  transform: translateY(-2px);
}

.scale-btn.active {
  background: linear-gradient(135deg, #262262, #27aae1);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(38, 34, 98, 0.25);
}

.scale-btn.active .scale-sub {
  color: rgba(255,255,255,0.75);
}

/* Enhance mode cards */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.mode-card {
  border: 2px solid #d0d8ff;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: white;
}

.mode-card .material-icons-round {
  font-size: 1.4rem;
  color: #27aae1;
}

.mode-card span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #262262;
}

.mode-card small {
  font-size: 0.7rem;
  color: #7a85a0;
}

.mode-card:hover {
  border-color: #27aae1;
  background: rgba(39,170,225,0.04);
  transform: translateY(-2px);
}

.mode-card.active {
  border-color: #262262;
  background: linear-gradient(135deg, #f0f4ff, #e6f5ff);
  box-shadow: 0 4px 14px rgba(38, 34, 98, 0.12);
}

.mode-card.active span {
  color: #262262;
}

/* Upscale button */
.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
   -------------------------------------------------------------------------- */
.banner-ad {
  margin: 1.6rem 0;
  display: flex;
  justify-content: center;
  min-height: 70px;
}

.banner-ad ins {
  width: 100%;
  max-width: 750px;
}

/* --------------------------------------------------------------------------
   Preview Container
   -------------------------------------------------------------------------- */
.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: start;
  transition: opacity 0.4s ease;
}

.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;
}

.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;
  max-width: 320px;
  margin: 0 auto;
  overflow: hidden;
}

.preview-img {
  width: auto;
  max-width: 100%;
  max-height: 260px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.upscaled-overlay {
  position: absolute;
  inset: 0;
  background: rgba(38, 34, 98, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0;
}

.upscaled-overlay .material-icons-round {
  font-size: 2.2rem;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.dim-tag {
  background: #f4f7ff;
  color: #5a617f;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  margin: 0;
  text-align: center;
  letter-spacing: 0.03em;
}

/* VS divider */
.comparison-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 116px;
}

.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;
  letter-spacing: 0.08em;
  padding: 5px 8px;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Loading Spinner
   -------------------------------------------------------------------------- */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  text-align: center;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 5px solid rgba(38, 34, 98, 0.12);
  border-top-color: #27aae1;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner-text {
  font-weight: 700;
  color: #262262;
  font-size: 1rem;
  margin: 0;
}

.spinner-sub {
  color: #7a85a0;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
  min-height: 1.2em;
}

/* --------------------------------------------------------------------------
   Tier Info
   -------------------------------------------------------------------------- */
.upscale-tier-info {
  background: linear-gradient(135deg, #e8f4ff 0%, #f0e8ff 100%);
  border: 2px solid #27aae1;
  border-radius: 16px;
  padding: 1.4rem;
  margin: 1.6rem 0 0.8rem;
  text-align: center;
}

.tier-badge {
  display: inline-block;
  background: #27aae1;
  color: white;
  padding: 0.45rem 1.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}

.tier-message {
  color: #262262;
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Download Area
   -------------------------------------------------------------------------- */
.download-area {
  margin-top: 1.6rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-download {
  background: linear-gradient(135deg, #262262, #27aae1);
  color: white !important;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(38, 34, 98, 0.28);
}

.btn-download:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(39, 170, 225, 0.4);
}

.btn-secondary {
  background: #f0f4ff;
  color: #262262;
  padding: 14px 24px;
  border: 2px solid #d0d8ff;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #e0e7ff;
  border-color: #27aae1;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Features Section  — 8-cell grid (6 cards + 2 ads)
   -------------------------------------------------------------------------- */
.features-section {
  padding: 40px 0;
  background: white;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title-wrap h2 {
  font-size: 2.6rem;
  font-weight: 700;
  color: #262262;
  margin-bottom: 0.6rem;
}

.accent {
  color: #27aae1;
}

.section-sub {
  color: #5a617f;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* 4-column grid — repeating pattern */
.features-grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
}

.feature-card {
  background: #f9faff;
  border: 1px solid #e5edff;
  border-radius: 20px;
  padding: 2.2rem 1.6rem;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(38, 34, 98, 0.1);
  border-color: #27aae1;
}

.feature-icon-wrap {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #eef4ff, #dbeeff);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
}

.feature-icon-wrap .material-icons-round {
  font-size: 2rem;
  color: #27aae1;
}

.feature-card h3 {
  color: #262262;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.feature-card p {
  color: #5a617f;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* Ad slots inside features grid */
.feature-ad-slot {
  background: #f4f7ff;
  border: 1px dashed #c8d4f5;
  border-radius: 20px;
  width: 300px;
  height: 250px;
  max-height: 250px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.feature-ad-slot ins {
  width: 100%;
  height: 250px;
  min-height: 250px;
}

/* --------------------------------------------------------------------------
   How It Works Section
   -------------------------------------------------------------------------- */
.how-section {
  padding: 20px 0;
  background: linear-gradient(135deg, #f8f9ff 0%, #eef4ff 100%);
}

.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: 220px;
  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: 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 {
  color: #c0d4ff;
  font-size: 0;
}

.step-arrow .material-icons-round {
  font-size: 2rem;
  color: #c0d4ff;
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1440px) {
  .tool-with-sidebar {
    padding: 0 24px;
  }

  .upscaler-tool-box {
    max-width: 1500px;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

  .lead {
    max-width: 920px;
  }

  .features-grid-8,
  .step-card,
  .upscaler-layout {
    padding: 2rem;
  }
}

@media (max-width: 1280px) {
  .hero-text h1 {
    font-size: 2.9rem;
  }

  .lead {
    max-width: 820px;
  }

  .ad-row,
  .scale-row {
    grid-template-columns: minmax(220px, 260px) minmax(320px, 1fr) minmax(220px, 260px);
    gap: 1rem;
  }

  .ad-slot,
  .feature-ad-slot {
    max-width: 260px;
    min-height: 220px;
  }

  .preview {
    max-width: 100%;
  }
}

@media (max-width: 1024px) {
  .hero-text h1 {
    font-size: 2.6rem;
  }

  .lead {
    max-width: 760px;
    font-size: 1.18rem;
  }

  .tool-with-sidebar {
    margin: 30px auto;
  }

  .ad-row,
  .scale-row {
    grid-template-columns: minmax(180px, 220px) minmax(280px, 1fr) minmax(180px, 220px);
  }

  .ad-slot,
  .feature-ad-slot {
    max-width: 220px;
    min-height: 210px;
  }

  .image-comparison {
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 1100px) {
  .features-grid-8 {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-with-sidebar {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 992px) {
  .hero-text h1 { font-size: 2.4rem; }
  .lead { font-size: 1.15rem; max-width: 100%; }

  .ad-row,
  .scale-row {
    grid-template-columns: 1fr;
  }

  .ad-slot {
    display: none; /* hide side ads on narrow layouts */
  }

  .upscaler-layout { padding: 1.6rem; }

  .image-comparison {
    grid-template-columns: 1fr;
  }

  .comparison-divider {
    flex-direction: row;
    padding-top: 0;
    justify-content: center;
  }

  .divider-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, transparent, #d0d8ff, transparent);
  }
}

@media (max-width: 768px) {
  .hero-section { padding: 100px 0 60px; }
  .hero-text h1 { font-size: 2.2rem; }
  .lead { font-size: 1.12rem; }
  .upload-area  { padding: 4rem 1rem; }

  .upscaler-layout { padding: 1.2rem; }

  .scale-buttons,
  .mode-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid-8 {
    grid-template-columns: 1fr 1fr;
  }

  .steps-row {
    flex-direction: column;
  }

  .step-arrow { display: none; }

  .adsense-banner ins {
    width: 100% !important;
    height: auto !important;
  }

  .comparison-item { padding: 0.8rem; }
  .comparison-header { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.9rem; }
  .hero-section { padding: 80px 0 40px; }
  .lead { font-size: 1rem; }
  .upload-area { padding: 3rem 1rem; }
   .header .container {
    justify-content: space-between;
  }
    .logo {
    z-index: 1002;
  }

  .logo img {
    height: 44px;
    max-width: 160px;
  }

  .menu-toggle {
    z-index: 1003;
  }

  .features-grid-8 { grid-template-columns: 1fr; }
  .scale-buttons  { grid-template-columns: repeat(3, 1fr); }
  .mode-cards     { grid-template-columns: repeat(3, 1fr); }
  .download-area  { flex-direction: column; align-items: center; }
  .btn-download, .btn-secondary { width: 100%; justify-content: center; }

  .file-info-strip { flex-direction: column; align-items: stretch; text-align: left; }
  .step-card { max-width: 100%; width: 100%; }
  .ad-slot, .feature-ad-slot { max-width: 100%; min-height: 180px; }
}