@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Readex+Pro:wght@160..700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "DM Sans", "Readex Pro", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";
}

html {
  font-size: 16px; /* Set a base font size for predictable rem units */
}

body {
  background-color: #f0f8ff;
  color: #374151; /* Slightly softer than pure black for better readability */
  overflow-x: hidden;
  font-size: 1rem; /* 16px */
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin-bottom: 0.75em; font-weight: 700; color: #1f2937; }

header {
  /* position: absolute; */ /* Removing this to make it fixed on all pages by default */
  background-color: transparent;
  color: white;
  width: 100%;
  position: fixed;
  z-index: 100;
  top: 0;
  box-shadow: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background-color: #274375;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-toggle {
  display: inline-flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  z-index: 101;
}

.hamburger {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  position: relative;
  display: block;
  transition: all 0.3s;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger::before {
  top: -9px;
}
.hamburger::after {
  top: 9px;
}

.nav-toggle.active .hamburger {
  background: transparent;
}
.nav-toggle.active .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
  display: none;
  align-items: center;
  background: #274375;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: all 0.3s;
  list-style: none;
  padding: 10px 0;
}
.nav-links.open {
  display: flex;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
  .nav-links {
    display: flex !important;
    position: static;
    background: none;
    box-shadow: none;
    width: auto;
  }
}

nav {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  gap: 10px;
  width: 100%;
  justify-content: space-between;
}

nav .logo {
  font-size: 1.3em;
  font-weight: bold;
  color: white;
  text-decoration: none;
  margin-bottom: 5px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0;
}

nav ul li {
  margin: 0;
}

nav a {
  text-decoration: none;
  font-weight: 500;
  color: white;
  font-size: 0.9em;
  transition: all 0.3s ease;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  background-color: rgba(255, 255, 255, 0.1);
  letter-spacing: 0.5px;
}

.btn {
  background: #fff;
  color: #2980b9;
  padding: 0.4em 0.8em;
  border-radius: 20px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
  transition: all 0.3s ease;
  font-size: 0.85em;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
}

section {
  padding: 50px 15px;
  margin: 0;
}

#hero {
  background: url(../assets/PIA13474.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 15px 40px;
  text-align: center;
}

/* Add padding to first section on sub-pages to avoid header overlap */
.who-page .hero {
  padding-top: 120px;
}

.hero-content {
  width: 100%;
  max-width: 500px;
  text-align: center;
  z-index: 2;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem); /* Responsive font size */
  margin-bottom: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.hero-content h1 span {
  color: #9fb9e9;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom: 25px;
  line-height: 1.5;
  opacity: 0.95;
}

/* Search Input - Mobile Optimized */
.CTA {
  margin-bottom: 20px;
  width: 100%;
  max-width: 350px;
}

.input {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 25px;
  padding: 4px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  width: 100%;
  backdrop-filter: blur(10px);
}

.input input {
  border: none;
  outline: none;
  font-size: 1em;
  padding: 12px 8px;
  flex: 1;
  background: transparent;
  color: #333;
}

.input input::placeholder {
  color: #666;
}

.input span {
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease;
  padding: 4px;
  border-radius: 50%;
}

.input span:hover {
  background-color: rgba(41, 128, 185, 0.1);
}

.input span svg {
  width: 20px;
  height: 20px;
}

/* Search Results - Mobile Optimized */
#searchResults {
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #4a90e2;
  border-radius: 12px;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  margin-top: 5px;
}

.searchItem {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.95em;
  color: #333;
}

.searchItem:last-child {
  border-bottom: none;
}

.arrow {
  width: 20px;
  height: 20px;
}

.arrow path {
  fill: #fefefe;
}

/* Canvas/Globe - Mobile First */
.canvas {
  width: 100%;
  max-width: 280px;
  margin-top: 30px;
  text-align: center;
}

#globe-container {
  width: 100%;
  aspect-ratio: 1;
  max-width: 280px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

#globe-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50% !important;
}

.canvas p {
  font-size: 0.7em;
  margin: 15px 0;
  opacity: 0.8;
  line-height: 1.3;
}

