/*
 * Estilos para el sitio de Canal Traducciones.
 * La paleta se inspira en el logotipo proporcionado: tonos de azul oscuro y azul claro.
 */
 :root {
  --color-primary: #0a3b5c;  /* azul oscuro del logo */
  --color-secondary: #6da7c1; /* azul claro del logo */
  --color-accent: #00a6c7;   /* acento turquesa */
  --color-text: #0d2b44;
  --color-background: #f9f9f9;
 }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  background: var(--color-background);
  color: var(--color-text);
}

h1, h2, h3, h4 {
  color: var(--color-primary);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  /* Añadimos una imagen de diccionarios como fondo y aplicamos un degradado para mantener la legibilidad */
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0,0,0,0.6) 100%), url('images/dictionaries.png') no-repeat center/cover;
  color: #fff;
  text-align: center;
  padding: 5rem 1rem 8rem;
  position: relative;
}

.hero .logo {
  width: 120px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #e3eef5;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}

.btn.primary {
  background: var(--color-accent);
  color: #fff;
}

.btn.secondary {
  background: var(--color-primary);
  color: #fff;
}

.btn:hover {
  transform: translateY(-3px);
}

/* Floating language and social buttons */
#floating-buttons {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

#floating-buttons button {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#floating-buttons .social {
  background: var(--color-primary);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
}

#floating-buttons .social:hover {
  background: var(--color-accent);
}

/* Aseguramos que los iconos dentro de los botones flotantes se ajusten correctamente. */
#floating-buttons .social img {
  width: 22px;
  height: 22px;
}

/* About Section */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 450px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.about-text {
  max-width: 600px;
  font-size: 1.1rem;
  text-align: justify;
}

@media(min-width: 768px) {
  .about-content {
    flex-direction: row;
    align-items: center;
  }
  .about-image, .about-text {
    flex: 1;
  }
  .about-text {
    padding-left: 2rem;
  }
}

/* Accordion (Services) */
.accordion details {
  border: 1px solid var(--color-secondary);
  border-radius: 4px;
  margin-bottom: 1rem;
  background: #fff;
  overflow: hidden;
}

.accordion summary {
  padding: 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  font-size: 1rem;
  background: var(--color-secondary);
  color: #fff;
}

.accordion summary .emoji {
  margin-right: 0.5rem;
}

.accordion details[open] summary {
  background: var(--color-primary);
}

.detail-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f5fafe;
}

.detail-content img {
  width: 100%;
  max-width: 300px;
  border-radius: 4px;
}

.detail-content p {
  flex: 1;
  font-size: 0.95rem;
  margin: 0;
}

@media(min-width: 600px) {
  .detail-content {
    flex-direction: row;
    align-items: center;
  }
}

/* Courses Section */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.course-card img {
  width: 100%;
  max-width: 200px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.course-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.course-card p {
  font-size: 0.9rem;
  color: var(--color-text);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: #fff;
  border-left: 6px solid var(--color-accent);
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.testimonial-card h4 {
  margin-top: 0.5rem;
  color: var(--color-primary);
}

.testimonial-card span {
  font-size: 0.85rem;
  color: var(--color-secondary);
}

/* Discount Section */
.discount {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background: var(--color-secondary);
  color: #fff;
  text-align: center;
}

.discount h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.discount-container {
  position: relative;
  height: 200px;
}

/* Rain effect */
.rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.raindrop {
  position: absolute;
  width: 20px;
  height: 20px;
  background-image: url('images/CT CT.jpg');
  background-size: cover;
  opacity: 0.8;
  animation: fall linear infinite;
}

@keyframes fall {
  0% { transform: translateY(-50px); opacity: 1; }
  100% { transform: translateY(250px); opacity: 0; }
}

.discount-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Ajustamos el fondo para mayor contraste y la letra blanca para legibilidad */
  background: rgba(0, 0, 0, 0.8);
  padding: 2rem;
  border-radius: 8px;
  color: #fff;
  width: 80%;
  max-width: 500px;
}

.discount-message p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Quote Form */
.quote form {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
}

footer {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  padding: 1rem;
}

/* Espaciado para los botones de servicio dentro de los detalles. */
.detail-content .service-btn {
  margin-top: 0.5rem;
  display: inline-block;
}

/* Estilo para los botones de inscripción en las tarjetas de cursos. */
.course-card .enroll-btn {
  margin-top: 0.5rem;
  display: inline-block;
}

footer p {
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (min-width: 900px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1.3rem;
  }
}