/*
  STYLE.CSS for DiseñoAR
  ---------------------------------
  Table of Contents:
  1.  :root Variables & Global Styles
  2.  Utility & Helper Classes
  3.  Header & Navigation
  4.  Hero Section
  5.  General Section & Layout Styling
  6.  Component Styles (Buttons, Cards, Forms)
  7.  Specific Section Styles
      - Methodology (Stats Grid)
      - Media/Courses (Carousel)
      - Gallery
      - Community
      - Clientele/Testimonials
      - External Resources
      - Contact Form
  8.  Footer
  9.  Specific Page Styles (Success, Legal)
  10. Animations & Transitions
  11. Media Queries (Responsiveness)
*/

/* 1. :root Variables & Global Styles
-------------------------------------------------- */
:root {
  /* Analogous Color Scheme (Eco-Minimalism Inspired) */
  --primary-color: #40916C; /* Deep, natural green */
  --secondary-color: #52B788; /* Lighter, vibrant green */
  --accent-color: #FFC300; /* Warm gold/yellow for highlights */
  --accent-color-dark: #e6b000;

  /* Text & Background Colors */
  --text-color-dark: #222222;
  --text-color-light: #F8F9FA;
  --text-color-muted: #555;
  --bg-color-light: #F8F9FA;
  --bg-color-dark: #121212;
  --border-color: rgba(0, 0, 0, 0.1);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-bg-darker: rgba(0, 0, 0, 0.2);
  --glass-blur: 10px;
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Work Sans', sans-serif;

  /* Spacing & Sizing */
  --header-height: 80px;
  --container-width: 1200px;
  --container-padding: 0 20px;
  --border-radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-color-dark);
  background-color: var(--bg-color-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--text-color-dark);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 3rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
  margin: 0 0 1rem 0;
  max-width: 75ch;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* 2. Utility & Helper Classes
-------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section {
  padding: 5rem 0;
}

.section-light {
  background-color: #ffffff;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 700;
}

.section-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem auto;
  color: var(--text-color-muted);
  font-size: 1.1rem;
}

.left-align {
  text-align: left;
}


/* 3. Header & Navigation
-------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  background-color: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color-light);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.header.scrolled .logo {
  color: var(--primary-color);
  text-shadow: none;
}

.main-nav .nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.main-nav .nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-color-light);
  padding: 0.5rem 0;
  position: relative;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.header.scrolled .nav-link {
  color: var(--text-color-dark);
  text-shadow: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

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

.burger-menu {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color-light);
  margin: 5px 0;
  transition: all 0.3s ease;
}
.header.scrolled .burger-menu span {
    background-color: var(--text-color-dark);
}

/* 4. Hero Section
-------------------------------------------------- */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color-light);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text-color-light);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--text-color-light);
  max-width: 800px;
  margin: 0 auto 2rem auto;
  opacity: 0.9;
}

/* 5. General Section & Layout Styling
-------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.community-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.community-image-container {
    flex: 1 1 45%;
}

.community-image-container img {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.community-content {
    flex: 1 1 55%;
}

.resources-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* 6. Component Styles (Buttons, Cards, Forms)
-------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  color: var(--text-color-light);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Cards */
.card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.card-content {
  padding: 1.5rem;
  flex-grow: 1; /* Allows content to take up remaining space */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-content h3 {
    margin-bottom: 0.75rem;
}

/* Forms */
.contact-form {
    padding: 2.5rem;
    max-width: 700px;
    margin: 2rem auto 0 auto;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-family: var(--font-heading);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.3);
}

.btn-submit {
    width: 100%;
}


/* 7. Specific Section Styles
-------------------------------------------------- */

/* Methodology (Stats Grid) */
.stat-widget {
  padding: 2rem;
  text-align: center;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}

/* Courses Carousel */
.content-carousel-wrapper {
  position: relative;
}
.content-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 85%;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1.5rem; /* For scrollbar */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.content-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.course-card .card-content {
  text-align: left;
  align-items: flex-start;
}

.course-meta {
  margin-top: auto; /* Push to bottom */
  padding-top: 1rem;
  color: var(--text-color-muted);
  font-size: 0.9rem;
}
.course-meta span {
    margin-right: 1.5rem;
}

/* Gallery */
.gallery-item {
  overflow: hidden;
  border-radius: var(--border-radius);
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  cursor: pointer;
}
.gallery-item:nth-child(3) {
    grid-row: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}

/* Testimonials */
.testimonial-card {
    padding: 2rem;
    text-align: left;
    border: none;
}
.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
.author-name {
    display: block;
    font-weight: 600;
    font-family: var(--font-heading);
}
.author-role {
    font-size: 0.9rem;
    color: var(--text-color-muted);
}

/* External Resources */
.resource-card {
    display: block;
    padding: 1.5rem;
    color: var(--text-color-dark);
    text-decoration: none;
    border-left: 5px solid var(--primary-color);
}
.resource-card:hover {
    border-left-color: var(--accent-color);
}
.resource-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
}
.resource-card p {
    color: var(--text-color-muted);
    margin-bottom: 0.5rem;
}
.resource-url {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* 8. Footer
-------------------------------------------------- */
.footer {
  background-color: #1a1a1a;
  color: #a0a0a0;
  padding: 4rem 0 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
}

.footer-title {
  font-size: 1.2rem;
  color: var(--text-color-light);
  margin-bottom: 1.5rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 0.8rem;
}

.footer-list a {
  color: #a0a0a0;
}

.footer-list a:hover {
  color: var(--text-color-light);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
}


/* 9. Specific Page Styles (Success, Legal)
-------------------------------------------------- */
.success-page, .legal-page {
    padding-top: var(--header-height);
}

.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    text-align: center;
    background-color: var(--bg-color-light);
}

.success-container h1 {
    color: var(--primary-color);
    font-size: 3rem;
}

.legal-content {
    padding: 3rem 0;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* 10. Animations & Transitions
-------------------------------------------------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 11. Media Queries (Responsiveness)
-------------------------------------------------- */

/* Tablets & Small Desktops */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .content-carousel {
        grid-auto-columns: 90%;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .main-nav.is-active {
    display: flex;
  }

  .main-nav .nav-list {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .main-nav .nav-link {
    font-size: 1.5rem;
    color: var(--text-color-light);
    text-shadow: none;
  }

  .burger-menu {
    display: block;
  }
  
  .burger-menu.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .burger-menu.is-active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .burger-menu.is-active span {
    background-color: var(--text-color-light);
  }

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

  .community-content {
      text-align: left;
  }
  
  .footer-grid {
      grid-template-columns: 1fr;
      text-align: center;
  }

  .content-carousel {
    grid-auto-columns: 100%;
  }

  .gallery-item:nth-child(3) {
    grid-row: auto;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.1rem);
  }
}