/* Variables y reset */
:root {
  --primary-color: #8b2323;
  --secondary-color: #a52a2a;
  --accent-color: #cd5c5c;
  --light-color: #f5f5f5;
  --dark-color: #333;
  --bg-color: #f9f3e6;
  --text-color: #333;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

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

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.subtitle {
  text-align: center;
  margin-bottom: 40px;
  color: var(--accent-color);
  font-style: italic;
}

section {
  padding: 80px 5%;
}

/* Header y navegación */
header {
  background-color: white;
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 60px;
  border-radius: 50%;
  margin-right: 15px;
}

.logo-container h1 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.logo-container span {
  font-size: 1.1rem;
  color: var(--accent-color);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  font-weight: 500;
  padding-bottom: 5px;
  border-bottom: 2px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
  border-color: var(--primary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Hero section */
.hero {
  height: 100vh;
  background-image: url("https://images.unsplash.com/photo-1519824145371-296894a0daa9?w=1600&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 80px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

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

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: white;
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: white;
}

/* Servicios */
.servicios {
  text-align: center;
  background-color: white;
}

.servicios h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.servicio-card {
  background-color: var(--light-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.servicio-card:hover {
  transform: translateY(-10px);
}

.servicio-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.servicio-card h3 {
  padding: 20px 20px 10px;
  color: var(--primary-color);
}

.servicio-card p {
  padding: 0 20px 20px;
  color: var(--dark-color);
}

/* Precios */
.precios {
  background-color: var(--light-color);
  text-align: center;
}

.precios h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.tab-btn {
  background-color: transparent;
  border: none;
  padding: 10px 20px;
  margin: 0 5px 10px;
  cursor: pointer;
  font-weight: 500;
  color: var(--dark-color);
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.tab-content {
  max-width: 800px;
  margin: 0 auto;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.precio-tabla {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.precio-tabla tr {
  border-bottom: 1px solid #ddd;
}

.precio-tabla tr:last-child {
  border-bottom: none;
}

.precio-tabla td {
  padding: 15px;
  text-align: left;
}

.precio-tabla td:last-child {
  text-align: right;
  font-weight: bo;
}

/* Contacto */
.contacto {
  background-color: #f9f3e6;
  padding: 80px 5%;
  text-align: center;
}

.contacto h2 {
  color: #8b2323;
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.contacto-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.contacto-info,
.contacto-form {
  flex: 1;
  min-width: 300px;
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  text-align: left;
}

.info-item i {
  font-size: 1.5rem;
  color: #8b2323;
  margin-right: 15px;
  min-width: 30px;
}

.social-media {
  margin-top: 30px;
}

.social-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: #8b2323;
  color: white;
  border-radius: 50%;
  margin: 0 10px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: #a52a2a;
  transform: translateY(-3px);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  background-color: #f9f9f9;
}

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

/* Footer */
footer {
  background-color: #333;
  color: white;
  padding: 50px 5% 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 30px;
  gap: 30px;
}

.footer-logo,
.footer-links,
.footer-contact {
  flex: 1;
  min-width: 250px;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo img {
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
}

.footer-logo p {
  font-size: 1.2rem;
  line-height: 1.4;
}

.footer-links h4,
.footer-contact h4 {
  color: white;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h4::after,
.footer-contact h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: #cd5c5c;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: #ddd;
  transition: color 0.3s ease;
}

.footer-links ul li a:hover {
  color: white;
  padding-left: 5px;
}

.footer-contact p {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.footer-contact i {
  margin-right: 10px;
  color: #cd5c5c;
}

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

.footer-quote {
  margin-top: 15px;
  font-style: italic;
  color: #cd5c5c;
  font-size: 1.1rem;
}

/* Responsive para contacto y footer */
@media (max-width: 768px) {
  .contacto-container {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-logo,
  .footer-links,
  .footer-contact {
    margin-bottom: 30px;
  }
}

/* Estilos responsive generales */
@media (max-width: 1200px) {
  .servicios-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .contacto-container,
  .footer-content {
    gap: 20px;
  }
}

/* Estilos para tablets */
@media (max-width: 992px) {
  section {
    padding: 60px 4%;
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

  .servicios-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    margin-bottom: 10px;
  }
}

/* Estilos para tablets pequeñas y móviles grandes */
@media (max-width: 768px) {
  header {
    padding: 15px 20px;
  }

  .logo-container img {
    height: 50px;
  }

  .logo-container h1 {
    font-size: 1.3rem;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    margin: 10px 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .hero {
    height: 80vh;
    margin-top: 70px;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  section {
    padding: 50px 20px;
  }

  .servicios h2,
  .precios h2,
  .contacto h2 {
    font-size: 2rem;
  }

  .servicios-grid {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  }

  .contacto-container {
    flex-direction: column;
  }

  .contacto-info,
  .contacto-form {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-logo,
  .footer-links,
  .footer-contact {
    width: 100%;
    margin-bottom: 30px;
  }

  .tab-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
}

/* Estilos para móviles */
@media (max-width: 576px) {
  .logo-container h1 {
    font-size: 1.1rem;
  }

  .logo-container span {
    font-size: 0.9rem;
  }

  .logo-container img {
    height: 40px;
  }

  .hero-content h2 {
    font-size: 1.7rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .servicios h2,
  .precios h2,
  .contacto h2 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .precio-tabla td {
    padding: 12px 8px;
    font-size: 0.9rem;
  }

  .tab-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    margin: 0 3px 8px;
  }

  .social-icon {
    width: 35px;
    height: 35px;
    line-height: 35px;
    margin: 0 5px;
  }

  .footer-bottom {
    font-size: 0.9rem;
  }

  .footer-quote {
    font-size: 0.9rem;
  }
}

/* Estilos para móviles pequeños */
@media (max-width: 375px) {
  .logo-container h1 {
    font-size: 1rem;
  }

  .logo-container img {
    height: 35px;
    margin-right: 10px;
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 0.85rem;
  }

  .btn {
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
    flex-wrap: nowrap;
  }

  .tab-btn {
    white-space: nowrap;
  }

  .precio-tabla td {
    padding: 10px 5px;
    font-size: 0.85rem;
  }
}

/* Ajuste para orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: 120vh;
  }

  .hero-content {
    padding: 0 10%;
  }
}

/* Asegurar que el menú móvil se oculte al cambiar a pantallas grandes */
@media (min-width: 769px) {
  nav ul {
    display: flex !important;
  }
}

/* Corregir el menú desplegable móvil */
@media (max-width: 768px) {
  /* Eliminar estilos hover que causan conflicto en móviles */
  nav ul li:hover ul {
    margin-top: 0;
  }

  /* Asegurar que el menú desplegable sea visible cuando tenga la clase .show */
  nav ul.show {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  /* Asegurar que los submenús también funcionen */
  .dropdown-content.show {
    display: block !important;
  }
}
