/*
  File: style.css
  Project: Cursos de Diseño en Colombia
  Design System: Retro / Adaptable Typography
  Color Scheme: Monochrome
  Animation Style: Bouncy Animations
*/

/*--------------------------------------------------------------
# 1. CSS Variables
--------------------------------------------------------------*/
:root {
  /* Colors - Monochrome Palette */
  --primary-color: #0d6efd; /* Bootstrap primary for key actions */
  --dark-color: #1a1a1a;
  --dark-gray-color: #333333;
  --medium-gray-color: #6c757d;
  --light-gray-color: #f8f9fa;
  --white-color: #ffffff;

  /* Fonts */
  --font-primary: 'Raleway', sans-serif;
  --font-secondary: 'Open Sans', sans-serif;

  /* Transitions */
  --transition-speed: 0.4s;
  --transition-elastic: cubic-bezier(0.68, -0.55, 0.27, 1.55);

  /* Spacing */
  --section-padding: 5rem 0;
}

/*--------------------------------------------------------------
# 2. Global Styles
--------------------------------------------------------------*/
body {
  font-family: var(--font-secondary);
  color: var(--dark-gray-color);
  background-color: var(--white-color);
  line-height: 1.7;
}

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

.section-title {
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--dark-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: none;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-speed) ease-in-out;
}

a:hover {
  color: var(--dark-color);
  text-decoration: underline;
}

/*--------------------------------------------------------------
# 3. Utility & Animation Classes
--------------------------------------------------------------*/
/* Scroll Animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-speed) var(--transition-elastic), transform var(--transition-speed) var(--transition-elastic);
}

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

/* Parallax Effect */
.parallax-section {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  color: var(--white-color);
}

.parallax-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.parallax-section .container {
  position: relative;
  z-index: 2;
}


/* Barba.js Page Transitions */
.barba-leave-active,
.barba-enter-active {
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.barba-leave-to {
  opacity: 0;
  transform: translateY(-20px);
}

.barba-enter-from {
  opacity: 0;
  transform: translateY(20px);
}

/*--------------------------------------------------------------
# 4. Component Styles
--------------------------------------------------------------*/
/* Header */
.header {
  transition: all var(--transition-speed) ease;
}
.navbar-brand {
  font-size: 1.8rem;
  font-weight: 900;
}
.nav-link {
  font-family: var(--font-primary);
  font-weight: 700;
  margin: 0 0.5rem;
  transition: color var(--transition-speed) ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn.custom-btn, button.custom-btn, input[type='submit'].custom-btn {
  font-family: var(--font-primary);
  font-weight: 700;
  padding: 12px 30px;
  border-radius: 50px;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-speed) var(--transition-elastic);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: scale(1);
}

.btn-primary.custom-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}

.btn.custom-btn:hover, button.custom-btn:hover, input[type='submit'].custom-btn:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

/* Cards */
.custom-card, .resource-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  background-color: var(--white-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-speed) var(--transition-elastic), box-shadow var(--transition-speed) var(--transition-elastic);
  display: flex;
  flex-direction: column;
  text-align: center;
}
.custom-card:hover, .resource-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area without distortion */
  transition: transform 0.5s ease;
}

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

.card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-weight: 900;
  margin-bottom: 1rem;
}

/* Forms */
.contact-form-card {
    background-color: var(--light-gray-color);
    border: none;
    border-radius: 20px;
}
.form-control {
    border-radius: 10px;
    padding: 1rem;
    background-color: var(--white-color);
    border: 1px solid #ddd;
    transition: all var(--transition-speed) ease;
}
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: var(--primary-color);
    background-color: var(--white-color);
}
.form-label {
    font-family: var(--font-primary);
    font-weight: 700;
}

/*--------------------------------------------------------------
# 5. Section Styles
--------------------------------------------------------------*/
/* Hero Section */
.hero-section {
  min-height: 90vh;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-section h1 {
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--white-color);
}
.hero-section p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
}

/* Features Section */
.feature-item {
  background: var(--white-color);
  padding: 2rem;
  border-radius: 15px;
  transition: all var(--transition-speed) var(--transition-elastic);
  height: 100%;
}
.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

/* Portfolio Section (Carousel) */
#portfolioSlider .carousel-item .card {
    box-shadow: none;
}
#portfolioSlider .carousel-item img {
    border-radius: 15px;
}
.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 10px;
}

/* Events Section */
.list-group-item {
  margin-bottom: 1rem;
  border-radius: 10px !important;
  border: 1px solid #e0e0e0;
  transition: all var(--transition-speed) ease;
}
.list-group-item:hover {
  background-color: var(--light-gray-color);
  transform: translateX(5px);
}

/* Resources Section */
.resource-card a {
    text-decoration: none;
}
.resource-card a:hover .card-title {
    color: var(--primary-color);
}
.resource-card .card-title {
    transition: color var(--transition-speed) ease;
}


/*--------------------------------------------------------------
# 6. Page-Specific Styles
--------------------------------------------------------------*/
/* Success Page */
body.success-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background-color: var(--light-gray-color);
}
.success-container {
  background: var(--white-color);
  padding: 3rem 4rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 600px;
}
.success-container h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Privacy & Terms Pages */
.legal-page-container {
    padding-top: 120px;
    padding-bottom: 60px;
}
.legal-page-container h1 {
    margin-bottom: 2rem;
}
.legal-page-container h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--dark-color);
}

/*--------------------------------------------------------------
# 7. Footer
--------------------------------------------------------------*/
.footer {
  background-color: var(--dark-color);
  color: rgba(255, 255, 255, 0.7);
}
.footer h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--white-color);
  text-transform: uppercase;
}
.footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}
.footer a:hover {
  color: var(--white-color);
  text-decoration: underline;
}
.footer hr {
  background-color: var(--primary-color);
}

/*--------------------------------------------------------------
# 8. Media Queries
--------------------------------------------------------------*/
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: var(--dark-gray-color);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
  }
}

@media (max-width: 767.98px) {
  .parallax-section {
    background-attachment: scroll; /* Disables parallax on mobile for performance */
  }

  .section-title {
    font-size: 1.8rem;
  }
  
  .hero-section {
      min-height: 70vh;
  }
}