/* ==========================================================================
   1. CSS Variables & Root Styles
   ========================================================================== */

:root {
  /* Triadic Color Scheme */
  --primary-color: #4A90E2;    /* A clear, modern blue */
  --secondary-color: #50E3C2;  /* A vibrant teal/mint green */
  --accent-color: #E27D4A;     /* A warm, inviting orange */
  
  /* Neumorphism Base */
  --background-color: #F0F2F5;
  --neumorphic-distance: 8px;
  --neumorphic-blur: 16px;
  --light-shadow-color: rgba(255, 255, 255, 0.9);
  --dark-shadow-color: rgba(163, 177, 198, 0.6);

  /* Typography */
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Work Sans', sans-serif;
  --text-color: #363a41;
  --text-color-light: #5a616d;
  --link-color: var(--primary-color);
  --link-hover-color: var(--accent-color);
  --white-color: #FFFFFF;

  /* General */
  --border-radius: 15px;
  --transition-speed: 0.3s ease;
}

/* ==========================================================================
   2. Global Styles & Resets
   ========================================================================== */

html {
  scroll-behavior: smooth;
  background-color: var(--background-color);
}

body {
  font-family: var(--font-secondary);
  color: var(--text-color);
  background-color: var(--background-color);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .title, .subtitle {
  font-family: var(--font-primary);
  color: var(--text-color);
}

.section {
  padding: 4rem 1.5rem;
}

.section-title {
  margin-bottom: 3rem !important;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  color: #222222;
}

a {
  color: var(--link-color);
  transition: color var(--transition-speed);
}

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

.has-text-shadow {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}


/* ==========================================================================
   3. Barba.js Page Transitions
   ========================================================================== */

.barba-leave-active,
.barba-enter-active {
  transition: opacity 0.5s ease;
}

.barba-leave-to,
.barba-enter-from {
  opacity: 0;
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */

.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
  background: rgba(240, 242, 245, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-speed);
}

.navbar-item.logo-text {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.navbar-item {
  font-family: var(--font-secondary);
  font-weight: 500;
  color: var(--text-color-light);
  transition: color var(--transition-speed);
}

.navbar-item:hover, .navbar-item.is-active {
  color: var(--primary-color) !important;
  background-color: transparent !important;
}

/* Burger Menu */
.navbar-burger {
  color: var(--text-color);
}

@media screen and (max-width: 1023px) {
  .navbar-menu {
    background-color: var(--background-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }
}

/* ==========================================================================
   5. Global Component Styles
   ========================================================================== */

/* Neumorphic Buttons (Global) */
.button.neumorphic-button, .button.is-primary {
  background: var(--primary-color);
  border: none;
  border-radius: var(--border-radius);
  color: var(--white-color);
  font-weight: 600;
  box-shadow: 
    var(--neumorphic-distance) var(--neumorphic-distance) var(--neumorphic-blur) var(--dark-shadow-color),
    calc(-1 * var(--neumorphic-distance)) calc(-1 * var(--neumorphic-distance)) var(--neumorphic-blur) var(--light-shadow-color);
  transition: all var(--transition-speed);
  transform: translateY(0);
}

.button.neumorphic-button:hover, .button.is-primary:hover {
  transform: translateY(-2px);
  color: var(--white-color);
  box-shadow: 
    calc(var(--neumorphic-distance) + 2px) calc(var(--neumorphic-distance) + 2px) calc(var(--neumorphic-blur) + 4px) var(--dark-shadow-color),
    calc(-1 * var(--neumorphic-distance) - 2px) calc(-1 * var(--neumorphic-distance) - 2px) calc(var(--neumorphic-blur) + 4px) var(--light-shadow-color);
}

.button.neumorphic-button:active, .button.is-primary:active {
  box-shadow: 
    inset var(--neumorphic-distance) var(--neumorphic-distance) var(--neumorphic-blur) var(--dark-shadow-color),
    inset calc(-1 * var(--neumorphic-distance)) calc(-1 * var(--neumorphic-distance)) var(--neumorphic-blur) var(--light-shadow-color);
  transform: translateY(2px);
}

/* Neumorphic Cards (Global) */
.neumorphic-card {
  background: var(--background-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 
    var(--neumorphic-distance) var(--neumorphic-distance) var(--neumorphic-blur) var(--dark-shadow-color),
    calc(-1 * var(--neumorphic-distance)) calc(-1 * var(--neumorphic-distance)) var(--neumorphic-blur) var(--light-shadow-color);
  transition: all var(--transition-speed);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.neumorphic-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    calc(var(--neumorphic-distance) * 1.5) calc(var(--neumorphic-distance) * 1.5) calc(var(--neumorphic-blur) * 1.5) var(--dark-shadow-color),
    calc(-1 * var(--neumorphic-distance) * 1.5) calc(-1 * var(--neumorphic-distance) * 1.5) calc(var(--neumorphic-blur) * 1.5) var(--light-shadow-color);
}

.card-image {
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
}

.card-image img {
  border-radius: calc(var(--border-radius) / 2);
  object-fit: cover;
  width: 100%;
  height: 200px; /* Fixed height for consistent card appearance */
}

.card .button {
    margin-top: auto; /* Push button to the bottom */
}


/* Neumorphic Forms (Global) */
.neumorphic-form .label {
  color: var(--text-color-light);
  font-weight: 500;
}

.neumorphic-input {
  background: var(--background-color);
  border: none !important;
  border-radius: var(--border-radius) !important;
  box-shadow: 
    inset 4px 4px 8px var(--dark-shadow-color),
    inset -4px -4px 8px var(--light-shadow-color) !important;
  transition: all var(--transition-speed) !important;
  color: var(--text-color) !important;
}

.neumorphic-input:focus {
  outline: none !important;
  box-shadow: 
    inset 6px 6px 10px var(--dark-shadow-color),
    inset -6px -6px 10px var(--light-shadow-color),
    0 0 0 2px var(--primary-color) !important;
}

/* ==========================================================================
   6. Section-Specific Styles
   ========================================================================== */

/* Hero Section */
#hero {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
}

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

#hero .title, #hero .subtitle {
    color: var(--white-color);
}

/* Timeline Section */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 3px;
  background-color: var(--secondary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1.5px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--background-color);
  border: 3px solid var(--secondary-color);
  top: 30px;
  z-index: 1;
}
.timeline-item:nth-child(odd) .timeline-marker {
  right: -10px;
}
.timeline-item:nth-child(even) .timeline-marker {
  left: -10px;
}


.timeline-content {
  padding: 20px 30px;
  background: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: var(--neumorphic-distance) var(--neumorphic-distance) var(--neumorphic-blur) var(--dark-shadow-color);
}

@media screen and (max-width: 768px) {
  .timeline::after {
    left: 10px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
  }
  .timeline-item:nth-child(even) {
    left: 0%;
  }
  .timeline-marker {
    left: 0;
  }
}

/* Gallery Slider Section */
.custom-slider-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: auto;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 
    var(--neumorphic-distance) var(--neumorphic-distance) var(--neumorphic-blur) var(--dark-shadow-color),
    calc(-1 * var(--neumorphic-distance)) calc(-1 * var(--neumorphic-distance)) var(--neumorphic-blur) var(--light-shadow-color);
}

