/* =========================================================
   ImageTools - Global Stylesheet
   ========================================================= */

/* =========================
   RESET
   ========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  background: #f8fafc;
  color: #172033;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  padding-left: 20px;
}


/* =========================
   VARIABLES
   ========================= */

:root {
  --primary: #635bff;
  --primary-dark: #5148e5;
  --secondary: #7c3aed;

  --dark: #111827;
  --text: #374151;
  --muted: #6b7280;

  --white: #ffffff;
  --light: #f8fafc;
  --border: #e5e7eb;

  --success: #16a34a;
  --danger: #dc2626;

  --shadow-sm:
    0 4px 15px rgba(15, 23, 42, 0.06);

  --shadow:
    0 15px 40px rgba(15, 23, 42, 0.08);

  --shadow-lg:
    0 25px 70px rgba(15, 23, 42, 0.12);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --container: 1180px;
}


/* =========================
   CONTAINER
   ========================= */

.container {
  width: min(
    calc(100% - 40px),
    var(--container)
  );

  margin-inline: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.95);

  border-bottom:
    1px solid rgba(229, 231, 235, 0.8);

  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.navbar {
  min-height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  position: relative;
}


/* =========================
   LOGO
   ========================= */

.logo {
  display: inline-flex;
  align-items: center;

  gap: 9px;

  font-size: 21px;
  font-weight: 800;

  color: var(--dark);

  white-space: nowrap;
}

.logo > span:last-child > span {
  color: var(--primary);
}

.logo-icon {
  width: 35px;
  height: 35px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  color: white;

  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--secondary)
    );

  box-shadow:
    0 8px 20px rgba(99, 91, 255, 0.25);

  font-size: 19px;
}


/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

.nav-menu {
  display: flex;
  align-items: center;

  gap: 28px;
}

.nav-menu a {
  position: relative;

  color: #4b5563;

  font-size: 14px;
  font-weight: 600;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-menu a.active {
  color: var(--primary);
}

.nav-menu a::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;

  bottom: -9px;

  height: 2px;

  border-radius: 10px;

  background: var(--primary);

  transform: scaleX(0);

  transform-origin: center;

  transition:
    transform 0.2s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  transform: scaleX(1);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-button,
.secondary-button,
.nav-button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 9px;

  min-height: 48px;

  padding: 0 21px;

  border-radius: 11px;

  font-size: 14px;
  font-weight: 700;

  border: 0;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.primary-button {
  color: white;

  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--secondary)
    );

  box-shadow:
    0 10px 25px rgba(99, 91, 255, 0.22);
}

.primary-button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 15px 30px rgba(99, 91, 255, 0.3);
}

.secondary-button {
  color: var(--dark);

  background: white;

  border: 1px solid var(--border);
}

.secondary-button:hover {
  border-color: #c7c9d9;

  transform: translateY(-2px);

  box-shadow: var(--shadow-sm);
}

.nav-button {
  min-height: 42px;

  padding-inline: 17px;

  color: white;

  background: var(--dark);
}

.nav-button:hover {
  transform: translateY(-2px);

  background: #1f2937;
}


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.mobile-menu-btn {
  display: none;

  width: 44px;
  height: 44px;

  padding: 0;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: white;

  align-items: center;
  justify-content: center;

  flex-direction: column;

  gap: 5px;

  z-index: 1100;
}

.mobile-menu-btn span {
  display: block;

  width: 21px;
  height: 2px;

  border-radius: 5px;

  background: var(--dark);

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}


/* Hamburger -> X */

.mobile-menu-btn.active span:nth-child(1) {
  transform:
    translateY(7px)
    rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform:
    translateY(-7px)
    rotate(-45deg);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;

  min-height: 640px;

  display: flex;
  align-items: center;

  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      #f8faff 0%,
      #ffffff 100%
    );
}

.hero-background {
  position: absolute;

  width: 620px;
  height: 620px;

  top: -250px;
  right: -170px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(99, 91, 255, 0.15),
      rgba(124, 58, 237, 0.03) 60%,
      transparent 72%
    );

  pointer-events: none;
}

.hero-content {
  position: relative;

  z-index: 1;

  max-width: 900px;

  text-align: center;

  margin-inline: auto;
}

