/* ============================
  Variables CSS
  ============================ */
:root {
    /* Colores */
    --color-primary: rgb(255, 58, 23);
    --color-primary-dark: #E64A19;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-text-dark: #333333;
    --color-text-light: #555555;
    --color-bg-light: #f8f9fa;
    --color-border: #DDDDDD;
    
    /* Espaciado */
    --header-height: 80px;
    --header-height-mobile: 80px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    
    /* Tipografía */
    --font-size-sm: 0.85rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.2rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3.5rem;
    
    /* Sombras */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 25px rgba(0, 0, 0, 0.3);
    
    /* Bordes */
    --border-radius-sm: 8px;
    --border-radius-lg: 50px;
    
    /* Transiciones */
    --transition-fast: 0.3s ease;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030; /* Consistente con tools.css y debajo del sidebar móvil (1040-1041) */
    transition: top 0.3s ease-in-out;
    background-color: #fff;
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
}

.main-header.header-hidden {
    top: -120px;
}

body {
    padding-top: 0;
}

/* ============================
  Responsive Design
  ============================ */

/* Tablets y laptops pequeñas */
@media (max-width: 992px) {
    .navbar-custom {
        height: var(--header-height-mobile) !important;
    }
    
    .nav-link {
        margin: 0 0.5rem;
        font-size: 12px;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-content p {
        font-size: 1.3rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    :root {
        --header-height: 80px;
    }
    
    h1 {
        font-size: var(--font-size-2xl);
    }
    
    .hero-section {
        min-height: 80vh;
        margin-top: calc(-1 * var(--header-height));
        padding-top: var(--header-height);
    }
    
    .hero-content h1 {
        font-size: var(--font-size-3xl);
    }
    
    .hero-content p {
        font-size: var(--font-size-lg);
    }
    
    .hero-content .btn-hero {
        font-size: 1.1rem;
        padding: 12px 25px;
    }
    
    /* Centrar imagen del catálogo en móviles */
    .catalog-section {
        text-align: center;
        margin-bottom: var(--spacing-lg);
    }
    
    .catalog-section img {
        margin: 0 auto;
        display: block;
    }
}

/* Móviles */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
        
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-section {
        min-height: 30vh;
        padding-top: calc(var(--header-height) + var(--spacing-lg));
    }
    
    .hero-content {
        padding: 0 var(--spacing-lg);
        width: 100%;
        max-width: none;
    }
    
    .hero-content h1 {
        font-size: var(--font-size-2xl);
    }
    
    .hero-content p {
        font-size: var(--font-size-base);
    }
    
    .hero-content .btn-hero {
        font-size: var(--font-size-base);
        padding: var(--spacing-sm) var(--spacing-lg);
    }
    
    .catalog-section img {
        max-width: 300px;
    }
}

/* Móviles pequeños (iPhone SE) */
@media (max-width: 375px) {
    .hero-section {
        min-height: 60vh;
        padding-top: calc(var(--header-height) + var(--spacing-xl));
    }
    
    .hero-content {
        padding: 0 var(--spacing-md) !important;
    }
    
    .hero-content h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-content p {
        font-size: var(--font-size-sm) !important;
    }
    
    .catalog-section img {
        max-width: 250px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 320px) {
    .hero-content {
        padding: 0 var(--spacing-sm) !important;
    }
    
    .hero-content h1 {
        font-size: 1.6rem !important;
    }
    
    .hero-content p {
        font-size: 0.8rem !important;
    }
    
    .catalog-section img {
        max-width: 200px;
    }
}

/* ============================
  Estilos Globales
  ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg-light);
    font-family: Arial, sans-serif;
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: var(--spacing-md);
}

.heemsa-backgroud {
    background-color: var(--color-primary);
}

.heemsa-backgroud-2 {
    background-color: var(--color-black);
}

/* Contenedor principal para el sticky footer */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--header-height);
}

.content-wrap {
    flex: 1;
    /* padding-bottom: 2rem; */
}

/* ============================
  Header - Configuración unificada
  ============================ */
/* NOTA: z-index está definido arriba en la primera regla .main-header */

/* ============================
  Menu
  ============================ */
.navbar-custom {
    height: var(--header-height) !important;
    background-color: var(--color-white) !important;
    padding: 0 !important;
}

