/* -------------------------------------- */
/* 0. RESET Y TIPOGRAFÍA */
/* -------------------------------------- */
:root {
    /* Paleta de Colores Cálidos */
    --color-rojo-calido: #CD5C5C; /* Rojo Indio */
    --color-dorado: #D4AF37;     /* Dorado */
    --color-crema: #FDF5E6;      /* Crema o Shell */
    --color-principal: #CD5C5C;
    --color-secundario: #D4AF37;
    --color-fondo: #FDF5E6;
    --color-texto-oscuro: #333;
    --color-texto-claro: #fff;
    --color-sombra: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--color-texto-oscuro);
    background-color: var(--color-fondo);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: var(--color-principal);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

a {
    text-decoration: none;
    color: var(--color-principal);
}

/* -------------------------------------- */
/* 1. COMPONENTES GLOBALES */
/* -------------------------------------- */
.section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    background-color: var(--color-secundario);
    color: var(--color-texto-claro);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #C0A030; /* Tono más oscuro de dorado */
}

/* -------------------------------------- */
/* 2. ENCABEZADO Y NAVEGACIÓN (FLEXBOX) */
/* -------------------------------------- */
.header {
    background-color: var(--color-rojo-calido);
    color: var(--color-texto-claro);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--color-sombra);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-texto-claro);
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-list li a {
    color: var(--color-texto-claro);
    padding: 0.5rem 1rem;
    display: block;
    transition: background-color 0.3s ease;
}

.nav-list li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.menu-toggle {
    display: none; /* Oculto en escritorio */
    background: none;
    border: none;
    color: var(--color-texto-claro);
    font-size: 1.5rem;
    cursor: pointer;
}

/* -------------------------------------- */
/* 3. SECCIÓN HERO (INICIO) */
/* -------------------------------------- */
.hero {
    background: url('https://via.placeholder.com/1600x600/C04000/FFFFFF?text=Fondo+Veterinaria') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-texto-claro);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4); /* Overlay oscuro */
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--color-texto-claro);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* -------------------------------------- */
/* 4. SECCIÓN DE SERVICIOS (FLEXBOX) */
/* -------------------------------------- */
.servicios-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.servicio-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--color-sombra);
    flex: 1 1 250px; /* Flexbox: crecer, encoger, base */
    min-width: 250px;
    text-align: center;
    transition: transform 0.3s ease;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--color-sombra);
}

.servicio-card h3 {
    color: var(--color-secundario);
    margin-bottom: 0.5rem;
}

/* -------------------------------------- */
/* 5. GALERÍA (GRID) */
/* -------------------------------------- */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.galeria-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--color-sombra);
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.galeria-item img:hover {
    transform: scale(1.05);
}

/* -------------------------------------- */
/* 6. RESERVAS (FORMULARIO) */
/* -------------------------------------- */
.reservas {
    background-color: #fcece0; /* Un tono más suave de crema/naranja */
}

.reserva-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--color-sombra);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--color-texto-oscuro);
}

.reserva-form input,
.reserva-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-submit {
    width: 100%;
    font-size: 1.1rem;
    padding: 1rem;
    margin-top: 1rem;
}

.error-message {
    color: var(--color-rojo-calido);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.status-message {
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 4px;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
}

/* -------------------------------------- */
/* 7. CONTACTO */
/* -------------------------------------- */
.contacto-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.contacto-info p {
    margin-bottom: 1rem;
}

.contacto-info i {
    color: var(--color-principal);
    margin-right: 10px;
}

/* -------------------------------------- */
/* 8. PIE DE PÁGINA */
/* -------------------------------------- */
.footer {
    background-color: var(--color-texto-oscuro);
    color: var(--color-texto-claro);
    text-align: center;
    padding: 1.5rem;
}

/* -------------------------------------- */
/* 9. CHATBOT */
/* -------------------------------------- */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    max-height: 400px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--color-sombra);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.chatbot-header {
    background-color: var(--color-principal);
    color: var(--color-texto-claro);
    padding: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.chatbot-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    border-bottom: 1px solid #eee;
}

.chatbot-input {
    display: flex;
    padding: 10px;
}

.chatbot-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 5px;
}

.chatbot-input button {
    background-color: var(--color-secundario);
    color: var(--color-texto-claro);
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.message {
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 10px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.bot {
    background-color: #f1f0f0;
    align-self: flex-start;
    border-top-left-radius: 3px;
    color: #333;
}

.message.user {
    background-color: var(--color-principal);
    color: var(--color-texto-claro);
    align-self: flex-end;
    margin-left: auto;
    border-top-right-radius: 3px;
}


/* -------------------------------------- */
/* 10. RESPONSIVE DESIGN (Media Queries) */
/* -------------------------------------- */
@media (max-width: 768px) {
    /* Menú Hamburguesa */
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Ajuste basado en la altura del header */
        left: 0;
        background-color: var(--color-rojo-calido);
        box-shadow: 0 4px 5px var(--color-sombra);
    }

    .nav.active {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .nav-list li {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .menu-toggle {
        display: block; /* Mostrar botón de menú */
    }

    /* Hero */
    .hero {
        height: 50vh;
    }
    .hero h1 {
        font-size: 2.5rem;
    }

    /* Servicios */
    .servicios-container {
        flex-direction: column;
    }

    .servicio-card {
        flex: 1 1 100%; /* Ocupa el ancho completo */
    }

    /* Galería */
    .galeria-grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }

    /* Secciones Generales */
    h2 {
        font-size: 2rem;
    }
    .section {
        padding: 3rem 1rem;
    }
}