.hero-badge {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  padding: 8px 15px;

  margin-bottom: 24px;

  border: 1px solid #dddffb;

  border-radius: 100px;

  background: #f5f4ff;

  color: var(--primary);

  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  max-width: 850px;

  margin-inline: auto;

  color: var(--dark);

  font-size:
    clamp(42px, 6vw, 72px);

  line-height: 1.05;

  letter-spacing: -2.5px;

  font-weight: 850;
}

.hero h1 span {
  display: block;

  color: var(--primary);
}

.hero-description {
  max-width: 690px;

  margin: 25px auto 0;

  color: var(--muted);

  font-size: 17px;
}

.hero-buttons {
  display: flex;

  align-items: center;
  justify-content: center;

  flex-wrap: wrap;

  gap: 13px;

  margin-top: 32px;
}

.hero-features {
  display: flex;

  align-items: center;
  justify-content: center;

  flex-wrap: wrap;

  gap: 24px;

  margin-top: 30px;
}

.hero-feature {
  display: flex;

  align-items: center;

  gap: 7px;

  color: #596273;

  font-size: 13px;
  font-weight: 600;
}

.hero-feature span {
  width: 19px;
  height: 19px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: white;

  background: var(--success);

  font-size: 11px;
}


/* =========================================================
   SECTION COMMON
   ========================================================= */

.tools-section,
.features-section,
.how-section,
.faq-section {
  padding: 100px 0;
}

.section-heading {
  max-width: 720px;

  margin: 0 auto 52px;

  text-align: center;
}

.section-label {
  margin-bottom: 11px;

  color: var(--primary);

  font-size: 12px;
  font-weight: 800;

  letter-spacing: 1.7px;
}

.section-heading h2 {
  color: var(--dark);

  font-size:
    clamp(30px, 4vw, 45px);

  line-height: 1.15;

  letter-spacing: -1.2px;
}

.section-heading h2 span {
  color: var(--primary);
}

.section-heading p {
  margin-top: 14px;

  color: var(--muted);

  font-size: 15px;
}


/* =========================================================
   TOOLS
   ========================================================= */

.tools-section {
  background: white;
}

.tools-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 20px;
}

.tool-card {
  position: relative;

  display: block;

  padding: 27px;

  min-height: 190px;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  background: white;

  box-shadow: var(--shadow-sm);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;

  text-decoration: none;

  color: inherit;

  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-6px);

  border-color: #d8d6ff;

  box-shadow: var(--shadow);
}

.tool-icon {
  width: 54px;
  height: 54px;

  display: flex;

  align-items: center;
  justify-content: center;

  margin-bottom: 18px;

  border-radius: 15px;

  background: #f1f0ff;

  font-size: 25px;
}

.compressor-icon {
  background: #f1f0ff;
}

.resizer-icon {
  background: #eff6ff;
}

.cropper-icon {
  background: #f0fdf4;
}

.converter-icon {
  background: #fff7ed;
}

.jpg-icon {
  background: #fefce8;
}

.optimizer-icon {
  background: #ecfeff;
}

.bg-remover-icon {
  background: #fdf2f8;
}

.tool-content {
  flex: 1;
}

.tool-content h3 {
  margin-bottom: 7px;

  color: var(--dark);

  font-size: 18px;
}

.tool-content p {
  color: var(--muted);

  font-size: 13px;

  line-height: 1.6;
}

.tool-link {
  display: inline-block;

  margin-top: 15px;

  color: var(--primary);

  font-size: 13px;
  font-weight: 800;
}


/* =========================================================
   FEATURES
   ========================================================= */

.features-section {
  background: #f8fafc;
}

.features-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 20px;
}

.feature-card {
  padding: 29px 24px;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  background: white;

  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 48px;
  height: 48px;

  display: flex;

  align-items: center;
  justify-content: center;

  margin-bottom: 19px;

  border-radius: 13px;

  background: #f1f0ff;

  color: var(--primary);

  font-size: 20px;
  font-weight: 800;
}

.feature-card h3 {
  margin-bottom: 8px;

  color: var(--dark);

  font-size: 17px;
}

.feature-card p {
  color: var(--muted);

  font-size: 13px;
}


/* =========================================================
   HOW IT WORKS
   ========================================================= */

.how-section {
  background: white;
}

.steps {
  max-width: 850px;

  margin: 0 auto;

  display: grid;

  gap: 18px;
}

.step {
  display: flex;

  align-items: center;

  gap: 22px;

  padding: 23px;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  background: white;

  box-shadow: var(--shadow-sm);
}

