/* style.css */

/* ---------------------------------- */
/*          CSS VARIABLES             */
/* ---------------------------------- */
:root {
  /* Pastel Color Scheme */
  --bg-color: #eaf0f7;
  --primary-color: #5c6ac4;
  --primary-color-dark: #4a56a1;
  --text-color: #333d51;
  --text-color-light: #5d687e;
  --white-color: #FFFFFF;
  --success-color: #4caf50;
  --border-color: #d1d9e6;

  /* Neumorphic Shadows & Highlights */
  --shadow-light: rgba(255, 255, 255, 0.8);
  --shadow-dark: rgba(181, 193, 211, 0.7);

  /* Typography */
  --font-header: 'Playfair Display', serif;
  --font-body: 'Source Sans Pro', sans-serif;

  /* Sizing & Transitions */
  --border-radius-main: 20px;
  --border-radius-small: 10px;
  --transition-speed: 0.3s;
  --header-height: 5rem;
}

/* ---------------------------------- */
/*          BASE & RESET STYLES       */
/* ---------------------------------- */
html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Specific styles for static pages to avoid content overlap with fixed header */
body[data-barba-namespace="about"],
body[data-barba-namespace="terms"],
body[data-barba-namespace="privacy"],
body[data-barba-namespace="contacts"] {
  padding-top: var(--header-height);
}

.section {
  padding: 5rem 1.5rem;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
}

/* ---------------------------------- */
/*          TYPOGRAPHY                */
/* ---------------------------------- */
h1, h2, h3, h4, h5, h6,
.title, .subtitle {
  font-family: var(--font-header);
  color: var(--text-color);
  font-weight: 700;
  text-shadow: 1px 1px 1px var(--shadow-light);
}

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

p, .content, li, a {
  color: var(--text-color-light);
}

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

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

strong {
  color: var(--text-color);
}

/* ---------------------------------- */
/*          HEADER & NAVIGATION       */
/* ---------------------------------- */
.header.is-fixed-top {
  background: var(--bg-color);
  box-shadow: 4px 4px 10px var(--shadow-dark);
  transition: background var(--transition-speed) ease;
}

.navbar-item, .navbar-link {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-color);
  transition: all var(--transition-speed) ease;
}

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

.navbar-burger span {
  background-color: var(--text-color);
  height: 2px;
}

.navbar-menu.is-active {
    background-color: var(--bg-color);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.logo {
  font-family: var(--font-header);
  font-size: 1.5rem;
}
.logo .logo-alt {
  color: var(--primary-color);
}

/* ---------------------------------- */
/*          HERO SECTION              */
/* ---------------------------------- */
#hero {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--white-color);
}

#hero .hero-title, #hero .hero-subtitle {
  color: var(--white-color);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* ---------------------------------- */
/*      NEUMORPHIC COMPONENTS         */
/* ---------------------------------- */

/* Global Button Styles */
.button, button, input[type='submit'] {
  border: none;
  border-radius: var(--border-radius-small);
  font-weight: 600;
  transition: all var(--transition-speed) ease-in-out;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  background: var(--bg-color);
  color: var(--text-color);
}

.button:hover, button:hover, input[type='submit']:hover {
  transform: translateY(-2px);
  box-shadow: 7px 7px 14px var(--shadow-dark), -7px -7px 14px var(--shadow-light);
}

.button:active, button:active, input[type='submit']:active {
  transform: translateY(0);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
  color: var(--primary-color);
}

.button.is-primary, .button.neumorphic-button-cta {
  background: var(--primary-color);
  color: var(--white-color);
}
.button.is-primary:hover, .button.neumorphic-button-cta:hover {
  background: var(--primary-color-dark);
  color: var(--white-color);
}

.button.is-outlined {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}
.button.is-outlined:hover {
    background: var(--primary-color);
    color: var(--white-color);
    box-shadow: 5px 5px 10px var(--shadow-dark);
}


