/* Base Styles */
:root {
  --primary: #e63946;
  --primary-hover: #d32836;
  --secondary: #457b9d;
  --dark: #282828;
  --darker: #1a1a1a;
  --light: #f1faee;
  --gray: #b0b0b0;
  --gray-light: #3a3a3a;
  --gray-dark: #202020;
  --text-light: #e0e0e0;
  --text-muted: #a0a0a0;
  --card-bg: #333333;
  --border-color: #444444;
  --border-radius: 0.375rem;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--dark);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

/* Section Styles */
section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Button Styles */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-outline {
  color: var(--text-light);
  background-color: transparent;
  border-color: var(--border-color);
}

.btn-outline:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* Card Styles */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--box-shadow);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.card-content {
  padding: 1.5rem;
}

/* Header/Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--darker);
  border-bottom: 1px solid var(--border-color);
  height: 4rem;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-light);
}

.desktop-nav {
  display: none;
}

.mobile-menu-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

.mobile-nav {
  display: none;
  padding: 1rem 0;
  background-color: var(--darker);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
}

/* Hero Section */
.hero {
  position: relative;
  background-color: var(--darker);
  color: var(--text-light);
  padding: 5rem 0;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

/* About Section */
.about {
  background-color: var(--dark);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.feature-list {
  margin-top: 1.5rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.feature-list i {
  color: var(--primary);
  margin-top: 0.25rem;
}

/* Services Section */
.services {
  background-color: var(--gray-dark);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: var(--transition);
}

.service-card:hover {
  box-shadow: var(--box-shadow);
}

.service-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  padding-bottom: 0.5rem;
}

.service-header i {
  font-size: 2.5rem;
  color: var(--primary);
}

.service-header h3 {
  font-size: 1.25rem;
  color: var(--text-light);
}

.service-content {
  padding: 0 1.5rem 1.5rem;
}

.service-content p {
  color: var(--text-muted);
}

/* Work Section */
.work {
  background-color: var(--dark);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.project-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  background-color: var(--card-bg);
}

.project-card:hover {
  box-shadow: var(--box-shadow);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1rem;
}

.project-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.project-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.project-gallery {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gallery-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-thumbnail:hover {
  opacity: 0.8;
}

.gallery-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.gallery-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gallery-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Clients Section */
.clients {
  background-color: var(--gray-dark);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.client-card {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.client-card:hover {
  box-shadow: var(--box-shadow);
}

.client-card img {
  max-height: 80px;
  object-fit: contain;
  /* Eliminamos los filtros que estaban causando problemas */
}

/* Contact Section */
.contact {
  background-color: var(--dark);
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-form-container {
  flex: 2;
}

.contact-info {
  flex: 1;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--gray-dark);
  color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-success {
  display: none;
  background-color: rgba(40, 167, 69, 0.2);
  color: #8bffaa;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border: 1px solid rgba(40, 167, 69, 0.4);
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item i {
  font-size: 1.25rem;
  color: var(--primary);
  margin-top: 0.25rem;
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-light);
}

.contact-item p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.map-container {
  margin-top: 1.5rem;
  height: 250px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.map-placeholder {
  height: 100%;
  background-color: var(--gray-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background-color: var(--darker);
  color: var(--text-light);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.footer-info p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-light);
  transition: var(--transition);
}

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

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-light);
}

.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact li {
  display: flex;
  gap: 0.75rem;
  color: var(--text-muted);
}

.footer-contact i {
  margin-top: 0.25rem;
}

.footer-contact a {
  color: var(--text-muted);
}

.footer-contact a:hover {
  color: var(--text-light);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive Styles */
@media (min-width: 576px) {
  .hero-buttons {
    flex-direction: row;
  }

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

  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  section {
    padding: 6rem 0;
  }

  .section-header h2 {
    font-size: 2.5rem;
  }

  .hero {
    padding: 8rem 0;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .about-content {
    flex-direction: row;
  }

  .about-image {
    flex: 1;
  }

  .about-text {
    flex: 1;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-row {
    flex-direction: row;
  }

  .form-row .form-group {
    flex: 1;
  }

  .contact-content {
    flex-direction: row;
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .desktop-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
  }

  .mobile-menu-btn {
    display: none;
  }

  .clients-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