.step-number {
  flex: 0 0 65px;

  width: 65px;
  height: 65px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 16px;

  color: var(--primary);

  background: #f1f0ff;

  font-size: 16px;
  font-weight: 900;
}

.step h3 {
  margin-bottom: 4px;

  color: var(--dark);

  font-size: 18px;
}

.step p {
  color: var(--muted);

  font-size: 13px;
}


/* =========================================================
   CTA
   ========================================================= */

.cta-section {
  padding: 80px 0;

  background: #f8fafc;
}

.cta-box {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 30px;

  padding: 48px;

  border-radius: 25px;

  color: white;

  background:
    linear-gradient(
      135deg,
      #19172d,
      #302b63
    );

  box-shadow: var(--shadow-lg);
}

.cta-box .section-label {
  color: #bcb8ff;
}

.cta-box h2 {
  max-width: 650px;

  font-size:
    clamp(28px, 4vw, 43px);

  line-height: 1.15;

  letter-spacing: -1px;
}

.cta-box h2 span {
  color: #a8a2ff;
}

.cta-box p {
  margin-top: 12px;

  color: #c8c7d7;

  font-size: 14px;
}


/* =========================================================
   FAQ
   ========================================================= */

.faq-section {
  background: white;
}

.faq-list {
  max-width: 850px;

  margin: 0 auto;

  display: grid;

  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);

  border-radius: 13px;

  background: white;

  overflow: hidden;

  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  list-style: none;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 20px 22px;

  cursor: pointer;

  color: var(--dark);

  font-size: 15px;

  font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary span {
  color: var(--primary);

  font-size: 22px;

  transition:
    transform 0.2s ease;
}

.faq-item[open] summary span {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 22px 20px;

  color: var(--muted);

  font-size: 14px;
}


/* =========================================================
   TOOL PAGE
   ========================================================= */

.tool-page {
  padding: 75px 0 90px;

  min-height: 700px;

  background:
    linear-gradient(
      180deg,
      #f8faff 0%,
      #ffffff 100%
    );
}

.tool-page-header {
  max-width: 760px;

  margin: 0 auto 40px;

  text-align: center;
}

.tool-page-icon {
  width: 70px;
  height: 70px;

  display: flex;

  align-items: center;
  justify-content: center;

  margin: 0 auto 20px;

  border-radius: 20px;

  background: #f1f0ff;

  font-size: 31px;

  box-shadow:
    0 10px 30px rgba(99, 91, 255, 0.12);
}

.tool-page-header h1 {
  color: var(--dark);

  font-size:
    clamp(34px, 5vw, 52px);

  line-height: 1.1;

  letter-spacing: -1.5px;
}

.tool-page-header p {
  max-width: 650px;

  margin: 15px auto 0;

  color: var(--muted);

  font-size: 16px;
}


/* =========================================================
   TOOL BOX
   ========================================================= */

.tool-box {
  width: min(100%, 850px);

  margin: 0 auto;

  padding: 30px;

  border: 1px solid var(--border);

  border-radius: 24px;

  background: white;

  box-shadow: var(--shadow-lg);
}


/* =========================================================
   UPLOAD AREA
   ========================================================= */

.upload-area {
  position: relative;

  padding: 55px 30px;

  text-align: center;

  border: 2px dashed #d6d8e7;

  border-radius: 18px;

  background: #fafaff;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--primary);

  background: #f5f4ff;

  transform: translateY(-2px);
}

.upload-icon {
  width: 62px;
  height: 62px;

  display: flex;

  align-items: center;
  justify-content: center;

  margin: 0 auto 18px;

  border-radius: 17px;

  background: #eeecff;

  color: var(--primary);

  font-size: 31px;

  font-weight: 800;
}

.upload-area h2 {
  margin-bottom: 7px;

  color: var(--dark);

  font-size: 22px;
}

.upload-area p {
  margin-bottom: 22px;

  color: var(--muted);

  font-size: 14px;
}

.upload-area small {
  display: block;

  margin-top: 15px;

  color: #8a91a1;

  font-size: 12px;
}


/* =========================================================
   PREVIEW
   ========================================================= */

.preview-section {
  margin-top: 30px;

  padding: 25px;

  border: 1px solid var(--border);

  border-radius: 17px;

  background: #fafafa;
}