/* About Section - Mobile First */
#about {
  background-color: #e6f0ff;
  text-align: center;
}

#about h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 20px;
  color: #274375;
}

#about p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 auto 20px;
  max-width: 100%;
}

.about-icons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.about-icons img {
  height: 45px;
  width: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
  padding: 4px;
}

.disclaimer {
  background: #fffbe6;
  color: #a67c00;
  border-left: 4px solid #ffe066;
  padding: 15px;
  margin-top: 20px;
  border-radius: 8px;
  font-size: 0.95em;
  text-align: left;
}

/* Hardware Section */
.hardware-section {
  padding: 60px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.hardware-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: white;
}

.hardware-section p {
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hardware-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.hardware-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hardware-details {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.hardware-details h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: white;
}

.hardware-details ul {
  list-style: none;
  padding: 0;
}

.hardware-details li {
  margin-bottom: 10px;
  font-size: 1rem;
}

.hardware-details strong {
  color: #ffd700;
}

/* Resources Section - Mobile First */
#resources h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 25px;
  color: #274375;
  text-align: center;
}

.resource-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.resource-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.resource-card:hover {
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.15);
  transform: translateY(-2px);
}

.resource-card img {
  height: 60px;
  width: auto;
  margin-bottom: 8px;
  object-fit: contain;
}

.resource-card span {
  font-weight: 500;
  color: #274375;
  font-size: 0.9em;
  line-height: 1.2;
}

/* Key Features - Mobile First */
#keyFeatures {
  text-align: center;
}

#keyFeatures h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 25px;
  color: #274375;
}

.features-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.feature-card {
  background: #f8fafc;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  padding: 20px;
  transition: all 0.3s ease;
  border: 1px solid #e3e8ee;
  text-align: left;
}

.feature-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  border-color: #b6c2d1;
  transform: translateY(-2px);
}

.feature-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.15em;
  color: #2a4365;
}

.feature-card p {
  margin: 0;
  color: #334155;
  font-size: 0.95em;
  line-height: 1.5;
}

/*services*/
.services-page {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: #f9f9f9;
  color: #333;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.services-header {
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
}

.services-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #1a1a1a;
  font-weight: 700;
  margin-bottom: 15px;
}

.services-header p {
  font-size: 1.25rem;
  color: #555;
  line-height: 1.6;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 1200px;
}

.service-card {
  background: #fff;
  border-radius: 15px;
  padding: 30px 25px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

.service-icon {
  font-size: 50px;
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #1a1a1a;
}

.service-description {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .services-header h1 {
    font-size: clamp(2rem, 6vw, 2.2rem);
  }
  .services-header p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .services-header h1 {
    font-size: 1.9rem;
  }
  .services-header p {
    font-size: 0.95rem;
  }
}

/* Modal - Mobile Optimized */
.modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 25px 20px;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 32px rgba(44, 62, 80, 0.18);
  max-height: 80vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.8em;
  color: #274375;
  cursor: pointer;
  line-height: 1;
  padding: 5px;
}

.close:hover {
  color: #1a2a4a;
}

/* Typewriter Animation */
.typewriter {
  display: inline-block;
  overflow: hidden;
  font-weight: bold;
  animation: typing 3s steps(30, end);
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* APP SPECIFIC STYLES */

/* Map Container - Mobile First */
#map {
  height: calc(100vh - 60px);
  width: 100%;
  top: 60px;
  left: 0;
}

/* Side Panel - Mobile First */
#side {
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 100%;
  max-width: 400px;
  z-index: 2;
  border-radius: 0;
  background: rgba(254, 254, 254, 0.98);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  top: 60px;
  left: 0;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  backdrop-filter: blur(10px);
}

#pollutionSection,
#tips {
  display: none;
  margin-top: 15px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background-color: rgba(249, 249, 249, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pollutant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 5px;
}

.pollutant-name {
  font-weight: bold;
  font-size: 0.9em;
  min-width: 60px;
}

.pollutant-bar {
  height: 16px;
  flex: 1;
  min-width: 80px;
  border-radius: 8px;
  position: relative;
  background-color: #e0e0e0;
  margin: 0 8px;
}

.pollutant-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease;
}

