/* ==========================================================================
   PHOTOREADY PDFNESTIFY-INSPIRED DESIGN SYSTEM & ICON LAYOUT
   Colors: Royal Blue #1463FF, Navy #0B1E59, Emerald #16C65B, Cyan #00D2FF
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #1463FF;
  --primary-glow: rgba(20, 99, 255, 0.35);
  --primary-gradient: linear-gradient(135deg, #1463FF 0%, #00D2FF 100%);
  --accent-gradient: linear-gradient(135deg, #16C65B 0%, #00E676 100%);
  --secondary: #0B1E59;
  --accent: #16C65B;
  --bg-main: #F4F7FC;
  --card-bg: #FFFFFF;
  --text-main: #0B1E59;
  --text-muted: #475569;
  --border-color: rgba(20, 99, 255, 0.12);
  --shadow-sm: 0 4px 14px rgba(11, 30, 89, 0.04);
  --shadow-md: 0 12px 36px rgba(11, 30, 89, 0.08);
  --shadow-lg: 0 24px 60px -12px rgba(11, 30, 89, 0.16);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-height: 84px;
}

[data-theme="dark"] {
  --bg-main: #050A18;
  --card-bg: #0C152B;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.03em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

/* HEADER (PDFnestify Inspired Blended Logo & Bar) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .site-header {
  background: rgba(12, 21, 43, 0.88);
}

.header-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO BLEND BADGE (PDFnestify Inspired) */
.logo-blend-box {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 244, 255, 0.9) 100%);
  border: 1px solid rgba(20, 99, 255, 0.18);
  box-shadow: 0 4px 16px rgba(11, 30, 89, 0.06);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .logo-blend-box {
  background: linear-gradient(135deg, rgba(12, 21, 43, 0.95) 0%, rgba(20, 32, 60, 0.9) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.logo-blend-box:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px var(--primary-glow);
  border-color: var(--primary);
}

.brand-logo-img {
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

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

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  opacity: 0.85;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  opacity: 1;
  background: rgba(20, 99, 255, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.btn-icon:hover {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-glow);
}

/* HERO SECTION */
.hero-section {
  padding: 80px 24px 60px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(20, 99, 255, 0.08);
  border: 1px solid rgba(20, 99, 255, 0.2);
  color: var(--primary);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.6rem;
  font-weight: 800;
  color: var(--secondary);
  max-width: 920px;
  margin: 0 auto 20px;
  line-height: 1.1;
}

[data-theme="dark"] .hero-title {
  color: #FFFFFF;
}

.hero-title span {
  background: linear-gradient(135deg, #1463FF 0%, #00D2FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFFFFF;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(20, 99, 255, 0.45);
  color: #FFF;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-main);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary:hover, .btn-secondary.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(20, 99, 255, 0.08);
}

/* CARDS & GRID */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 12px;
}

[data-theme="dark"] .section-title h2 {
  color: #FFFFFF;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.tool-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(20, 99, 255, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
  background: var(--primary-gradient);
  color: #FFFFFF;
}

.tool-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
  line-height: 1.5;
}

.tool-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* PRESET PILL BAR */
.preset-pills-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin-bottom: 24px;
}

.preset-pill {
  padding: 10px 18px;
  border-radius: 50px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.preset-pill:hover, .preset-pill.active {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-color: transparent;
}

/* STUDIO WORKSPACE */
.studio-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  margin-bottom: 40px;
}

.drop-zone {
  border: 2px dashed var(--primary);
  background: rgba(20, 99, 255, 0.04);
  border-radius: var(--radius-lg);
  padding: 70px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.drop-zone.has-file {
  display: none;
}

.drop-icon {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
}

@media (max-width: 992px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
}

.canvas-wrapper {
  background: #080E1E;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

canvas#previewCanvas {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
}

.editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-group {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
}

.control-group label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.range-slider {
  width: 100%;
  accent-color: var(--primary);
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
}

.bg-success { background: var(--accent-gradient); color: #FFF; }
.bg-warning { background: #FFB800; color: #000; }
.bg-primary { background: var(--primary-gradient); color: #FFF; }

.advanced-options-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.advanced-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
}

/* FLOATING TOAST NOTIFICATION */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
}

.toast-notification {
  background: var(--secondary);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
}

/* INSTANT SEARCH MODAL */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 10, 24, 0.75);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  padding-top: 90px;
}

.search-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.search-results {
  margin-top: 16px;
  overflow-y: auto;
  max-height: 400px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  transition: background 0.2s ease;
}

.search-item:hover {
  background: rgba(20, 99, 255, 0.08);
}

/* FOOTER (PDFnestify Inspired Icon Layout) */
.site-footer {
  background: #050A18;
  color: #FFFFFF;
  padding: 70px 0 32px;
  margin-top: 90px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 50px;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.footer-social-btn:hover {
  background: var(--primary-gradient);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #94A3B8;
}

.hidden {
  display: none !important;
}