.preview-section h2 {
  margin-bottom: 18px;

  color: var(--dark);

  font-size: 19px;
}

.image-preview {
  min-height: 240px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 15px;

  border-radius: 14px;

  background:
    repeating-conic-gradient(
      #f1f1f1 0 25%,
      #ffffff 0 50%
    )
    50% /
    20px 20px;
}

.image-preview img {
  max-height: 450px;

  border-radius: 10px;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   COMPRESSION SETTINGS
   ========================================================= */

.compression-settings {
  margin-top: 25px;

  padding: 25px;

  border: 1px solid var(--border);

  border-radius: 17px;

  background: white;
}

.compression-settings h2 {
  margin-bottom: 22px;

  color: var(--dark);

  font-size: 19px;
}

.quality-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-bottom: 10px;
}

.quality-header label {
  color: var(--dark);

  font-size: 14px;

  font-weight: 700;
}

.quality-header span {
  min-width: 48px;

  padding: 4px 9px;

  border-radius: 7px;

  text-align: center;

  color: var(--primary);

  background: #f1f0ff;

  font-size: 12px;

  font-weight: 800;
}

#quality {
  width: 100%;

  height: 7px;

  appearance: none;

  -webkit-appearance: none;

  border-radius: 10px;

  outline: none;

  background: #e7e8ef;
}

#quality::-webkit-slider-thumb {
  appearance: none;

  -webkit-appearance: none;

  width: 20px;
  height: 20px;

  border: 3px solid white;

  border-radius: 50%;

  background: var(--primary);

  box-shadow:
    0 2px 8px rgba(99, 91, 255, 0.35);

  cursor: pointer;
}

#quality::-moz-range-thumb {
  width: 20px;
  height: 20px;

  border: 3px solid white;

  border-radius: 50%;

  background: var(--primary);

  box-shadow:
    0 2px 8px rgba(99, 91, 255, 0.35);

  cursor: pointer;
}


/* =========================================================
   TOOL ACTIONS
   ========================================================= */

.tool-actions {
  display: flex;

  align-items: center;

  flex-wrap: wrap;

  gap: 12px;

  margin-top: 25px;
}

.tool-actions .primary-button,
.tool-actions .secondary-button {
  border: 0;
}


/* =========================================================
   DISABLED BUTTON
   ========================================================= */

button:disabled,
.primary-button:disabled {
  opacity: 0.6;

  cursor: not-allowed;

  transform: none;

  box-shadow: none;
}


/* =========================================================
   RESULT
   ========================================================= */

.result-section {
  margin-top: 30px;

  padding: 30px;

  text-align: center;

  border: 1px solid #d9f2df;

  border-radius: 18px;

  background: #f7fff9;
}

.result-badge {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 6px 11px;

  margin-bottom: 10px;

  border-radius: 100px;

  color: var(--success);

  background: #e8f9ed;

  font-size: 11px;

  font-weight: 900;

  letter-spacing: 1px;
}

.result-section h2 {
  margin-bottom: 22px;

  color: var(--dark);

  font-size: 23px;
}

.result-stats {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 13px;

  margin-bottom: 25px;
}

.result-stat {
  padding: 17px;

  border: 1px solid var(--border);

  border-radius: 12px;

  background: white;
}

.result-stat span {
  display: block;

  margin-bottom: 4px;

  color: var(--muted);

  font-size: 12px;
}

.result-stat strong {
  color: var(--dark);

  font-size: 18px;
}

.download-button {
  display: inline-flex;
}


/* =========================================================
   TOOL INFO
   ========================================================= */

.tool-info-section {
  padding: 90px 0;

  background: white;
}

.tool-info-section .section-heading {
  margin-bottom: 40px;
}


/* =========================================================
   CONTENT SECTION
   ========================================================= */

.content-section {
  padding: 80px 0;

  background: #f8fafc;
}

.content-section .container {
  max-width: 850px;
}

