/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
  overflow-x: hidden;
  min-height: 100vh;
}

.wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5em;
  line-height: 1.3;
  font-weight: 700;
  color: #2d3748;
}

p {
  margin-bottom: 1rem;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(to right, #0062cc, #007bff);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.9;
}

.navbar-brand i {
  margin-right: 10px;
}

.theme-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 8px;
}

.theme-toggle:hover {
  transform: rotate(30deg);
}

/* Marketing Section */
.marketing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 100px;
  text-align: left;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: white;
  padding: 30px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.marketing:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.marketing-text {
  flex: 1;
  max-width: 60%;
  padding-right: 40px;
}

.marketing-text h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #2d3748;
  margin-bottom: 15px;
}

.marketing-text p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #4a5568;
  line-height: 1.6;
}

.marketing-stats {
  flex: 1;
  max-width: 40%;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  width: 100%;
}

.stat {
  text-align: center;
  padding: 15px;
  margin: 5px;
  background: #f8f9fa;
  border-radius: 10px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  flex: 1;
  min-width: 100px;
}

.stat:hover {
  transform: translateY(-5px);
  background-color: #e9f5ff;
}

.number {
  font-size: 1.8rem;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 5px;
}

.label {
  color: #4a5568;
  font-weight: 500;
}

/* Main Content */
.main-content {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}

.upload-section, 
.map-section {
  flex: 1;
  min-width: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: white;
  padding: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-section:hover, 
.map-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

/* Upload Section */
.drop-zone {
  border: 2px dashed #007bff;
  padding: 30px 20px;
  cursor: pointer;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.drop-zone:hover {
  background: #e6f2ff;
  border-color: #0056b3;
}

.drop-zone i {
  font-size: 2rem;
  color: #007bff;
  margin-bottom: 10px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 20px;
  width: 100%;
}

.preview-grid img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #edf2f7;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preview-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Adjustments for different grid layouts */
.preview-grid.single img,
.preview-grid.two img {
  height: 180px;
  width: 100%;
}

.preview-grid.single {
  grid-template-columns: 1fr;
}

.preview-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

/* Map Section */
#map {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  margin-top: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.search-box {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-box input {
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 100%;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-box input:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.search-box button {
  padding: 12px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.search-box button:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.search-box button:active {
  transform: translateY(0);
}

/* Coordinates Section */
.coordinates {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.coordinate-input {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.coordinate-input label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #4a5568;
}

.coordinate-input input {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 100%;
  max-width: 120px;
  text-align: center;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.coordinate-input input:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

/* Action Buttons */
.action-buttons {
  text-align: center;
  margin-top: 20px;
}

.btn-primary {
  background: linear-gradient(to right, #0062cc, #007bff);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.25);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(to right, #0056b3, #0062cc);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.35);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.site-footer {
    background-color: #f8f9fa;
    padding: 3rem 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #007bff;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    width: 50px;
    height: 3px;
    background-color: #007bff;
}

.footer-section p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-section ul, .footer-section ol {
    padding-left: 1.2rem;
}

.footer-section li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Fixed copyright bar */
.copyright-bar {
    background-color: #343a40;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.copyright-bar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright-bar p {
    margin: 0;
    font-size: 0.9rem;
}

.visitor-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.visitor-counter i {
    color: #007bff;
}

.visitor-counter .count {
    font-weight: bold;
}

/* Dark theme support */
body.dark-theme .site-footer {
    background-color: #222;
    color: #e0e0e0;
}

body.dark-theme .footer-section h3 {
    color: #66b0ff;
}

body.dark-theme .footer-section h3::after {
    background-color: #66b0ff;
}

body.dark-theme .copyright-bar {
    background-color: #111;
}

/* Responsive Design - Mobile First */
@media (max-width: 1024px) {
  .marketing {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }
  
  .marketing-text, 
  .marketing-stats {
    max-width: 100%;
    padding-right: 0;
  }
  
  .marketing-text {
    margin-bottom: 20px;
  }
  
  .stats {
    justify-content: center;
  }
  .footer-content {
    grid-template-columns: 1fr;
}

.copyright-bar .container {
    justify-content: center;
    text-align: center;
}

.visitor-counter {
    margin-bottom: 0.5rem;
}
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }
  
  .upload-section, 
  .map-section {
    width: 100%;
  }
  
  .search-box {
    flex-direction: column;
  }
  
  .search-box input,
  .search-box button {
    width: 100%;
  }
  
  .coordinates {
    flex-direction: column;
  }
  
  .stat {
    min-width: 120px;
  }
  
  .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  .footer-content {
    grid-template-columns: 1fr;
}

.copyright-bar .container {
    justify-content: center;
    text-align: center;
}

.visitor-counter {
    margin-bottom: 0.5rem;
}
}

@media (max-width: 480px) {
  .navbar {
    padding: 10px 15px;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .marketing {
    margin-top: 80px;
    padding: 20px 15px;
  }
  
  .marketing-text h1 {
    font-size: 1.8rem;
  }
  
  .preview-grid.two {
    grid-template-columns: 1fr;
  }
  
  .drop-zone {
    padding: 20px 15px;
  }
  
  .coordinates {
    padding: 10px;
  }
  
  .coordinate-input {
    width: 100%;
  }
  
  .btn-primary {
    width: 100%;
  }
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}