/* Global Styles with Mobile-First Approach */
:root {
  --primary-color: #4CAF50;
  --secondary-color: #45a049;
  --accent-color: #8BC34A;
  --dark-color: #333;
  --light-color: #f4f4f4;
  --text-color: #555;
  --white: #fff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --section-padding: 3rem 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Base Typography for Mobile */
h1 { font-size: 1.8rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
p { font-size: 1rem; margin-bottom: 1rem; }

.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap;
}

.btn.primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn.secondary {
  background-color: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

/* Header - Mobile First */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 0.5rem 0;
}

header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  text-align: center;
  margin-bottom: 0.5rem;
}

.logo h1 {
  color: var(--primary-color);
  margin-bottom: 0.2rem;
}

.logo p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  gap: 0.8rem;
}

nav ul li a {
  color: var(--dark-color);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
              url('https://images.unsplash.com/photo-1556911220-bff31c812dba');
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
  padding: 7rem 1rem 4rem;
  margin-top: 3.5rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

/* Services Section */
.services {
  background-color: var(--light-color);
  text-align: center;
  padding: var(--section-padding);
}

.services h2 {
  position: relative;
  margin-bottom: 2rem;
}

.services h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 0.8rem auto;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* About Section */
.about {
  padding: var(--section-padding);
}

.about .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Testimonials */
.testimonials {
  background-color: var(--light-color);
  padding: var(--section-padding);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.testimonial-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.rating {
  color: #FFD700;
  margin-bottom: 1rem;
}

.customer {
  font-weight: 600;
  margin-top: 1rem;
}

/* Contact Section */
.contact {
  padding: var(--section-padding);
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info p {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.contact-info i {
  margin-right: 0.8rem;
  color: var(--primary-color);
  font-size: 1.2rem;
  min-width: 1.5rem;
}

.business-hours {
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 120px;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: var(--white);
  padding: 2rem 1rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #bbb;
  font-size: 0.9rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  color: var(--white);
  font-size: 1.2rem;
}

.footer-bottom {
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid #444;
  font-size: 0.8rem;
}

/* Chatbot - Mobile Optimized */
.chatbot-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 999;
}

.chatbot-toggle {
  background-color: var(--primary-color);
  color: var(--white);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  font-size: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.chatbot-window {
  width: 95vw;
  max-width: 350px;
  height: 70vh;
  max-height: 500px;
  border-radius: 10px;
  display: none;
  flex-direction: column;
  position: fixed;
  bottom: 5rem;
  right: 1rem;
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  padding: 1rem;
}

.chatbot-messages {
  padding: 1rem;
  gap: 0.8rem;
}

.chatbot-message {
  max-width: 85%;
  padding: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chatbot-input {
  padding: 0.5rem;
}

.chatbot-input input {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

.chatbot-send {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
}

/* Tablet Devices (768px and up) */
@media (min-width: 768px) {
  html {
    font-size: 17px;
  }
  
  .container {
    max-width: 720px;
    padding: 0;
  }
  
  header .container {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.5rem 0;
  }
  
  .logo {
    text-align: left;
    margin-bottom: 0;
  }
  
  nav ul {
    gap: 1.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cta-buttons {
    flex-direction: row;
    justify-content: center;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small Desktops (992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  
  .hero h2 {
    font-size: 2.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .about .container {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }
  
  .about-content {
    flex: 1;
  }
  
  .about-image {
    flex: 1;
  }
  
  .contact-content {
    flex-direction: row;
    gap: 3rem;
  }
  
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large Desktops (1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .hero {
    padding: 9rem 0 5rem;
  }
  
  .hero h2 {
    font-size: 3rem;
  }
  
  .section {
    padding: 5rem 0;
  }
}

/* Special Cases for Very Small Mobile Devices */
@media (max-width: 360px) {
  nav ul {
    gap: 0.5rem;
  }
  
  nav ul li a {
    font-size: 0.8rem;
  }
  
  .hero {
    padding: 6rem 1rem 3rem;
  }
  
  .chatbot-window {
    width: 90vw;
    right: 0.5rem;
  }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 5rem 1rem;
  }
  
  .chatbot-window {
    height: 80vh;
    bottom: 1rem;
  }
}

/* High DPI Devices */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { 
  .hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                     url('https://images.unsplash.com/photo-1556911220-bff31c812dba?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
  }
}