/* --- Variables y Reset --- */
:root {
    --primary-color: #0056b3; /* Azul profesional */
    --secondary-color: #f8f9fa; /* Gris muy claro */
    --accent-color: #ffc107; /* Amarillo para llamadas a la acción */
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

h1, h2, h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-color), #003366);
    color: var(--white);
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.4);
}

.btn--secondary {
    background-color: #6c757d;
    color: var(--white);
    transition: background-color 0.3s;
}

.btn--secondary:hover {
    background-color: #5a6268;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, var(--primary-color), #002855);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Header & Navegación --- */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header--scrolled {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Sombra más pronunciada */
}

.header__nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header__nav {
    display: flex;
    gap: 30px;
}

.header__nav-link {
    font-weight: 600;
    color: var(--text-dark);
}

.header__nav-link:hover {
    color: var(--primary-color);
}

.header__hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 86, 179, 0.8), rgba(0, 40, 85, 0.8)), url('img reparaciones 1.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    margin-top: 80px; /* Offset for fixed header */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Servicios --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* --- Lista de Modelos (Display) --- */
.models-section {
    background-color: var(--secondary-color);
}

.models-container {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    max-height: 500px; /* Altura máxima con scroll */
    overflow-y: auto;
    border: 1px solid #eee;
}

.models-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.models-list li {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.models-list li i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 0.8rem;
}

/* --- Buscador de Modelos --- */
.search-container {
    max-width: 600px;
    margin: 0 auto 20px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    padding-right: 50px;
    border: 2px solid #eee;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-container input:focus {
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.1rem;
}

/* --- Precios Display --- */
.pricing-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.price-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #eee;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.price-card:hover {
    transform: translateY(-5px);
}

.price-card.featured {
    border: none;
    background-color: #f0f7ff;
    position: relative;
    overflow: hidden;
}

.price-card.featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 15px 0;
}

/* --- Por qué elegirnos (Features) --- */
.features {
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* --- Contacto --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.info-item i {
    margin-right: 15px;
    color: var(--primary-color);
    width: 20px;
}

.contact-form {
    background: var(--secondary-color);
    padding: 40px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* --- Footer --- */
footer {
    background-color: #222;
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.social-links a:hover {
    transform: translateY(-5px);
}

.fa-facebook { color: #1877F2; }
.fa-whatsapp { color: #25D366; }

.fa-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
}

/* --- Chatbot Widget --- */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

.chat-button {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--primary-color), #003366);
    color: var(--white);
    border-radius: 50%;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.chat-button i {
    color: var(--accent-color); /* Cambia esto por el color que prefieras, ej: #ffc107 o gold */
}

.chat-button:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 86, 179, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 86, 179, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 86, 179, 0); }
}

.chat-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 360px;
    height: 500px;
    background-color: #f0f2f5;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none; /* Oculto por defecto */
    flex-direction: column;
    overflow: hidden;
    border: none;
    transform-origin: bottom right;
}

.chat-window.active {
    display: flex;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), #004494);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-status {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #4cd137;
    border-radius: 50%;
}

.chat-header button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chat-header button:hover {
    background: rgba(255,255,255,0.3);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.bot {
    background-color: var(--white);
    color: var(--text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #e4e6eb;
    display: flex;
    gap: 10px;
    background-color: var(--white);
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    background-color: #f0f2f5;
    transition: 0.3s;
}

.chat-input-area input:focus {
    background-color: var(--white);
    border-color: var(--primary-color);
}

.chat-input-area button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.chat-input-area button:hover {
    transform: scale(1.1);
}

/* --- Botones de opciones en el chat --- */
.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    align-self: flex-start;
}

.chat-option-btn {
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-option-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- Typing Indicator --- */
.typing-indicator {
    background-color: var(--white);
    padding: 15px 20px;
    border-radius: 20px;
    border-bottom-left-radius: 2px;
    width: fit-content;
    margin-bottom: 10px;
    display: none; /* Oculto por defecto */
    align-items: center;
    gap: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.typing-indicator span {
    display: block;
    width: 8px;
    height: 8px;
    background-color: #888;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .header__nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .header__nav--active {
        display: flex;
    }

    .header__hamburger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    .chat-window {
        width: 90vw;
        right: 0;
        bottom: 80px;
    }
}

/* --- Estilos de Impresión --- */
.print-only { display: none; }

@media print {
    .no-print { display: none !important; }
    .print-only { display: block !important; }
}