/*
 * Stylesheet for Perfil.cl website
 *
 * This file defines all of the base styles, layout rules and
 * responsive behaviours used throughout the Perfil.cl site. The
 * goal of the design is to create a clean, modern interface that
 * emphasises readability and warmth. Colours were inspired by
 * shades found in the generated imagery and can be easily
 * adjusted via the CSS variables defined at the root of the
 * document.
 */

/* CSS Variables provide a centralised palette and typographic
   definitions. Update these values to fine‑tune the appearance
   of the entire site. */
:root {
  --primary-color: #6C63FF;      /* a friendly purple tone */
  --secondary-color: #FF8A5B;    /* warm orange accent */
  --tertiary-color: #FFC15E;     /* soft golden highlight */
  --dark-color: #222222;         /* near‑black for headings */
  --light-color: #F9F9FB;        /* pale grey for backgrounds */
  --text-color: #444444;         /* general body text colour */
  --heading-font: 'Poppins', sans-serif;
  --body-font: 'Open Sans', sans-serif;
  --container-width: 1200px;
  --transition-speed: 0.3s;
}

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

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--primary-color);
}

/* Container for limiting content width */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 2rem 0;
}

/* Navigation bar */
header {
  background-color: var(--light-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.logo img {
  height: 40px;
  width: 40px;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav li {
  position: relative;
}

nav a {
  font-family: var(--body-font);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem;
  transition: color var(--transition-speed);
}

nav a:hover, nav a.active {
  color: var(--primary-color);
}

/* Mobile navigation toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--dark-color);
  margin: 4px 0;
  transition: transform var(--transition-speed);
}

/* Hero section */
.hero {
  /* Use the custom hero illustration that conveys crecimiento personal y profesional.
     The semi‑transparent gradient overlays the image, but keep it light to allow
     the illustration to be visible. */
  background-image: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)), url('../assets/hero_custom.png');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  /* Ensure the hero occupies at least 60% of the viewport height to separate it visually
     from subsequent sections. */
  min-height: 60vh;
}

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

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}
.btn-primary:hover {
  background-color: var(--secondary-color);
  color: white;
}

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

/* Section headings */
section {
  padding: 4rem 0;
}

section h2 {
  font-family: var(--heading-font);
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--dark-color);
}

section p.lead {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem auto;
}

/* About/Quiénes Somos section */
.about {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.about .about-text {
  flex: 1 1 300px;
}
.about .about-image {
  flex: 1 1 300px;
  text-align: center;
}
.about .about-image img {
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Services section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background-color: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.service-card img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: 8px;
}

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

.service-card p {
  flex-grow: 1;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.service-card .price {
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.service-card a.btn {
  align-self: stretch;
  text-align: center;
}

/* Blog section */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.blog-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.blog-card .blog-content {
  padding: 1.2rem;
  flex-grow: 1;
}
.blog-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.blog-card p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #666;
}
.blog-card .read-more {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: underline;
}

/* Testimonials section */
.testimonials {
  background-color: #fff;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.testimonial-card {
  background-color: var(--light-color);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}
.testimonial-card:before {
  content: '“';
  font-size: 3rem;
  color: var(--primary-color);
  position: absolute;
  top: -15px;
  left: -5px;
}
.testimonial-card p {
  margin-bottom: 1rem;
  font-style: italic;
}
.testimonial-card .author {
  font-weight: 700;
  color: var(--primary-color);
}

/* CTA final section */
.cta {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 4rem 1rem;
  border-radius: 0;
}
.cta h2 {
  color: white;
  margin-bottom: 1rem;
}
.cta p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.cta .btn-group .btn-secondary {
  background-color: transparent;
  color: white;
  border-color: white;
}
.cta .btn-group .btn-secondary:hover {
  background-color: white;
  color: var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: #bbb;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}
footer a {
  color: var(--secondary-color);
}

/* Contact page styles */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}
.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.contact-form button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color var(--transition-speed);
}
.contact-form button:hover {
  background-color: var(--secondary-color);
}

/* Blog page styles */
.article {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
  line-height: 1.8;
}
.article h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}
.article h2 {
  font-size: 1.6rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.article p {
  margin-bottom: 1rem;
  text-align: justify;
}
.article ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.article li {
  margin-bottom: 0.5rem;
}

/* Responsive behaviours */
@media (max-width: 768px) {
  .nav-wrapper nav ul {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--light-color);
    flex-direction: column;
    align-items: flex-start;
    width: 200px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
  }
  .nav-wrapper nav ul.open {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
}
