/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  font-family: 'Exo 2', sans-serif;
  background: #000000;
  color: white;
  line-height: 1.6;
}

/* Critical CSS optimizations for LCP and CLS */
img {
  max-width: 100%;
  height: auto;
  display: block;
  contain: layout style paint;
}

/* Prevent layout shift for critical images */
.logo-large {
  width: 280px;
  height: 90px;
  object-fit: contain;
}

.logo-small {
  width: 200px;
  height: 70px;
  object-fit: contain;
}

.main-image {
  width: 70%;
  height: auto;
  contain: layout style paint;
}

.main-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  contain: layout style paint;
}

.button-icon {
  width: 30px;
  height: 30px;
  margin-right: 8px;
  object-fit: contain;
}

/* Optimize critical layout */
.header {
  min-height: 100px;
  contain: layout style paint;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #ff0512;
  gap: 20px;
}

.main-section {
  min-height: 250px;
  contain: layout style paint;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  gap: 30px;
  background: #000000;
}

/* Prevent layout shift for form container */
.form-container {
  width: 30%;
  max-width: 400px;
  padding: 20px;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  contain: layout style paint;
}

/* Header specific text color */
.header {
  color: #333;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #ff0512;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.logo {
  transition: transform 0.3s ease;
  contain: layout style paint;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-large {
  width: 300px;
  height: auto;
}

.logo-small {
  width: 220px;
  height: auto;
}

.buttons-container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* Button styles */
.button, .a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-height: 45px;
  contain: layout style paint;
  will-change: transform;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Soporte Técnico button - Black */
.a.support-btn {
  background: linear-gradient(135deg, #333333 0%, #000000 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.a.support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.a.support-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* WhatsApp button - Green */
.button.whatsapp-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.button.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
  background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
}

.button.whatsapp-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.4);
}

/* Call button - Blue */
.button#call-btn {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.button#call-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.5);
  background: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
}

.button#call-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 123, 255, 0.4);
}

.button-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

/* Main section */
.main-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 250px;
  background: #000000;
}

.main-image {
  width: 70%;
  max-width: none;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  contain: layout style paint;
  backface-visibility: hidden;
}

.desktop-image {
  display: block;
}

.mobile-image {
  display: none;
}

.form-container {
  width: 30%;
  max-width: none;
  padding: 20px;
  background: transparent;
  min-height: 200px;
}

/* Bitrix24 form styles */
.form-container iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 200px !important;
  border: none !important;
  border-radius: 8px !important;
}

.b24-form {
  width: 100% !important;
  height: 100% !important;
}

.b24-form-container {
  width: 100% !important;
  height: 100% !important;
}

.b24-form-panel {
  width: 100% !important;
  height: 100% !important;
}

/* Responsive buttons */
.responsive-buttons-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 40px 20px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  background: #000000;
}

/* Separator */
.separator {
  background: #000000;
  color: #ff0512;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.separator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 5, 18, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.separator h2 {
  font-size: 2.5em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 20px rgba(255, 5, 18, 0.5);
}

/* Images section */
.images-section {
  padding: 40px 20px;
  background: #000000;
}

.images-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}

.section-image {
  width: 300px;
  height: 300px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(255, 5, 18, 0.2);
  transition: all 0.3s ease;
}

.section-image:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(255, 5, 18, 0.4);
}

.image-link {
  display: block;
  text-decoration: none;
}

.custom-btn {
  background: #ffffff !important;
  color: #ff0512 !important;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 -2px 4px rgba(255, 255, 255, 0.8), 0 4px 15px rgba(255, 5, 18, 0.2) !important;
  border: 2px solid #ff0512 !important;
  text-shadow: none !important;
  font-weight: 700 !important;
  min-height: 60px;
  border-radius: 12px !important;
}

.custom-btn:hover {
  background: #ff0512 !important;
  color: #ffffff !important;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 -2px 4px rgba(255, 255, 255, 0.6), 0 8px 25px rgba(255, 5, 18, 0.4) !important;
  transform: translateY(-2px) !important;
}

.custom-btn:active {
  background: #cc0000 !important;
  transform: translateY(1px) !important;
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.4), inset 0 -1px 2px rgba(255, 255, 255, 0.4), 0 2px 10px rgba(255, 5, 18, 0.3) !important;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(26, 26, 26, 0.8) 100%);
  padding: 30px 40px;
  text-align: center;
  border-top: 2px solid #ff0512;
  margin-top: 40px;
}

