/* ===================================
   CEDE - Centro de Especialidades en Desarrollo y Educación
   Design System & Styles
   =================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===================================
   CSS Variables - Design Tokens
   =================================== */
:root {
  /* Colors */
  --color-primary: #1a3a5c;
  --color-primary-dark: #0f2840;
  --color-secondary: #d4a84b;
  --color-secondary-light: #e8c67a;
  --color-accent: #2980b9;
  --color-text: #2c3e50;
  --color-text-light: #6c7a89;
  --color-white: #ffffff;
  --color-light: #f8f9fa;
  --color-dark: #1a1a2e;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(26, 58, 92, 0.9) 0%, rgba(15, 40, 64, 0.85) 100%);
  --gradient-gold: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 50px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 30px rgba(212, 168, 75, 0.3);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-white);
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

/* ===================================
   Accessibility
   =================================== */
/* Skip to main content link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  overflow: visible;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* Focus visible styles for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(212, 168, 75, 0.3);
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===================================
   Typography
   =================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1rem;
}

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

.text-italic {
  font-style: italic;
}

/* ===================================
   Utility Classes
   =================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section--dark {
  background: var(--gradient-primary);
  color: var(--color-white);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-white);
}

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

.section--gold {
  background: var(--gradient-gold);
}

/* ===================================
   Buttons
   =================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-normal);
}

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

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

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

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

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

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

/* ===================================
   Navigation
   =================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(26, 58, 92, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar__logo-icon {
  width: 50px;
  height: 50px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--color-secondary);
}

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

.navbar__logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
}

.navbar__logo-text span {
  display: block;
  font-size: 0.55rem;
  font-family: var(--font-body);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  max-width: 120px;
  line-height: 1.3;
}

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

.navbar__link {
  color: var(--color-white);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: var(--transition-normal);
}

.navbar__link:hover::after {
  width: 100%;
}

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

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

.navbar__toggle span {
  width: 25px;
  height: 2px;
  background: var(--color-white);
  transition: var(--transition-fast);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__background {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px);
  transform: scale(1.02);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
      rgba(26, 58, 92, 0.4) 0%,
      rgba(15, 40, 64, 0.35) 50%,
      rgba(26, 58, 92, 0.5) 100%);
}

.hero__content {
  text-align: center;
  color: var(--color-white);
  max-width: 900px;
  padding: var(--space-md);
  animation: fadeInUp 1s ease;
}

.hero__tagline {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  color: var(--color-white);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.hero__tagline .highlight {
  color: var(--color-secondary);
}

.hero__description {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  opacity: 0.7;
  animation: bounce 2s infinite;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ===================================
   Programs Section
   =================================== */
.programs {
  position: relative;
}

.programs__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.programs__header h2 {
  margin-bottom: var(--space-sm);
}

.programs__header p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

.programs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.program-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

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

.program-card__image {
  height: 200px;
  overflow: hidden;
}

.program-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.program-card:hover .program-card__image img {
  transform: scale(1.05);
}

.program-card__content {
  padding: var(--space-md);
}

.program-card__category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-light);
  color: var(--color-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

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

.program-card__description {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

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

.program-card__link:hover {
  color: var(--color-secondary);
  gap: 0.75rem;
}

/* ===================================
   Stats Section
   =================================== */
.stats {
  background: var(--gradient-gold);
  position: relative;
  overflow: hidden;
}

.stats::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--color-white);
  border-radius: 0 0 50% 50%;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  text-align: center;
  padding-top: var(--space-lg);
}

.stat-item {
  padding: var(--space-md);
}

.stat-item__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item__label {
  font-size: 0.95rem;
  color: var(--color-primary);
  font-weight: 500;
}

/* ===================================
   Why Choose Us Section
   =================================== */
.why-us {
  position: relative;
}

.why-us__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.why-us__content h2 {
  margin-bottom: var(--space-md);
}

.why-us__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature {
  display: flex;
  gap: 1.25rem;
}

.feature__icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: var(--gradient-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature__content h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary);
}

.feature__content p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin: 0;
}

.why-us__image {
  position: relative;
}

.why-us__image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.why-us__image::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--color-secondary);
  border-radius: var(--radius-lg);
  z-index: -1;
}

/* ===================================
   Testimonials Section
   =================================== */
.testimonials {
  background: var(--gradient-primary);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: rgba(212, 168, 75, 0.1);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.testimonials__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.testimonials__header h2 {
  color: var(--color-white);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-md);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-card__quote {
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--space-md);
  position: relative;
  padding-left: 1.5rem;
}

.testimonial-card__quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -0.5rem;
  font-size: 3rem;
  font-family: var(--font-heading);
  color: var(--color-secondary);
  opacity: 0.5;
}

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

.testimonial-card__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-secondary);
}

.testimonial-card__info h4 {
  font-size: 1rem;
  color: var(--color-white);
  margin-bottom: 0.125rem;
}

.testimonial-card__info p {
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0;
}

/* ===================================
   CTA Section
   =================================== */
.cta {
  background: var(--color-light);
  text-align: center;
}

.cta__content {
  max-width: 700px;
  margin: 0 auto;
}

.cta h2 {
  margin-bottom: var(--space-sm);
}

.cta p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.cta__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__brand p {
  color: rgba(255, 255, 255, 0.7);
  margin: var(--space-sm) 0;
  font-size: 0.95rem;
}

.footer__social {
  display: flex;
  gap: 1rem;
  margin-top: var(--space-sm);
}

.footer__social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.footer__social a:hover {
  background: var(--color-secondary);
  transform: translateY(-3px);
}

.footer__column h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer__links a:hover {
  color: var(--color-secondary);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer__bottom {
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin: 0;
}

.footer__bottom-links {
  display: flex;
  gap: 2rem;
}

.footer__bottom-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.footer__bottom-links a:hover {
  color: var(--color-secondary);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .why-us__grid {
    grid-template-columns: 1fr;
  }

  .why-us__image {
    order: -1;
  }
}

@media (max-width: 768px) {

  .navbar__menu,
  .navbar__actions .btn {
    display: none;
  }

  .navbar__toggle {
    display: flex;
  }

  .navbar__menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary);
    padding: var(--space-md);
    gap: 1rem;
  }

  .hero__tagline {
    font-size: 2.5rem;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__social {
    justify-content: center;
  }

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

@media (max-width: 480px) {
  .section {
    padding: var(--space-lg) 0;
  }

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

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