.value {
  font-size: 0.85em;
  font-weight: 500;
  min-width: 45px;
  text-align: right;
}

.info-mark {
  cursor: pointer;
  margin-left: 5px;
  color: #555;
  font-size: 0.9em;
}

.info-mark:hover {
  color: #222;
}

#tips ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-top: 10px;
}

#tips li {
  margin-bottom: 8px;
  line-height: 1.4;
  font-size: 0.9em;
}

#tips strong {
  color: #d9534f;
}

/* === Team Section === */
.team {
  padding: 4rem 8%;
  background: #f9f9f9;
  text-align: center;
}

.team h2 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  margin-bottom: 2rem;
  color: #0056b3;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.team-member {
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s, box-shadow 0.25s;
}

.team-member:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.team-member img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.team-member h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #0056b3;
}

.team-member p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 1rem;
}

/* === Social Icons === */
.icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.icons a {
  font-size: 1.2rem;
  transition: transform 0.25s, color 0.25s;
}

.icons a.whatsapp {
  color: #25d366;
}
.icons a.email {
  color: grey;
}

.icons a:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}

/* === Contact Section === */
.contact-section {
  padding: 50px 20px;
  background-color: #f0f4f8;
  font-family: Arial, sans-serif;
}

.contact-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  color: #333;
  margin-bottom: 40px;
}

/* Flex container for info + form */
.contact-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Contact Info */
.contact-info {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  background-color: #fff;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.contact-info-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 60px;
  margin-top: 10px;
  color: #222;
  text-align: center;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 58px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1rem;
}

.contact-icon {
  font-size: 1.8rem;
}

.contact-icon.phone {
  color: #0077cc;
}
.contact-icon.whatsapp {
  color: #25d366;
}
.contact-icon.email {
  color: grey;
}

.contact-text {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-text:hover {
  color: #0077cc;
}

/* Contact Form */
.contact-inputs {
  flex: 2;
  min-width: 300px;
  max-width: 600px;
  background-color: #fff;
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-input,
.message-input {
  padding: 14px 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-input:focus,
.message-input:focus {
  border-color: #0077cc;
  box-shadow: 0 0 8px rgba(0, 119, 204, 0.2);
}

.message-input {
  min-height: 120px;
  resize: none;
}

.max-length-span {
  text-align: right;
  font-size: 0.9rem;
  color: #555;
}

.contact-btn {
  padding: 14px;
  font-size: 1rem;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.contact-btn:hover {
  background-color: #005fa3;
}

/* Responsive */
@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .contact-title {
    font-size: 1.5rem;
  }
  .contact-icon {
    font-size: 1.2rem;
  }
  .contact-input,
  .message-input {
    font-size: 0.9rem;
  }
  .contact-btn {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
}

/* Footer - Mobile Optimized */
footer {
  background-color: #274375;
  color: white;
  text-align: center;
  padding: 20px 15px;
  font-size: 0.85em;
  line-height: 1.4;
}

footer a {
  color: #9fb9e9;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  color: white;
}

/* Utility Classes */
.txt {
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 0.9em;
  backdrop-filter: blur(10px);
}

.aqi-warning {
  background: #ffeaea;
  color: #d9534f;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  font-size: 0.9em;
  flex-wrap: wrap;
  gap: 8px;
}

.aqi-warning button {
  background: #d9534f;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85em;
}

.aqi-warning button:hover {
  background: #b52b27;
}

.forecast {
  margin-top: 12px;
  font-style: italic;
  color: #2980b9;
  font-size: 0.9em;
}

.extra-tooltip {
  margin-left: 5px;
  font-size: 0.8em;
  color: #888;
  cursor: pointer;
  border-bottom: 1px dotted #888;
}

.extra-tooltip:hover {
  color: #274375;
}

/* Enhanced typewriter effect */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: white;
  margin-left: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Floating particles background */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

/* Enhanced globe container with actual elements instead of pseudo-elements */
#globe-container {
  position: relative;
  overflow: visible;
}

.globe-ring {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: -1;
}

.globe-ring-1 {
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
}

.globe-ring-2 {
  top: -40px;
  left: -40px;
  right: -40px;
  bottom: -40px;
  border-width: 1px;
  opacity: 0.5;
}

/* Enhanced hover effects */
.resource-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.resource-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.resource-card:hover::before {
  left: 100%;
}

.feature-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.feature-card:hover::after {
  left: 100%;
}

/* Pulse animation for CTA button */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* TABLET STYLES - 768px and up */
@media (min-width: 768px) {
  nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
  }

  nav .logo {
    font-size: 1.4em;
    margin-bottom: 0;
  }

  nav ul {
    gap: 15px;
  }

  nav a {
    font-size: 1em;
    padding: 6px 12px;
  }

  .btn {
    padding: 0.5em 1em;
    font-size: 0.9em;
  }

  section {
    padding: 70px 40px;
  }

  #hero {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 100px 40px 60px;
    text-align: left;
    min-height: 100vh;
    background-attachment: fixed;
  }

  .hero-content {
    width: 60%;
    max-width: none;
    text-align: left;
  }

  .hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
  }

  .canvas {
    width: 35%;
    max-width: 350px;
    margin-top: 0;
  }

  #globe-container {
    max-width: 350px;
  }

  .canvas p {
    font-size: 0.75em;
    margin: 20px 0;
  }

  .CTA {
    max-width: 400px;
  }

  .input {
    width: 350px;
  }

  #searchResults {
    width: 350px;
  }

  .button {
    width: 180px;
    height: 45px;
  }
  #about p {
    font-size: 1.1em;
    max-width: 700px;
  }

  .about-icons {
    gap: 20px;
  }

  .about-icons img {
    height: 55px;
  }

  .resource-cards {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
  }

  .resource-card {
    padding: 18px 12px;
  }

  .resource-card img {
    height: 70px;
  }

  .resource-card span {
    font-size: 1em;
  }

  .features-cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
  }

  .feature-card {
    padding: 25px;
  }

  .feature-card h3 {
    font-size: 1.2em;
  }

  .feature-card p {
    font-size: 1em;
  }

  #side {
    width: 400px;
    top: 80px;
    padding: 30px;
    border-radius: 0 0 25px 0;
  }

  #map {
    height: calc(100vh - 80px);
    top: 80px;
  }

  footer {
    font-size: 0.9em;
    padding: 25px;
  }
}