.navbar-custom .nav-link {
    color: var(--color-text-dark) !important;
    font-weight: 500;
    margin: 0 1rem;
    text-transform: uppercase;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.navbar-custom .nav-link:hover {
    color: var(--color-primary) !important;
}

.navbar-custom .navbar-brand:hover {
    color: var(--color-white);
}

.navbar-custom .nav-item {
    padding: 0 var(--spacing-md);
    background-color: var(--color-white);
}

.navbar-custom .nav-item-promo {
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    background-color: var(--color-primary);
    margin-left: var(--spacing-sm);
}

.navbar-custom .nav-item-promo .nav-link {
    color: var(--color-white) !important;
}

.navbar-custom .nav-item-promo:hover {
    background-color: var(--color-black);
}

.nav-link.active {
    color: var(--color-primary) !important;
    border-bottom: 2px solid var(--color-primary);
}

.navbar-custom .nav-link.active {
    color: var(--color-primary) !important;
}

.navbar {
    padding: 1rem 0 !important;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.logo {
    height: 45px;
    width: auto;
}

.navbar-nav {
    align-items: center;
}

/* Navbar toggler (botón hamburguesa) */
.navbar-toggler {
    border: none !important;
    background: none !important;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--color-text-dark) !important;
    background-color: transparent !important;
    border-radius: 0.375rem;
    transition: box-shadow 0.15s ease-in-out;
}

.navbar-toggler:focus,
.navbar-toggler:hover {
    text-decoration: none;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 58, 23, 0.25);
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* Ocultar el botón en desktop */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
}

/* ============================
  Footer
  ============================ */
.footer-heemsa {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 3rem 1rem 2rem;
  position: relative;
  overflow: hidden;
}

.footer-heemsa::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.footer-heemsa .footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 2rem;
  position: relative;
}

.footer-heemsa h4 {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: #fff;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heemsa h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.6));
  border-radius: 2px;
}

.footer-heemsa ul {
  padding: 0;
  list-style: none;
  margin: 0;
}

.footer-heemsa ul li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1rem;
}

.footer-heemsa ul li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.footer-heemsa ul li:hover::before {
  transform: translateX(3px);
  color: #fff;
}

.footer-heemsa a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 400;
  line-height: 1.6;
  position: relative;
}

.footer-heemsa a:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  transform: translateX(2px);
}

.footer-heemsa .social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-heemsa .social-icons a {
  display: inline-block;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.footer-heemsa .social-icons a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.footer-heemsa .social-icons img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.footer-heemsa .social-icons a:hover img {
  transform: scale(1.1);
}

.footer-heemsa .container {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.footer-heemsa .footer-section {
  flex: 1 1 250px;
}

.footer-heemsa p {
  line-height: 1.7;
  margin-bottom: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Logo del footer */
.footer-logo-container {
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.608);
  padding: 1rem;
  border-radius: 12px;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer-logo {
  max-width: 140px;
  height: auto;
  filter: brightness(1.2) contrast(1.1);
  transition: all 0.4s ease;
  display: block;
  margin: 0 auto;
}

.footer-logo:hover {
  filter: brightness(1.4) contrast(1.2) drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
  transform: scale(1.08) rotate(-2deg);
}

.footer-copyright {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95) !important;
  margin-bottom: 0.5rem !important;
}

.footer-description {
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Efectos para enlaces específicos */
.footer-heemsa a[href^="tel:"] {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.footer-heemsa a[href^="mailto:"] {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.footer-heemsa a[href^="tel:"]:hover,
.footer-heemsa a[href^="mailto:"]:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .footer-heemsa {
    padding: 2.5rem 1rem 1.5rem;
  }
  
  .footer-heemsa .container {
    gap: 2rem;
  }
  
  .footer-heemsa .footer-section {
    text-align: center;
    flex: 1 1 100%;
  }
  
  .footer-heemsa h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-heemsa ul li {
    padding-left: 0;
  }
  
  .footer-heemsa ul li::before {
    display: none;
  }
  
  .footer-heemsa .social-icons {
    justify-content: center;
  }
}

/* ============================
  Contenido General
  ============================ */
.container {
    max-width: 1200px;
}

h1 {
    font-size: var(--font-size-3xl);
    color: var(--color-text-dark);
    margin-bottom: 1rem;
}

p {
    color: var(--color-text-light);
    font-size: var(--spacing-md);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ============================
  Secciones especiales
  ============================ */
.catalog-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.catalog-section img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
}

/* ============================
  Botones
  ============================ */
.btn-primary {
    background-color: var(--color-primary) !important;
    border: none !important;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    color: var(--color-white) !important;
    font-size: var(--font-size-lg);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark) !important;
    transform: scale(1.05);
}

/* ============================
  Página de Agradecimiento
  ============================ */
.thanks-container {
    min-height: calc(100vh - var(--header-height) - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.thanks-content {
    max-width: 600px;
    padding: var(--spacing-xl);
    background: var(--color-white);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.thanks-icon {
    font-size: 5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
}

.thanks-icon i {
    animation: scaleIn 0.5s ease-out;
}

.thanks-content h1 {
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-2xl);
}

.thanks-content p {
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
}

.thanks-info {
    margin-top: var(--spacing-xl);
}

.thanks-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.btn-outline-primary {
    color: var(--color-primary) !important;
    border: 2px solid var(--color-primary) !important;
    background-color: transparent !important;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-lg);
    transition: all var(--transition-fast);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
    transform: scale(1.05);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .thanks-content {
        padding: var(--spacing-lg);
        margin: var(--spacing-md);
    }

    .thanks-icon {
        font-size: 4rem;
    }

    .thanks-content h1 {
        font-size: var(--font-size-xl);
    }

    .thanks-content p {
        font-size: var(--font-size-base);
    }
}

