/* style.css - Unique design for Centro Dulce Vital (Diabetes courses in Spain) */

/* Root variables define our color palette, fonts and global settings */
:root {
  --primary-color: #0f4c5c;      /* Deep teal for navigation and headings */
  --secondary-color: #e98a15;    /* Warm orange for accents and buttons */
  --light-bg: #fdf6e3;           /* Soft beige background to reduce glare */
  --dark-color: #16324f;         /* Dark navy for text */
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Roboto', sans-serif;
  --border-radius: 8px;
}

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

body {
  font-family: var(--body-font);
  color: var(--dark-color);
  background-color: var(--light-bg);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

/* Header styles */
header {
  background-color: var(--primary-color);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

header nav a {
  color: #fff;
  font-weight: 500;
  transition: color 0.3s;
}

header nav a:hover {
  color: var(--secondary-color);
}

/* Hero section with background image and overlay */
.hero {
  position: relative;
  background-image: url('../img/hero.jpg');
  background-size: cover;
  background-position: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  /* Semi‑transparent overlay to improve text contrast */
  background: rgba(15, 76, 92, 0.5);
}

.hero-content {
  position: relative;
  color: #fff;
  max-width: 700px;
  padding: 2rem;
}

.hero-content h1 {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.3s, color 0.3s;
}

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

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

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

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

/* Generic section styling */
section {
  padding: 4rem 1.5rem;
}

.section-title {
  font-family: var(--heading-font);
  font-size: 2rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 2rem;
}

/* About section */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.about p {
  max-width: 800px;
  font-size: 1rem;
  text-align: center;
}

/* Courses section */
.courses {
  background-color: #f7f0e0;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.course-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.course-card p {
  font-size: 0.95rem;
  flex-grow: 1;
}

.course-card .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0.5rem 0;
}

.course-card .btn {
  align-self: flex-start;
}

/* Benefits section */
.benefits {
  background-color: #e8f5f8;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.benefit-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  text-align: center;
}

.benefit-card h4 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.benefit-card p {
  font-size: 0.9rem;
}

/* Ingredients section */
.ingredients {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.ingredients-img {
  width: 100%;
  max-width: 500px;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.ingredients-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ingredients-text {
  max-width: 500px;
}

.ingredients-text p {
  font-size: 1rem;
}

/* Mentor section */
.mentor {
  background-color: #f2f7fa;
}

.mentor-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.mentor-grid img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
}

.mentor-grid .mentor-info {
  text-align: center;
  max-width: 600px;
}

.mentor-grid .mentor-info h3 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.mentor-grid .mentor-info p {
  font-size: 0.95rem;
}

/* FAQ section */
.faq {
  background-color: #fff9ed;
}

.faq-item {
  margin-bottom: 1.5rem;
}

.faq-item h4 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}

.faq-item p {
  font-size: 0.9rem;
}

/* Form sections */
.form-section {
  background-color: #e8f0f7;
}

form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.3rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

form button {
  background-color: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

form button:hover {
  background-color: #cf7a12;
}

/* Newsletter section */
.newsletter {
  background-color: #f7f9fa;
}

.newsletter form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.newsletter form input[type="email"] {
  width: 100%;
  max-width: 400px;
}

.newsletter .checkbox-group {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Footer styles */
footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 2rem 1.5rem;
}

footer .footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

footer .footer-content .footer-section {
  flex: 1 1 200px;
}

footer h4 {
  font-family: var(--heading-font);
  margin-bottom: 0.5rem;
}

footer a {
  color: #ffd28c;
}

footer a:hover {
  color: #fff;
}

footer p {
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .courses-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .ingredients {
    flex-direction: column;
  }
  .mentor-grid {
    flex-direction: column;
  }
  header nav ul {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}