/* DESKTOP STYLES - 1024px and up */
@media (min-width: 1024px) {
  nav {
    padding: 15px 50px;
  }

  nav .logo {
    font-size: 1.5em;
  }

  nav ul {
    gap: 20px;
  }

  nav a {
    font-size: 1.1em;
  }

  section {
    padding: 90px 60px;
  }

  #hero {
    padding: 120px 60px 80px;
  }

  #about p {
    font-size: 1.15em;
    max-width: 800px;
  }

  .about-icons img {
    height: 60px;
  }

  .resource-cards {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .features-cards {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  #side {
    padding: 40px;
  }
}

/* LARGE DESKTOP STYLES - 1200px and up */
@media (min-width: 1200px) {
  section {
    padding: 110px 100px;
  }

  #hero {
    padding: 140px 100px 100px;
  }

  .canvas {
    width: 30%;
  }

  .resource-cards {
    max-width: 800px;
  }

  .features-cards {
    max-width: 1000px;
  }
}

/* EXTRA LARGE DESKTOP STYLES - 1400px and up */
@media (min-width: 1400px) {
  section {
    padding: 130px 200px;
  }

  #hero {
    padding: 160px 200px 120px;
  }

  nav {
    padding: 20px 200px;
  }

  .resource-cards {
    max-width: 1000px;
  }

  .features-cards {
    max-width: 1200px;
  }
}

/* ACCESSIBILITY & PERFORMANCE */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .typewriter {
    animation: none;
    border-right: none;
  }
}

/* HIGH DPI DISPLAYS */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  #globe-container img,
  .about-icons img,
  .resource-card img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* PRINT STYLES */
@media print {
  header,
  footer,
  .button,
  .input,
  #searchResults {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  section {
    padding: 20px;
    break-inside: avoid;
  }

  #hero {
    background: none;
    color: black;
  }
}