.slide {
  display: none;
  width: 100%;
}

.slide.is-active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  color: var(--white-color);
  padding: 2rem;
  text-align: left;
}
.slide-caption h3 { color: var(--white-color); }

.slider-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 1rem;
}

.slider-nav button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition-speed);
}

.slider-nav button:hover {
  background: rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Testimonials */
.testimonial-card .media-left {
  padding-right: 1.5rem;
}

.testimonial-card .media-content {
  text-align: left;
}

.testimonial-card img.is-rounded {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Resources */
.resource-card .card-content {
    text-align: left;
}

.resource-card a {
    text-decoration: none;
}
.resource-card a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   7. Page-Specific Styles
   ========================================================================== */

/* Static Pages (About, Privacy, Terms) */
.content-page {
  padding-top: 100px;
  padding-bottom: 4rem;
}

.content-page .content h2, .content-page .content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Success Page */
body[data-barba-namespace="success"] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body[data-barba-namespace="success"] main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem auto;
}
/* SVG Animation */
.success-icon .path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
}
.success-icon .path.circle {
    -webkit-animation: dash .9s ease-in-out;
    animation: dash .9s ease-in-out;
}
.success-icon .path.check {
    stroke-dashoffset: -100;
    -webkit-animation: dash-check .9s .35s ease-in-out forwards;
    animation: dash-check .9s .35s ease-in-out forwards;
}

@-webkit-keyframes dash {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}
@keyframes dash {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}
@-webkit-keyframes dash-check {
    0% { stroke-dashoffset: -100; }
    100% { stroke-dashoffset: 900; }
}
@keyframes dash-check {
    0% { stroke-dashoffset: -100; }
    100% { stroke-dashoffset: 900; }
}

/* ==========================================================================
   8. Footer
   ========================================================================== */

.footer {
  background-color: #E1E5E9;
  color: var(--text-color-light);
  padding: 3rem 1.5rem;
}

.footer .title {
  color: var(--text-color);
}

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

.footer ul li {
  margin-bottom: 0.5rem;
}

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

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

.footer .content p {
    margin-top: 2rem;
    border-top: 1px solid var(--dark-shadow-color);
    padding-top: 1.5rem;
}

/* ==========================================================================
   9. Media Queries
   ========================================================================== */

@media screen and (max-width: 768px) {
  .section {
    padding: 3rem 1rem;
  }

  .title.is-1 { font-size: 2.5rem; }
  .title.is-2 { font-size: 2rem; }
  .subtitle.is-4 { font-size: 1.1rem; }
}