/* =====================================================
   SkyView Aerial Photography — Main Stylesheet
   ===================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --sky-blue:    #1a8fe3;
  --sky-dark:    #0d5fa0;
  --sky-light:   #e8f4fd;
  --accent:      #f5a623;
  --text-dark:   #1c2833;
  --text-mid:    #4a5568;
  --text-light:  #718096;
  --white:       #ffffff;
  --border:      #d1d5db;
  --success:     #38a169;
  --danger:      #e53e3e;
  --radius:      8px;
  --shadow:      0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

/* ── Navigation ── */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 95, 160, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.nav-logo .drone-icon { font-size: 1.6rem; }

nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

nav ul li a {
  display: block;
  padding: 0.45rem 1rem;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

/* ── Hero ── */
#hero {
  background: linear-gradient(135deg, var(--sky-dark) 0%, var(--sky-blue) 60%, #56b4e9 100%);
  color: var(--white);
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; max-width: 750px; margin: 0 auto; }

#hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 580px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, color 0.2s;
  line-height: 1;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--text-dark);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #e09310;
  border-color: #e09310;
  box-shadow: 0 4px 16px rgba(245,166,35,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
  width: 100%;
  font-size: 1.05rem;
  padding: 0.85rem;
}

.btn-success:hover {
  background: #2f8a59;
  box-shadow: 0 4px 16px rgba(56,161,105,0.4);
}

.btn-success:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Sections ── */
section { padding: 4.5rem 1.5rem; }
section:nth-child(even) { background: var(--sky-light); }

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--sky-dark);
  margin-bottom: 0.6rem;
}

.section-header p {
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Services ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card .icon {
  font-size: 2.5rem;
  margin-bottom: 0.85rem;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sky-dark);
  margin-bottom: 0.4rem;
}

.service-card p { font-size: 0.88rem; color: var(--text-mid); }

/* ── Map Section ── */
#map-section { background: var(--white); }

.map-instructions {
  background: var(--sky-light);
  border-left: 4px solid var(--sky-blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  color: var(--text-mid);
}

.map-instructions strong { color: var(--sky-dark); }

#leaflet-map {
  width: 100%;
  height: 480px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
}

/* Map toolbar — custom buttons replaced by Leaflet.draw built-in controls */

#area-result {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--sky-light);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-mid);
  display: none;
}

#area-result.visible { display: block; }
#area-result strong { color: var(--sky-dark); }

/* ── Payment Section ── */
#payment {
  background: linear-gradient(160deg, #0d5fa0 0%, #1a8fe3 100%);
  color: var(--white);
}

#payment .section-header h2 { color: var(--white); }
#payment .section-header p  { color: rgba(255,255,255,0.82); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.pricing-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
}

.pricing-card:hover,
.pricing-card.selected {
  background: rgba(255,255,255,0.22);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.pricing-card.selected::after {
  content: '✓ Selected';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.pricing-card .price { font-size: 2rem; font-weight: 800; color: var(--accent); }
.pricing-card .price span { font-size: 0.95rem; font-weight: 400; color: rgba(255,255,255,0.75); }
.pricing-card ul { list-style: none; margin-top: 0.85rem; font-size: 0.87rem; opacity: 0.9; }
.pricing-card ul li { padding: 0.2rem 0; }
.pricing-card ul li::before { content: '✓  '; }

.payment-form {
  max-width: 540px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  color: var(--text-dark);
}

.payment-form h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sky-dark);
  margin-bottom: 1.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sky-blue);
  box-shadow: 0 0 0 3px rgba(26,143,227,0.15);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.card-icons {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.card-icon {
  background: var(--sky-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-mid);
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  justify-content: center;
}

/* ── Work Order Section ── */
#work-order { background: var(--sky-light); }

.work-order-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.work-order-form h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sky-dark);
  margin-bottom: 1.5rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.form-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sky-blue);
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

/* ── Toast / Modal ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: var(--text-dark);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  max-width: 360px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { border-left: 5px solid var(--success); }
.toast.error   { border-left: 5px solid var(--danger); }
.toast.info    { border-left: 5px solid var(--sky-blue); }

.toast-icon { font-size: 1.3rem; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; margin-bottom: 0.2rem; }
.toast-msg   { font-size: 0.85rem; opacity: 0.88; }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: pop-in 0.3s ease;
}

@keyframes pop-in {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal .check-circle {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.modal h2 {
  color: var(--sky-dark);
  margin-bottom: 0.6rem;
}

.modal p {
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.modal .ref-badge {
  display: inline-block;
  background: var(--sky-light);
  color: var(--sky-dark);
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

/* ── Footer ── */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.87rem;
}

footer a { color: var(--sky-blue); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  nav ul { gap: 0; }
  nav ul li a { padding: 0.4rem 0.65rem; font-size: 0.85rem; }
  .form-row { grid-template-columns: 1fr; }
  .toast { left: 1rem; right: 1rem; bottom: 1rem; max-width: unset; }
}
