:root {
  --primary-color: #003366;
  --secondary-color: #0066cc;
  --accent-color: #ff9900;
  --text-color: #333;
  --light-bg: #f5f5f5;
}

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

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

/* Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3%;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.navbar .button-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--secondary-color);
}

/* Button Styles */
.cta-button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #e68a00;
}

.cta-button-large {
  padding: 1rem 2rem;
  font-size: 1.2rem;
}

/* Complaints Button Styles */
.complaint-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
  margin-left: 1rem;
}

.complaint-button:hover {
  background-color: #c82333;
}

/* Hero Section */
#inicio {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

#inicio::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1;
}

#inicio.image-background {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#inicio video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

/* Services Section */
.services {
  padding: 5rem 5%;
  background-color: var(--light-bg);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card i {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials {
  padding: 5rem 5%;
  background: var(--light-bg);
  text-align: center;
}

.testimonial-slider {
  margin: 2rem auto;
  max-width: 800px;
  padding: 2rem;
}

.testimonial {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-text {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.testimonial-author {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.testimonial-company {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

/* About Section */
.about-section {
  padding: 5rem 5%;
}

.mission-vision {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.mission-box, .vision-box {
  padding: 2rem;
  background: var(--light-bg);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Values Section */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.value-card {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.value-card:hover {
  transform: translateY(-5px);
}

/* Stats Section */
.stats-section {
  background: var(--primary-color);
  color: white;
  padding: 5rem 5%;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.stat-card {
  padding: 2rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

.form-group small {
  color: #666;
  font-size: 0.8rem;
}

.contact-form button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
  border-color: #ff4444;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

#additionalFields {
  margin-top: 1rem;
}

.form-group select option:first-child {
  color: #666;
}

.form-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 5px;
}

.form-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.priority-high {
  color: #dc3545;
}

.priority-medium {
  color: #ffc107;
}

.priority-low {
  color: #28a745;
}

/* Schedule Section */
.schedule {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 10px;
  margin-top: 2rem;
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
}

/* Blog Section */
.blog-section {
  padding: 5rem 5%;
  background: var(--light-bg);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-image {
  height: 200px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-icon {
  width: 100px;
  height: 100px;
}

.blog-content {
  padding: 1.5rem;
}

.blog-category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.blog-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.blog-card p {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--primary-color);
}

.read-more::after {
  content: ' →';
  opacity: 0;
  transition: opacity 0.3s ease;
}

.read-more:hover::after {
  opacity: 1;
}

/* Blog Article Page Styles */
.blog-article {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.blog-article h1 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.blog-article .meta {
  color: #666;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.blog-article .content {
  line-height: 1.8;
}

.blog-article h2 {
  color: var(--secondary-color);
  margin: 2rem 0 1rem;
  font-size: 1.8rem;
}

.blog-article p {
  margin-bottom: 1.5rem;
}

.blog-article ul {
  margin: 1rem 0 1.5rem 2rem;
}

.blog-article li {
  margin-bottom: 0.5rem;
}

/* Related Articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.related-articles h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* Footer Styles */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 5% 1rem;
}

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

.social-links a {
  color: white;
  font-size: 1.5rem;
  margin-right: 1rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Gallery Section Styles */
.gallery-section {
  padding: 5rem 5%;
  background-color: var(--light-bg);
}

@keyframes slideGallery {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.gallery-container {
  display: flex;
  overflow: hidden;
  animation: slideGallery 30s linear infinite;
}

.gallery-container:hover {
  animation-play-state: paused;
}

.gallery-item {
  flex: 0 0 auto;
  width: 300px;
  margin-right: 1.5rem;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.gallery-item .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.gallery-item .zoom-icon {
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -30px;
  right: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Clients Section Styles */
.clients-section {
  padding: 5rem 5%;
  background-color: white;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
}

.client-logo {
  max-width: 150px;
  max-height: 100px;
  filter: grayscale(100%) opacity(0.6);
  transition: all 0.4s ease;
  transform: scale(0.9);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.client-logo:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* Enhanced Responsive Design */
@media screen and (max-width: 1200px) {
  .navbar {
    flex-direction: column;
    padding: 1rem;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
  }

  .nav-links a {
    margin: 0.5rem;
  }

  .button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
}

@media screen and (max-width: 992px) {
  /* Hero Section */
  #inicio .hero-content {
    text-align: center;
    padding: 1rem;
  }

  #inicio .hero-content h1 {
    font-size: 2.5rem;
  }

  /* Services Section */
  .service-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  /* Mission and Vision */
  .mission-vision {
    grid-template-columns: 1fr;
  }

  /* Stats Section */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  /* Navbar */
  .navbar {
    position: relative;
  }

  .nav-links {
    display: none;
    width: 100%;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
  }

  .hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: 0.4s;
  }

  /* Contact Form */
  .contact-form {
    width: 100%;
    padding: 0 1rem;
  }

  /* Blog Cards */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Gallery */
  .gallery-container {
    flex-direction: column;
  }

  .gallery-item {
    width: 100%;
    margin-bottom: 1rem;
  }

  /* Clients */
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  /* Typography */
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Stats Section */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Buttons */
  .cta-button, .cta-button-large {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Form */
  .form-group input, 
  .form-group select, 
  .form-group textarea {
    width: 100%;
  }

  /* Clients */
  .clients-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile-First Typography Adjustments */
html {
  font-size: 16px; /* Base font size */
}

body {
  font-size: 1rem;
  line-height: 1.6;
}

/* Fluid Typography */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* Flexible Image and Video Sizing */
img, video {
  max-width: 100%;
  height: auto;
}

/* Touch-Friendly Sizing */
@media (pointer: coarse) {
  /* Increase touch target sizes for mobile */
  .nav-links a, 
  .cta-button, 
  .form-group input, 
  .form-group select, 
  .form-group textarea {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Smooth Scrolling for Better Mobile Experience */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Print Styles */
@media print {
  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  .navbar, .button-group {
    display: none;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}