/* 
 * L.D.S. Lonas de Sonora - Main Stylesheet
 * Industrial, Professional, Robust
 */

:root {
  /* Brand Colors */
  --primary-red: #D32F2F;
  /* Industrial Red */
  --primary-dark: #B71C1C;
  --black: #1a1a1a;
  --dark-gray: #333333;
  --light-gray: #f4f4f4;
  --white: #ffffff;
  --border-color: #ddd;

  /* Typography */
  --font-main: 'Roboto', 'Segoe UI', Tahoma, sans-serif;

  /* Spacing */
  --container-width: 1200px;
  --section-padding: 4rem 1rem;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Security Hardening: Anti-Selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input,
textarea {
  user-select: text !important;
}

body {
  font-family: var(--font-main);
  background-color: var(--white);
  color: var(--dark-gray);
  line-height: 1.6;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
}

h2 {
  font-size: 1.8rem;
  position: relative;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--primary-red);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin-bottom: 1rem;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

.text-center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary-red);
  color: var(--white);
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  border: 2px solid var(--primary-red);
  cursor: pointer;
}

.btn:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-red);
}

.btn-outline:hover {
  background-color: var(--primary-red);
  color: var(--white);
}

.section {
  padding: var(--section-padding);
}

.bg-light {
  background-color: var(--light-gray);
}

.bg-dark {
  background-color: var(--black);
  color: var(--white);
}

.bg-dark h2 {
  color: var(--white);
}

/* Grid System (Simple) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }
}

/* Specific Components */
.card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-img {
  height: 200px;
  background-color: #ddd;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.card-text {
  font-size: 0.95rem;
  color: #555;
  flex-grow: 1;
  margin-bottom: 1rem;
}

/* --- Red Theme Redesign --- */
.bg-red-theme {
  background-color: var(--primary-red);
  color: var(--white);
  position: relative;
  /* Fallback if image fails */
}

/* Gradient overlay for hero sections */
.bg-red-grad {
  background: linear-gradient(rgba(228, 36, 35, 0.9), rgba(183, 28, 28, 0.9));
}

.bg-red-theme h1,
.bg-red-theme h2,
.bg-red-theme p {
  color: var(--white);
}

/* --- LDS Slider --- */
.lds-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* background: #000; Removed to avoid black boxes */
}

/* --- FIX Slider en secciones rojas / fondos personalizados --- */
.testimonials-section .lds-slider,
.content-slider .lds-slider,
.lds-testimonials .lds-slider,
.lds-testimonials-red .lds-slider {
  background: transparent !important;
}

/* For cards, we fix the height */
.card .lds-slider {
  height: 200px;
}

/* For content sections, we might want it taller */
.content-slider {
  height: 350px;
  border-radius: 8px;
}

.lds-slider-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  height: 100%;
}

/* --- FIX SLIDER UNIFORM HEIGHT (OPTION A: object-fit: cover) --- */

/* Altura uniforme para TODOS los sliders */
.lds-slide {
  height: 350px;
  /* Altura desktop */
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .lds-slide {
    height: 240px;
    /* Altura móvil */
  }
}

/* Todas las imágenes mismas dimensiones SIEMPRE */
.lds-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Controls */
.lds-slider-prev,
.lds-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 2;
  transition: background 0.3s;
}

.lds-slider-prev:hover,
.lds-slider-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lds-slider-prev {
  left: 0;
  border-radius: 0 4px 4px 0;
}

.lds-slider-next {
  right: 0;
  border-radius: 4px 0 0 4px;
}

/* Dots */
.lds-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.lds-slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}

.lds-slider-dots button.active {
  background: white;
  transform: scale(1.2);
}

/* --- Testimonials --- */
/* --- Testimonials --- */
.lds-testimonials {
  position: relative;
}

.lds-testimonials .lds-slide {
  /* Ensure text slides are centered and legible */
  padding: 0 10%;
}

.testimonial-card {
  background: transparent;
  /* Transparent inside slider if we want cleaner look, or card style */
  border: none;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-text {
  font-style: italic;
  color: #555;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.testimonial-author {
  font-weight: 700;
  color: var(--black);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.testimonial-stars {
  color: #FFC107;
  /* Amber/Gold for stars */
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* --- Red Testimonials Customization --- */
.lds-testimonials-red {
  background-color: #e42423;
  /* Primary Red */
  color: #ffffff;
}

.lds-testimonials-red h2,
.lds-testimonials-red p,
.lds-testimonials-red .testimonial-text,
.lds-testimonials-red .testimonial-author {
  color: #ffffff !important;
}

.lds-testimonials-red .lds-slider-prev,
.lds-testimonials-red .lds-slider-next {
  display: none !important;
  /* Hide arrows as requested */
}

.lds-testimonials-red .testimonial-stars {
  color: #FFD700;
  /* Bright gold matches well with red */
}

/* Dots specific for red background */
.lds-testimonials-red .lds-slider-dots button {
  background: rgba(255, 255, 255, 0.4);
}

.lds-testimonials-red .lds-slider-dots button.active {
  background: #ffffff;
}

/* =========================================
   LAYOUT STYLES (Consolidated)
   Header, Footer, Nav, WhatsApp
   ========================================= */

/* Header */
.site-header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo img {
  max-height: 60px;
  width: auto;
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--black);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-red);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
}

/* Footer */
.site-footer {
  background-color: var(--black);
  color: #ccc;
  padding: 4rem 1rem 1rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a:hover {
  color: var(--primary-red);
  padding-left: 5px;
}

.footer-contact li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Map Placeholder */
.map-container {
  width: 100%;
  height: 200px;
  background-color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  border-radius: 4px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}


.copyright {
  text-align: center;
  border-top: 1px solid #444;
  padding-top: 2rem;
  font-size: 0.8rem;
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.whatsapp-float:hover {
  background-color: #128C7E;
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-top: 1px solid #eee;
    padding: 1rem 0;
    display: none;
    /* JS will toggle this */
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 1rem 2rem;
    border-bottom: 1px solid #f9f9f9;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 25px;
  }
}