.footer-btn {
  color: #ffffff;
  text-decoration: none;
  margin: 0 20px;
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.footer-btn:hover {
  background: rgba(255, 5, 18, 0.2);
  color: #ff0512;
}

/* Floating button */
.floating-button-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.floating-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 200px;
  height: 60px;
  background: #25d366;
  border-radius: 30px;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
  will-change: transform;
  padding: 0 20px;
}

.floating-button:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

.floating-button-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
}

.floating-button {
  text-decoration: none;
}

.whatsapp-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.floating-button-text {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Performance optimizations */
.logo, .button, .main-image {
  contain: layout style paint;
}

.button, .floating-button {
  will-change: transform;
}

/* Mobile styles */
/* Tablet (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .header {
    padding: 12px 20px;
  }

  .logo-large {
    width: 240px;
  }

  .logo-small {
    width: 170px;
  }

  .buttons-container {
    gap: 10px;
    flex-wrap: wrap;
  }

  .button, .a {
    padding: 8px 12px;
    font-size: 11px;
    min-height: 40px;
  }

  .button-icon {
    width: 25px;
    height: 25px;
    margin-right: 6px;
  }

  .main-section {
    padding: 40px 30px;
    gap: 25px;
  }

  .main-image {
    width: 65%;
  }

  .form-container {
    width: 35%;
    padding: 25px;
  }

  .responsive-buttons-container {
    gap: 20px;
    padding: 30px;
  }

  .custom-btn {
    padding: 15px 25px;
    font-size: 16px;
  }

  .page-title h1 {
    font-size: 24px;
  }

  .page-title + .main-section {
    padding: 25px 30px;
    min-height: 220px;
  }

  .page-title + .main-section .main-image {
    width: 65%;
  }

  .page-title + .main-section .form-container {
    width: 35%;
    padding: 25px;
    min-height: 170px;
  }

  .page-title + .main-section .form-container iframe {
    min-height: 170px !important;
  }

  .carousel-image {
    width: 280px;
    height: 190px;
  }

  .floating-button {
    width: auto;
    min-width: 180px;
    height: 55px;
    padding: 0 20px;
  }

  .floating-button-text {
    font-size: 13px;
  }

  .whatsapp-icon {
    width: 22px;
    height: 22px;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    padding: 15px 20px;
    gap: 15px;
  }

  .logo-container {
    gap: 10px;
  }

  .logo-large {
    width: 200px;
  }

  .logo-small {
    width: 150px;
  }

  .buttons-container {
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .button, .a {
    padding: 8px 12px;
    font-size: 11px;
    min-height: 45px;
  }

  .button-icon {
    width: 30px;
    height: 30px;
    margin-right: 6px;
  }

  .main-section {
    flex-direction: column;
    padding: 30px 20px;
    gap: 30px;
    text-align: center;
  }

  .main-image {
    width: 100%;
    max-width: 400px;
  }

  .desktop-image {
    display: none;
  }

  .mobile-image {
    display: block;
  }

  .form-container {
    width: 100%;
    max-width: 350px;
    padding: 20px;
    min-height: 250px;
  }

  .responsive-buttons-container {
    gap: 15px;
    padding: 20px;
  }

  .custom-btn {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 50px;
  }

  .footer {
    padding: 20px;
  }

  .footer-btn {
    margin: 5px;
    padding: 8px 15px;
    font-size: 14px;
  }

  .floating-button-container {
    bottom: 20px;
    right: 20px;
  }

  .floating-button {
    width: auto;
    min-width: 160px;
    height: 50px;
    padding: 0 15px;
  }

  .floating-button-text {
    font-size: 12px;
  }

  .whatsapp-icon {
    width: 20px;
    height: 20px;
  }

  .main-image {
    backface-visibility: hidden;
  }

  .button:active, .custom-btn:active, .footer-btn:active {
    transform: scale(0.95);
  }

  /* Separator mobile */
  .separator {
    padding: 20px 15px;
  }

  .separator h2 {
    font-size: 1.8em;
    letter-spacing: 2px;
  }

  /* Images section mobile */
  .images-section {
    padding: 20px 15px;
  }

  .images-container {
    gap: 15px;
  }

  .section-image {
    width: 100%;
    max-width: 400px;
    height: 300px;
  }
}

