/**
 * ============================================
 * ESTILOS PRINCIPALES DEL SITIO
 * Sistema de repuestos de tractores
 * ============================================
 */

/* ============================================
   RESET Y CONFIGURACIÓN BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales */
    --primary-color: #21618C;
    --primary-dark: #2876a9;
    --secondary-color: #308FCF;
    --accent-color: #e74c3c;
    
    /* Colores de fondo */
    --bg-light: #f8f9fa;
    --bg-dark: #273746;
    
    /* Colores de texto */
    --text-dark: #333;
    --text-light: #666;
    --text-white: #fff;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    
    /* Transiciones */
    --transition: all 0.3s ease;
    
    /* Tamaños */
    --header-height: 70px;
    --container-max-width: 1200px;
}

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

/* Contenedor principal */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 15px;
}

/* Títulos de sección */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
}

/* ============================================
   ENCABEZADO Y NAVEGACIÓN
   ============================================ */
.header {
    background-color: var(--bg-dark);
    color: var(--text-white);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-white);
}

.logo img {
    width: 60px;
    height: 45px;
}

img{
    width: 100%;
    height: auto;
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Navegación */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-list a:hover,
.nav-list a.active {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Botón menú móvil */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-white);
    transition: var(--transition);
}

/* ============================================
   SECCIÓN HERO
   ============================================ */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    overflow: hidden;
}

/* Overlay con imagen de fondo y capa oscura para legibilidad */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Capa oscura sobre la imagen para mejorar legibilidad del texto */
.hero-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: #21618C;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
}

.btn-secondary:hover {
    background-color: var(--text-white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ============================================
   SECCIÓN DE CARACTERÍSTICAS
   ============================================ */
.features {
    padding: 5rem 0;
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    transition: var(--transition);
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    border-radius: 50%;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   SECCIÓN DE MARCAS
   ============================================ */
.brands {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

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

.brand-item {
    background-color: white;
    padding: 2rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.brand-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Estilos para logos de marcas */
.brand-logo {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Efecto gris por defecto */
    filter: grayscale(100%) brightness(1.2);
    transition: all 0.4s ease;
}

/* Efecto hover: quitar gris y mostrar color */
.brand-item:hover .brand-logo {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

/* Para navegadores que no soporten filter */
@supports not (filter: grayscale(100%)) {
    .brand-logo {
        opacity: 0.6;
    }
    
    .brand-item:hover .brand-logo {
        opacity: 1;
    }
}

/* ============================================
   LLAMADO A LA ACCIÓN (CTA)
   ============================================ */
.cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--text-white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ============================================
   PIE DE PÁGINA
   ============================================ */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

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

.footer-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-list a {
    color: var(--text-white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-list a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-list i {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/*.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
}*/
/* Sección inferior del footer */
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-credits {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.company-info {
    flex: 1;
    text-align: left;
}

.company-info p {
    margin: 0.5rem 0;
}

.footer-tagline {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Crédito del desarrollador */
.developer-credit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.developer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.developer-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Opción 1: Logo/Imagen */
.developer-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 2px;
}


/* ============================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
    text-decoration: none;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128C7E;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* ============================================
   RESPONSIVE - TABLETS
   ============================================ */
@media (max-width: 768px) {
    /* Menú hamburguesa visible */
    .menu-toggle {
        display: flex;
    }
    
    /* Navegación móvil */
    .nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--bg-dark);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav.active {
        max-height: 400px;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .nav-list li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-list a {
        display: block;
        padding: 1rem 2rem;
    }
    
    /* Hero más pequeño */
    .hero {
        height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* ============================================
   RESPONSIVE - MÓVILES
   ============================================ */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}