/* ===================================
   Programación Fácil - Modern Stylesheet
   =================================== */

/* === CSS Variables === */
:root {
  --primary-color: #0066ff;
  --secondary-color: #00ccff;
  --dark-color: #1a1a2e;
  --light-color: #f5f7fa;
  --text-color: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00ccff 100%);
  --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --max-width: 1200px;
}

/* === Reset & Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

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

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

ul, ol {
  list-style: none;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

/* === Container === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* === Header & Navigation === */
.header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

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

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.header__logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.header__menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.header__menu-link {
  font-weight: 500;
  color: var(--text-color);
  position: relative;
  padding: 0.5rem 0;
}

.header__menu-link:hover {
  color: var(--primary-color);
}

.header__menu-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
  pointer-events: none;
}

.header__menu-link:hover::after {
  width: 100%;
}

.header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.header__menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--dark-color);
  border-radius: 2px;
  transition: var(--transition);
}

/* === Hero Section === */
.hero {
  position: relative;
  background: var(--gradient-dark);
  color: var(--white);
  padding: 6rem 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/img_924589ad.jpg') center/cover no-repeat;
  opacity: 0.2;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero__title {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero__subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

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

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

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

.section--light {
  background: var(--light-color);
}

.section__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section__title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
}

/* === Grid === */
.grid {
  display: grid;
  gap: 2rem;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === Cards === */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card__content {
  padding: 1.5rem;
}

.card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card__text {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card__link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card__link:hover {
  gap: 0.75rem;
}

.card__link::after {
  content: '→';
  transition: var(--transition);
  pointer-events: none;
}

/* === Service Cards === */
.service-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-card__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--white);
}

.service-card__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card__text {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* === Team Cards === */
.team-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.team-card__image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.team-card__content {
  padding: 1.5rem;
}

.team-card__name {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.team-card__role {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.team-card__bio {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* === Features === */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature__icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.feature__title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature__text {
  color: var(--text-light);
}

/* === Stats === */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat {
  padding: 2rem;
}

.stat__number {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat__label {
  font-size: 1.125rem;
  color: var(--text-light);
}

/* === Testimonials === */
.testimonial {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  position: relative;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 4rem;
  color: var(--primary-color);
  opacity: 0.2;
  line-height: 1;
  pointer-events: none;
}

.testimonial__text {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  position: relative;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.testimonial__author-name {
  font-weight: 600;
}

.testimonial__author-role {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* === Forms === */
.form {
  max-width: 600px;
  margin: 0 auto;
}

.form__group {
  margin-bottom: 1.5rem;
}

.form__label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-color);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form__textarea {
  resize: vertical;
  min-height: 150px;
}

.form__submit {
  width: 100%;
}

.form__error {
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* === Contact Info === */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-item {
  display: flex;
  align-items: start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.contact-item__icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  flex-shrink: 0;
}

.contact-item__title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-item__text {
  color: var(--text-light);
}

/* === Map === */
.map {
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* === Blog === */
.blog-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.blog-card__image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.blog-card__content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.blog-card__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.blog-card__excerpt {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card__link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-card__link:hover {
  gap: 0.75rem;
}

.blog-card__link::after {
  content: '→';
  transition: var(--transition);
  pointer-events: none;
}

/* === Article === */
.article {
  max-width: 800px;
  margin: 0 auto;
}

.article__header {
  margin-bottom: 2rem;
}

.article__featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.article__meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.article__title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.article__excerpt {
  font-size: 1.25rem;
  color: var(--text-light);
}

.article__content {
  line-height: 1.8;
}

.article__content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article__content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article__content p {
  margin-bottom: 1.5rem;
}

.article__content ul,
.article__content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article__content li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

.article__content ol li {
  list-style: decimal;
}

/* === Footer === */
.footer {
  background: var(--dark-color);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

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

.footer__section-title {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer__text {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__link {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer__link:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* === Cookie Banner === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark-color);
  color: var(--white);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

.cookie-banner__content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  min-width: 250px;
}

.cookie-banner__actions {
  display: flex;
  gap: 1rem;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .section__title {
    font-size: 2rem;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero {
    padding: 4rem 0;
  }

  .header__menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: var(--transition);
  }

  .header__menu.active {
    transform: translateX(0);
  }

  .header__menu-toggle {
    display: flex;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .hero__cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .article__featured-image {
    height: 250px;
  }

  .article__title {
    font-size: 1.75rem;
  }

  .cookie-banner__content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner__actions {
    width: 100%;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .section {
    padding: 3rem 0;
  }

  .hero {
    padding: 3rem 0;
  }

  .card__content,
  .service-card,
  .team-card__content {
    padding: 1rem;
  }
}