/* Medium tablets (1024px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
  .header {
    padding: 25px 35px;
  }

  .logo-large {
    width: 280px;
  }

  .logo-small {
    width: 200px;
  }

  .buttons-container {
    gap: 18px;
  }

  .button, .a {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 45px;
  }

  .main-section {
    padding: 45px 35px;
    gap: 30px;
  }

  .main-image {
    width: 68%;
  }

  .form-container {
    width: 32%;
    padding: 30px;
  }

  .page-title + .main-section {
    padding: 30px 35px;
    min-height: 230px;
  }

  .page-title + .main-section .main-image {
    width: 68%;
  }

  .page-title + .main-section .form-container {
    width: 32%;
    padding: 30px;
    min-height: 180px;
  }

  .page-title + .main-section .form-container iframe {
    min-height: 180px !important;
  }
}

/* Extra small mobile */
@media (max-width: 480px) {
  .header {
    padding: 10px 15px;
  }

  .logo-large {
    width: 180px;
  }

  .logo-small {
    width: 130px;
  }

  .buttons-container {
    flex-direction: column;
    width: 100%;
  }

  .button, .a {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 11px;
    min-height: 40px;
  }

  .main-section {
    padding: 20px 15px;
  }

  .form-container {
    padding: 15px;
  }

  .responsive-buttons-container {
    flex-direction: column;
    align-items: center;
  }

  .custom-btn {
    width: 100%;
    max-width: 280px;
  }

  .footer {
    padding: 15px;
  }

  .footer-btn {
    display: block;
    margin: 10px auto;
    max-width: 200px;
  }
  
  /* Título de página responsive */
  .page-title {
    padding: 15px 0;
  }
  
  .page-title h1 {
    font-size: 22px;
    letter-spacing: 1px;
  }
  
  /* Carousel responsive */
  .carousel {
    gap: 15px;
  }
  
  .carousel-image {
    width: 250px;
    height: 180px;
  }
  
  /* Main section responsive para subpáginas */
  .page-title + .main-section {
    padding: 20px 15px;
    flex-direction: column;
    min-height: 180px;
  }
  
  .page-title + .main-section .main-image {
    width: 100%;
    height: auto;
  }
  
  .page-title + .main-section .form-container {
    width: 100%;
    padding: 15px;
    min-height: 120px;
  }
  
  .page-title + .main-section .form-container iframe {
    min-height: 120px !important;
  }
}

/* Quitar subrayado de todos los botones */
.custom-btn {
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Título de página */
.page-title {
  background: #000000;
  color: #ff0512;
  text-align: center;
  padding: 20px 0;
  margin: 0;
  position: relative;
  overflow: hidden;
}

.page-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 5, 18, 0.4), transparent);
  animation: shimmer 3s infinite;
}

.page-title h1 {
  font-size: 28px;
  font-weight: bold;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

/* Main section más pequeña para subpáginas */
.page-title + .main-section {
  padding: 20px 40px;
  min-height: 200px;
  gap: 30px;
  background: #000000;
}

.page-title + .main-section .main-image {
  width: 70%;
  max-width: none;
  height: auto;
}

.page-title + .main-section .form-container {
  width: 30%;
  max-width: none;
  padding: 20px;
  min-height: 150px;
  background: transparent;
  backdrop-filter: blur(0);
  border: none;
}

.page-title + .main-section .form-container iframe {
  min-height: 150px !important;
}

/* Centrar imágenes en planes promocionales */
.carousel-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.carousel-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(255, 5, 18, 0.3);
  transition: transform 0.3s ease;
}

.carousel-image:hover {
  transform: scale(1.05);
}

/* Estilos para botones activos en sus páginas correspondientes */
.custom-btn.active {
  background: linear-gradient(to bottom, #ff0512 0%, #ff0512 50%, #000000 50%, #000000 100%) !important;
  color: #ffffff !important;
  border: 2px solid #ff0512 !important;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 -2px 4px rgba(255, 255, 255, 0.8), 0 4px 15px rgba(255, 5, 18, 0.2) !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.custom-btn.active:hover {
  background: linear-gradient(to bottom, #ff0512 0%, #ff0512 50%, #000000 50%, #000000 100%) !important;
  color: #ffffff !important;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 -2px 4px rgba(255, 255, 255, 0.6), 0 8px 25px rgba(255, 5, 18, 0.4) !important;
  transform: translateY(-2px) !important;
  text-decoration: none !important;
}

.custom-btn.active:active {
  background: linear-gradient(to bottom, #ff0512 0%, #ff0512 50%, #000000 50%, #000000 100%) !important;
  color: #ffffff !important;
  transform: translateY(1px) !important;
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.4), inset 0 -1px 2px rgba(255, 255, 255, 0.4), 0 2px 10px rgba(255, 5, 18, 0.3) !important;
  text-decoration: none !important;
} 