.content-section h2 {
  margin-bottom: 12px;
  margin-top: 35px;

  color: var(--dark);

  font-size: 26px;

  line-height: 1.25;
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section p {
  margin-bottom: 15px;

  color: var(--muted);

  font-size: 15px;
}

.content-section ol,
.content-section ul {
  margin: 10px 0 20px;

  color: var(--muted);

  font-size: 15px;
}

.content-section li {
  margin-bottom: 8px;
}


/* =========================================================
   OTHER TOOL PAGE COMPONENTS
   ========================================================= */

.tool-control-group {
  margin-bottom: 20px;
}

.tool-control-group label {
  display: block;

  margin-bottom: 8px;

  color: var(--dark);

  font-size: 14px;

  font-weight: 700;
}

.tool-control-group input,
.tool-control-group select,
.tool-control-group textarea {
  width: 100%;

  min-height: 46px;

  padding: 10px 13px;

  border: 1px solid var(--border);

  border-radius: 10px;

  outline: none;

  background: white;

  color: var(--dark);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tool-control-group input:focus,
.tool-control-group select:focus,
.tool-control-group textarea:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(99, 91, 255, 0.1);
}


/* Width / height */

.dimension-controls {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 15px;
}


/* Canvas */

.canvas-container {
  width: 100%;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 20px;

  overflow: auto;

  border: 1px solid var(--border);

  border-radius: 15px;

  background: #f8fafc;
}

.canvas-container canvas {
  max-width: 100%;

  height: auto;
}


/* Messages */

.tool-message {
  margin-top: 15px;

  padding: 12px 15px;

  border-radius: 10px;

  font-size: 13px;
}

.tool-message.success {
  color: #166534;

  background: #dcfce7;
}

.tool-message.error {
  color: #991b1b;

  background: #fee2e2;
}


/* Hidden */

[hidden] {
  display: none !important;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  padding: 70px 0 25px;

  background: #111827;

  color: white;
}

.footer-grid {
  display: grid;

  grid-template-columns:
    1.5fr
    1fr
    1fr
    1fr;

  gap: 45px;
}

.footer .logo {
  color: white;
}

.footer-brand p {
  max-width: 310px;

  margin-top: 16px;

  color: #9ca3af;

  font-size: 13px;
}

.footer-column {
  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 10px;
}

.footer-column h3 {
  margin-bottom: 7px;

  color: white;

  font-size: 14px;
}

.footer-column a {
  color: #9ca3af;

  font-size: 13px;

  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: white;
}

.footer-links {
  display: flex;

  flex-direction: column;

  gap: 7px;
}

.footer-bottom {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-top: 55px;

  padding-top: 22px;

  border-top: 1px solid #293241;

  color: #8b95a5;

  font-size: 12px;
}


/* =========================================================
   INFO / ABOUT PAGE
   ========================================================= */

.info-page {
  padding: 80px 0;

  background: #f8fafc;
}

.info-container {
  max-width: 900px;

  margin-inline: auto;

  padding: 40px;

  border: 1px solid var(--border);

  border-radius: 20px;

  background: white;

  box-shadow: var(--shadow);
}

.info-container h1 {
  margin-bottom: 25px;

  color: var(--dark);

  font-size: 42px;

  line-height: 1.15;
}

.info-container h2 {
  margin-top: 35px;

  margin-bottom: 10px;

  color: var(--dark);

  font-size: 25px;
}

.info-container p {
  margin-bottom: 14px;

  color: var(--muted);

  font-size: 15px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

  .nav-menu {
    gap: 18px;
  }

  .tools-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .features-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

  .container {
    width: min(
      calc(100% - 28px),
      var(--container)
    );
  }


  /* =========================
     HEADER
     ========================= */

  .navbar {
    min-height: 68px;
  }

  .nav-button {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }


  /* =========================
     MOBILE NAVIGATION
     ========================= */

  .nav-menu {
    position: absolute;

    top: calc(100% + 8px);

    left: 0;
    right: 0;

    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: stretch;

    gap: 0;

    padding: 10px;

    border: 1px solid var(--border);

    border-radius: 15px;

    background: rgba(255, 255, 255, 0.98);

    box-shadow:
      0 20px 45px rgba(15, 23, 42, 0.14);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    opacity: 0;

    visibility: hidden;

    transform:
      translateY(-10px)
      scale(0.98);

    pointer-events: none;

    transition:
      opacity 0.22s ease,
      visibility 0.22s ease,
      transform 0.22s ease;
  }

  .nav-menu.mobile-open {
    opacity: 1;

    visibility: visible;

    transform:
      translateY(0)
      scale(1);

    pointer-events: auto;
  }

  .nav-menu a {
    display: flex;

    align-items: center;

    min-height: 48px;

    padding: 0 15px;

    border-radius: 10px;

    font-size: 15px;
  }

  .nav-menu a:hover {
    background: #f5f4ff;
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-menu a.active {
    background: #f5f4ff;

    color: var(--primary);
  }


  /* =========================
     HERO
     ========================= */

  .hero {
    min-height: 600px;

    padding: 70px 0;
  }

  .hero h1 {
    font-size: 43px;

    letter-spacing: -1.7px;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .primary-button,
  .hero-buttons .secondary-button {
    width: 100%;
  }

  .hero-features {
    gap: 12px 18px;
  }


  /* =========================
     SECTIONS
     ========================= */

  .tools-section,
  .features-section,
  .how-section,
  .faq-section {
    padding: 70px 0;
  }

  .section-heading {
    margin-bottom: 35px;
  }


  /* =========================
     TOOLS
     ========================= */

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: auto;

    padding: 22px;
  }


  /* =========================
     FEATURES
     ========================= */

  .features-grid {
    grid-template-columns: 1fr;
  }


  /* =========================
     STEPS
     ========================= */

  .step {
    align-items: flex-start;

    padding: 19px;
  }

  .step-number {
    flex-basis: 52px;

    width: 52px;
    height: 52px;
  }


  /* =========================
     CTA
     ========================= */

  .cta-section {
    padding: 60px 0;
  }

  .cta-box {
    flex-direction: column;

    align-items: flex-start;

    padding: 30px;
  }

  .cta-box .primary-button {
    width: 100%;
  }


  /* =========================
     TOOL PAGE
     ========================= */

  .tool-page {
    padding: 55px 0 70px;
  }

  .tool-box {
    padding: 17px;

    border-radius: 18px;
  }

  .upload-area {
    padding: 40px 18px;
  }

  .upload-area h2 {
    font-size: 20px;
  }

  .compression-settings,
  .preview-section,
  .result-section {
    padding: 20px;
  }

  .tool-actions {
    flex-direction: column;
  }

  .tool-actions .primary-button,
  .tool-actions .secondary-button {
    width: 100%;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .download-button {
    width: 100%;
  }

  .dimension-controls {
    grid-template-columns: 1fr;
  }


  /* =========================
     CONTENT
     ========================= */

  .content-section {
    padding: 60px 0;
  }


  /* =========================
     FOOTER
     ========================= */

  .footer {
    padding-top: 55px;
  }

  .footer-grid {
    grid-template-columns: 1fr;

    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;

    align-items: flex-start;

    margin-top: 40px;
  }


  /* =========================
     INFO
     ========================= */

  .info-container {
    padding: 25px;
  }

  .info-container h1 {
    font-size: 34px;
  }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

  .logo {
    font-size: 19px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .mobile-menu-btn {
    width: 42px;
    height: 42px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-badge {
    font-size: 11px;
  }

  .tool-card {
    gap: 13px;
  }

  .tool-icon {
    width: 46px;
    height: 46px;

    font-size: 21px;
  }

  .tool-content h3 {
    font-size: 16px;
  }

  .tool-content p {
    font-size: 12px;
  }

}
@media (max-width: 760px) {

  .nav-menu.mobile-open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 14px;
    right: 14px;

    flex-direction: column;
    align-items: stretch;

    gap: 0;

    padding: 10px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 16px;

    box-shadow: var(--shadow-lg);

    z-index: 9999;
  }

  .nav-menu.mobile-open a {
    display: flex;
    align-items: center;

    min-height: 48px;

    padding: 0 14px;

    border-radius: 10px;

    color: #374151;
  }

  .nav-menu.mobile-open a:hover {
    color: var(--primary);
    background: #f5f4ff;
  }

  .nav-menu.mobile-open a.active {
    color: var(--primary);
    background: #f5f4ff;
  }

  .nav-menu.mobile-open a.active::after,
  .nav-menu.mobile-open a:hover::after {
    display: none;
  }

}
/* =========================================================
   MOBILE NAVIGATION - FIX
   ========================================================= */

.mobile-nav {
  display: none;
}

@media (max-width: 760px) {

  .navbar {
    position: relative;
  }

  .mobile-menu-btn {
    position: relative;
    z-index: 1101;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: white;
    color: var(--dark);

    font-size: 21px;
    line-height: 1;

    transition:
      background 0.2s ease,
      color 0.2s ease,
      transform 0.2s ease;
  }

  .mobile-menu-btn:hover {
    transform: translateY(-1px);
  }

  .mobile-menu-btn.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
  }

  /* Mobile dropdown */

  .mobile-nav {
    position: absolute;

    top: calc(100% + 8px);
    left: 0;
    right: 0;

    display: flex;
    flex-direction: column;

    padding: 10px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.98);

    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-10px);

    transition:
      opacity 0.2s ease,
      visibility 0.2s ease,
      transform 0.2s ease;

    z-index: 1100;
  }

  .mobile-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-nav a {
    display: flex;
    align-items: center;

    min-height: 46px;

    padding: 0 14px;

    border-radius: 10px;

    color: #4b5563;

    font-size: 14px;
    font-weight: 700;

    transition:
      background 0.2s ease,
      color 0.2s ease;
  }

  .mobile-nav a:hover {
    color: var(--primary);
    background: #f5f4ff;
  }

  .mobile-nav a.active {
    color: var(--primary);
    background: #f5f4ff;
  }

  /* Remove desktop underline from mobile menu */

  .mobile-nav a::after {
    display: none !important;
  }

  /* Explore button */

  .mobile-nav .mobile-explore {
    justify-content: center;

    margin-top: 7px;

    color: white;
    background: var(--dark);
  }

  .mobile-nav .mobile-explore:hover {
    color: white;
    background: #1f2937;
  }
}
/* =========================================================
   NAVIGATION
   ========================================================= */

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu a {
  position: relative;

  color: #4b5563;

  font-size: 14px;
  font-weight: 600;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-menu a::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: -9px;

  height: 2px;

  border-radius: 10px;

  background: var(--primary);

  transform: scaleX(0);
  transform-origin: center;

  transition: transform 0.2s ease;
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-menu a:hover::after {
  transform: scaleX(1);
}

.nav-menu a.active {
  color: var(--primary);
}

.nav-menu a.active::after {
  transform: scaleX(1);
}

/* =========================================
   MOBILE NAVIGATION
========================================= */

.mobile-menu-btn {
    display: none;
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
}


@media (max-width: 768px) {

    .navbar {
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
        color: inherit;
        z-index: 1001;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 15px;
        gap: 5px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.12);
        z-index: 1000;
    }

    .nav-menu.mobile-open {
        display: flex;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 14px 16px;
    }

    .nav-button {
        display: none;
    }

}


/* =========================================
   UPLOAD AREA
========================================= */

.upload-area {
    cursor: pointer;
}

.upload-area.drag-over {
    transform: scale(1.01);
    border-style: solid;
}

.preview-section[hidden],
.compression-settings[hidden],
.result-section[hidden] {
    display: none !important;
}


/* =========================================
   PREVIEW IMAGE
========================================= */

.image-preview {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.image-preview img {
    display: block;
    max-width: 100%;
    max-height: 450px;
    width: auto;
    height: auto;
    object-fit: contain;
}


/* =========================================
   BUTTON
========================================= */

.primary-button,
.secondary-button {
    cursor: pointer;
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* =========================================
   MOBILE NAV - FINAL FIX
========================================= */

@media screen and (max-width: 768px) {

  .header .navbar {
    position: relative !important;
  }

  .header .nav-menu {
    display: none !important;

    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;

    flex-direction: column !important;
    align-items: stretch !important;

    padding: 12px !important;
    margin: 0 !important;

    background: #ffffff !important;

    border-radius: 0 0 16px 16px !important;

    box-shadow: 0 10px 30px rgba(0,0,0,.15) !important;

    z-index: 9999 !important;
  }

  /* MENU OPEN */

  .header .nav-menu.mobile-open {
    display: flex !important;
  }

  /* NAV LINKS */

  .header .nav-menu a {
    display: block !important;
    width: 100% !important;

    padding: 14px 16px !important;

    color: #111827 !important;

    text-decoration: none !important;

    border-radius: 8px !important;
  }

  .header .nav-menu a:hover {
    background: #f3f4f6 !important;
  }

  /* HAMBURGER */

  .header .mobile-menu-btn {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 44px !important;
    height: 44px !important;

    margin-left: auto !important;

    padding: 0 !important;

    border: 0 !important;
    background: transparent !important;

    font-size: 28px !important;

    cursor: pointer !important;

    z-index: 10000 !important;
  }

  /* HIDE EXPLORE BUTTON */

  .header .nav-button {
    display: none !important;
  }
}

