/*
Paleta de Colores "Amanecer en Málaga"
-----------------------------------------
Principal (Naranja Intenso): #FF8C42 - Un naranja vibrante que recuerda al sol intenso.
Acento (Amarillo Suave): #FFD34E - Un amarillo cálido como los primeros rayos de sol.
Fondo Claro: #FFF8F0 - Un blanco roto muy cálido, casi un beige muy claro.
Texto Principal: #333333 - Un gris oscuro para una buena legibilidad.
Gris Suave (Bordes/Fondos secundarios): #F0F0F0
Color de Bootstrap Primario (modificado): Usaremos el Naranja Principal.
*/

:root {
  --color-primary: #ff8c42; /* Naranja Intenso */
  --color-accent: #ffd34e; /* Amarillo Suave */
  --color-light-bg: #fff8f0; /* Fondo Claro Cálido */
  --color-text: #333333;
  --color-grey-bg: #f8f9fa; /* bg-light de Bootstrap */
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--color-text);
  background-color: var(--color-light-bg);
}

/* --- Componentes de Bootstrap Personalizados --- */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: #e67e3a;
  border-color: #e67e3a;
}

.btn-secondary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.btn-secondary:hover {
  background-color: #e6b845;
  border-color: #e6b845;
}

.navbar-light .navbar-nav .nav-link.active,
.navbar-light .navbar-nav .show > .nav-link {
  color: var(--color-primary);
  font-weight: bold;
}

.accordion-button:not(.collapsed) {
  color: var(--color-text);
  background-color: rgba(255, 211, 78, 0.2); /* Acento con transparencia */
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(255, 140, 66, 0.25); /* Sombra con color primario */
}

/* --- Estilos Generales --- */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("../imagenes/banner1.webp") no-repeat center center;
  background-size: cover;
  min-height: 60vh;
}

.hero-section h1 {
  font-weight: 700;
  color: white;
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.9);
}

/* --- Barra de Navegación --- */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  font-weight: bold;
  color: var(--color-primary) !important;
}
.navbar-brand img {
  height: 50px;
}
/* --- Sección Testimonios --- */
#testimonios {
  background-color: var(--color-grey-bg);
}

.testimonial-card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  border: 1px solid #eee;
  height: 100%;
}

.testimonial-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--color-accent);
}

/* --- Sección Equipo --- */
.team-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  text-align: center;
  padding: 2rem;
  border: 1px solid #eee;
  height: 100%;
}

.team-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 4px solid var(--color-primary);
}

.team-name {
  color: var(--color-primary);
  font-weight: bold;
}

.team-role {
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.team-bio {
  font-size: 0.9rem;
  color: #666;
}

/* --- Botón Ir Arriba --- */
.btn-scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.btn-scroll-top:hover {
  background-color: #e67e3a;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-scroll-top.show {
  opacity: 1;
  visibility: visible;
}

/* --- Formulario de Contacto --- */
.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
  display: block;
  font-size: 0.875em;
  color: #dc3545;
}

.valid-feedback {
  display: block;
  font-size: 0.875em;
  color: #28a745;
}

#form-messages {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

#form-messages.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

#form-messages.alert-danger {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.submit-loading {
  display: none;
}

#submitBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Banner de Cookies GDPR --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(51, 51, 51, 0.98);
  color: white;
  padding: 1.5rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

#cookie-banner.show {
  transform: translateY(0);
}

#cookie-banner .cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

#cookie-banner .cookie-text {
  flex: 1;
  min-width: 300px;
}

#cookie-banner .cookie-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

#cookie-banner .cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

#cookie-banner .btn {
  white-space: nowrap;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

#cookie-banner .btn-accept {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

#cookie-banner .btn-accept:hover {
  background-color: #e67e3a;
  border-color: #e67e3a;
}

#cookie-banner .btn-configure {
  background-color: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

#cookie-banner .btn-configure:hover {
  background-color: var(--color-accent);
  color: var(--color-text);
}

#cookie-banner .btn-reject {
  background-color: transparent;
  border: 1px solid #6c757d;
  color: #6c757d;
}

#cookie-banner .btn-reject:hover {
  background-color: #6c757d;
  color: white;
}

/* Modal de configuración de cookies */
.cookie-modal .modal-content {
  border-radius: 10px;
}

.cookie-modal .modal-header {
  background-color: var(--color-primary);
  color: white;
  border-radius: 10px 10px 0 0;
}

.cookie-modal .modal-header .btn-close {
  filter: invert(1);
}

.cookie-category {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.cookie-category-header {
  background-color: #f8f9fa;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cookie-category-content {
  padding: 1rem;
}

.cookie-category h6 {
  margin: 0;
  color: var(--color-primary);
}

.cookie-category p {
  margin: 0.5rem 0 0 0;
  font-size: 0.875rem;
  color: #6c757d;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .cookie-slider {
  background-color: var(--color-primary);
}

input:checked + .cookie-slider:before {
  transform: translateX(26px);
}

.cookie-slider.disabled {
  background-color: #28a745;
  cursor: not-allowed;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  #cookie-banner .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  #cookie-banner .cookie-actions {
    justify-content: center;
    width: 100%;
  }

  #cookie-banner .btn {
    flex: 1;
    min-width: 100px;
  }
}

/* --- Footer --- */
footer a.text-white-50:hover {
  color: var(--color-accent) !important;
}

/* --- Tawk.to Chat Customization --- */
/* Personalización del widget de chat cuando esté cargado */

/* Opcional: Añadir animación suave al aparecer el chat */
#tawk-bubble {
  transition: all 0.3s ease-in-out !important;
}

/* Personalizar el color del botón flotante del chat (si es posible) */
/* Nota: Tawk.to permite personalizar colores desde su dashboard */
/* Estos estilos son para casos específicos donde necesites override */

.tawk-chat-panel {
  font-family: "Roboto", sans-serif !important;
}

/* Personalización para dispositivos móviles */
@media (max-width: 768px) {
  /* Asegurar que el chat no interfiera con el botón de scroll */
  .btn-scroll-top {
    right: 80px !important; /* Mover el botón de scroll cuando el chat esté presente */
  }
}

/* Animación personalizada para cuando el chat se abre */
@keyframes tawk-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Clase para el estado de chat disponible */
.chat-available::before {
  content: "💬 Chat disponible";
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--color-primary);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  z-index: 999999;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}
