/* Estilos generales mejorados */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #ff0000;
    --secondary-color: #111;
    --text-color: #fff;
    --bg-color: #000;
    --accent-color: #ff4d4d;
    --preheader-bg: #111;
    --preheader-text: #ccc;
}

.modern-header {
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Pre-header mejorado */
.pre-header {
    background-color: #940000;
    padding: 8px 0;
    font-size: 14px;
    color: var(--preheader-text);
}

.pre-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.contact-info span:hover {
    color: #000000;
    cursor: pointer;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--preheader-text);
    font-size: 16px;
    transition: all 0.3s ease;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons a:hover {
    color: var(--text-color);
    background-color: #000000;
    transform: translateY(-2px);
}

/* Main nav mejorado */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: transform 0.3s ease;
}

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

.logo img {
    width: 150px;
    height: auto;
    transition: filter 0.3s ease;
}

.logo:hover img {
    filter: brightness(1.1);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    padding: 10px 0;
    display: inline-block;
    position: relative;
}

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

/* Variables de colores con alto contraste */
:root {
  --accent-color: #d30000;          /* Rojo oscuro para mayor contraste con texto blanco */
  --accent-hover: #a80000;          /* Versión más oscura para hover */
  --text-on-dark: #ffffff;          /* Blanco para texto sobre fondos oscuros */
  --focus-outline: #ffd700;         /* Amarillo para outline de elementos con foco */
}

/* Botón Cotiza Ya con contraste mejorado */
.cta-button {
  background-color: var(--accent-color);
  color: var(--text-on-dark) !important;
  padding: 10px 20px !important;
  border-radius: 30px;
  font-weight: 700 !important;      /* Aumentado a 700 para mejor legibilidad */
  transition: all 0.3s ease;
  margin-left: 15px;
  box-shadow: 0 4px 8px rgba(211, 0, 0, 0.2);
  text-decoration: none;            /* Asegura que no haya subrayado que pueda dificultar la lectura */
  font-size: 16px;                  /* Tamaño de texto mínimo recomendado */
  display: inline-block;            /* Mejor comportamiento para enlaces como botones */
}

.cta-button:hover, 
.cta-button:focus {                 /* También aplicamos estilos al foco para accesibilidad */
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(211, 0, 0, 0.3);
  color: var(--text-on-dark) !important;
}

.cta-button:focus {
  outline: 3px solid var(--focus-outline);
  outline-offset: 2px;              /* Añade espacio alrededor del outline */
}

/* Efecto subrayado mejorado */
.nav-links li::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-links li:hover::after {
    width: 100%;
    left: 50%;
}

/* Menú hamburguesa mejorado */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    width: 28px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
    position: relative;
}

/* Animación hamburguesa mejorada */
.menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
    background-color: var(--primary-color);
}

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

.menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
    background-color: var(--primary-color);
}

/* Responsive mejorado */
@media (max-width: 992px) {
    .nav-links li {
        margin-left: 20px;
    }
    
    .cta-button {
        padding: 8px 16px !important;
        margin-left: 10px;
    }
}

@media (max-width: 768px) {
    .pre-header-content {
        flex-direction: column;
        gap: 10px;
        padding: 8px 5%;
    }
    
    .contact-info {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-icons {
        gap: 12px;
    }
    
    .nav-links {
        position: fixed;
        top: 120px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 100px);
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left 0.5s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 25px 0;
    }
    
    .nav-links a {
        font-size: 18px;
        padding: 12px 0;
    }
    
    .cta-button {
        margin-left: 0;
        margin-top: 10px;
    }

    .menu-toggle {
        display: block;
    }
}

/* Efectos de scroll */
.scrolled {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.scrolled .main-nav {
    padding: 10px 5%;
}

/* Animaciones suaves */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-links li {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

@media (max-width: 768px) {
    .contact-info{
        display: none;
    }  
}



.nav-links li:nth-child(1) { animation-delay: 0.1s; }
.nav-links li:nth-child(2) { animation-delay: 0.2s; }
.nav-links li:nth-child(3) { animation-delay: 0.3s; }
.nav-links li:nth-child(4) { animation-delay: 0.4s; }
.nav-links li:nth-child(5) { animation-delay: 0.5s; }