/* General Card Style */
.card.neumorphic-card {
  background: var(--bg-color);
  border-radius: var(--border-radius-main);
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  transition: all var(--transition-speed) ease-in-out;
  border: 1px solid var(--shadow-light);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.card.neumorphic-card:hover {
  transform: scale(1.03);
  box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
}

.card-image.image-container {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  border-radius: var(--border-radius-main) var(--border-radius-main) 0 0;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.card-image.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area without distortion */
}

.card-content {
  width: 100%;
  padding: 0 1.5rem 1.5rem;
}

/* Form Input Styles */
.input.neumorphic-input, .textarea.neumorphic-input {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
  color: var(--text-color);
  transition: all var(--transition-speed) ease;
}
.input.neumorphic-input:focus, .textarea.neumorphic-input:focus {
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light), 0 0 0 2px var(--primary-color);
  outline: none;
}
.label {
    color: var(--text-color);
    font-weight: 600;
}
.neumorphic-form-container {
    background: var(--bg-color);
    padding: 2.5rem;
    border-radius: var(--border-radius-main);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

/* ---------------------------------- */
/*      SECTION-SPECIFIC STYLES       */
/* ---------------------------------- */

/* Methodology - Timeline */
.timeline {
  list-style: none;
  padding: 20px 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background-color: var(--border-color);
  box-shadow: inset 1px 1px 2px var(--shadow-dark);
}
.timeline-item {
  margin-bottom: 40px;
  position: relative;
}
.timeline-item .timeline-content {
  padding: 20px 30px;
  position: relative;
  width: 45%;
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
  border-radius: var(--border-radius-main);
}
.timeline-item:nth-child(odd) .timeline-content {
  left: 55%;
}
.timeline-item:nth-child(even) .timeline-content {
  left: 0;
  text-align: right;
}
.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: var(--bg-color);
  border: 4px solid var(--primary-color);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
}

/* Awards - Accordion */
.accordion-item {
  margin-bottom: 1rem;
}
.accordion-header {
  width: 100%;
  background: var(--bg-color);
  border: none;
  text-align: left;
  padding: 1rem 1.5rem;
  cursor: pointer;
  border-radius: var(--border-radius-small);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  transition: all var(--transition-speed) ease;
}
.accordion-header:hover {
    color: var(--primary-color);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-speed) ease-in-out;
  padding: 0 1.5rem;
  background-color: var(--bg-color);
  border-radius: 0 0 var(--border-radius-small) var(--border-radius-small);
}
.accordion-content p {
    padding: 1.5rem 0;
}
.accordion-item.active .accordion-content {
  max-height: 300px; /* Adjust as needed */
}
.accordion-item.active .accordion-header {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

/* Success Story Progress Bar */
progress.neumorphic-progress {
    height: 1rem;
    border-radius: 1rem;
    background-color: var(--bg-color);
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}
progress.neumorphic-progress::-webkit-progress-bar {
  background-color: transparent;
}
progress.neumorphic-progress::-webkit-progress-value {
  background: var(--primary-color);
  border-radius: 1rem;
}
progress.neumorphic-progress::-moz-progress-bar {
  background: var(--primary-color);
  border-radius: 1rem;
}

/* External Resources */
#resources .resource-card {
    transition: all var(--transition-speed) ease;
}
#resources .resource-card:hover {
    transform: translateY(-5px);
    border-left: 5px solid var(--primary-color);
}
#resources .resource-card .title a {
    color: var(--text-color);
}
#resources .resource-card .title a:hover {
    color: var(--primary-color);
}

/* ---------------------------------- */
/*          FOOTER                    */
/* ---------------------------------- */
.footer.neumorphic-footer {
  background-color: #d1d9e6; /* A slightly darker shade for contrast */
  padding: 3rem 1.5rem 2rem;
  box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.1), inset -5px -5px 10px var(--shadow-light);
}

.footer .footer-title {
  color: var(--text-color);
  margin-bottom: 1rem;
}
.footer ul li {
  margin-bottom: 0.5rem;
}
.footer a {
  color: var(--text-color-light);
  font-weight: 600;
}
.footer a:hover {
  color: var(--primary-color);
}

/* ---------------------------------- */
/*          PAGE-SPECIFIC STYLES      */
/* ---------------------------------- */

/* Success Page */
#success-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-color);
}

#success-page .icon {
  font-size: 5rem;
  color: var(--success-color);
  margin-bottom: 1.5rem;
  line-height: 1;
}

/* Privacy & Terms Pages */
#static-content-page {
    padding: 3rem 1.5rem;
}
#static-content-page h1 {
    margin-bottom: 2rem;
}
#static-content-page h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}


/* ---------------------------------- */
/*          RESPONSIVE DESIGN         */
/* ---------------------------------- */

@media screen and (max-width: 768px) {
  .section {
    padding: 3rem 1rem;
  }
  .timeline::before {
    left: 10px;
  }
  .timeline-item .timeline-content {
    width: 90%;
    left: 10% !important;
    text-align: left !important;
  }
  .timeline-item::after {
    left: 10px;
  }
}

@media screen and (max-width: 1023px) {
    .header .navbar-menu {
        padding-bottom: 1rem;
    }
}