/* style.css */

/*--------------------------------------------------------------
# CSS Variables
--------------------------------------------------------------*/
:root {
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Work Sans', sans-serif;

  /* Neuromorphism Base & Shadows */
  --neuro-bg-color: #e0e5ec; /* Light base for neuromorphism */
  --neuro-bg-color-darker: #c8d0d8; /* Slightly darker for inset/pressed */
  --neuro-bg-color-lighter: #ffffff; /* Lighter for highlights */

  --neuro-shadow-convex-outer: 6px 6px 12px var(--neuro-bg-color-darker), -6px -6px 12px var(--neuro-bg-color-lighter);
  --neuro-shadow-concave-inner: inset 6px 6px 12px var(--neuro-bg-color-darker), inset -6px -6px 12px var(--neuro-bg-color-lighter);
  --neuro-shadow-pressed: inset 3px 3px 7px var(--neuro-bg-color-darker), inset -3px -3px 7px var(--neuro-bg-color-lighter);
  --neuro-shadow-hover: 8px 8px 16px var(--neuro-bg-color-darker), -8px -8px 16px var(--neuro-bg-color-lighter);

  /* Gradient Colors */
  --gradient-primary-start: #6DD5FA;
  --gradient-primary-end: #2980B9;
  --gradient-secondary-start: #f8f9fa;
  --gradient-secondary-mid: #e9ecef;
  --gradient-secondary-end: #dee2e6;

  /* Text Colors */
  --text-color-dark: #222222; /* High contrast for light backgrounds */
  --text-color-medium: #5a626b;
  --text-color-light: #FFFFFF; /* For dark backgrounds/overlays */
  --text-color-accent: var(--gradient-primary-end);

  /* Accent Colors */
  --accent-color-1: var(--gradient-primary-end);
  --accent-color-1-darker: #1c6ca7;
  --accent-color-2: #28a745; /* Green for success/positive */

  /* Spacing & Borders */
  --spacing-unit: 1rem;
  --border-radius-sm: 0.75rem;
  --border-radius-md: 1.25rem;
  --border-radius-lg: 2rem;
  --transition-speed: 0.3s ease-in-out;

  /* Header Height */
  --header-height: 80px; /* Adjust as needed */
}

/*--------------------------------------------------------------
# Base & Body Styles
--------------------------------------------------------------*/
body {
  font-family: var(--font-secondary);
  color: var(--text-color-dark);
  background-color: var(--neuro-bg-color); /* Base background for neuromorphism */
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  padding-top: var(--header-height); /* Account for fixed header */
  padding-top: 0px !important;
}

html {
  scroll-behavior: smooth;
}

/* Ensure Barba.js transitions are smooth */
.barba-leave-active,
.barba-enter-active {
  transition: opacity var(--transition-speed), transform var(--transition-speed);
}
.barba-leave-to {
  opacity: 0;
  transform: translateY(20px);
}
.barba-enter-from {
  opacity: 0;
  transform: translateY(-20px);
}

/* Particle Container */
#particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Behind all content */
  pointer-events: none; /* Allows clicks to pass through */
}

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  color: var(--text-color-dark);
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  line-height: 1.3;
}
.section-title {
  font-weight: 700;
  color: var(--text-color-dark);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle shadow for titles */
}
.page-title { /* For sub-page titles on image backgrounds */
  color: var(--text-color-light);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

p {
  margin-bottom: var(--spacing-unit);
  color: var(--text-color-medium);
}
.lead {
    font-weight: 400;
    color: var(--text-color-medium);
}
.hero-section .lead { /* Specific override for hero subtitle for contrast */
    color: var(--text-color-light);
    opacity: 0.9;
}

a {
  color: var(--text-color-accent);
  text-decoration: none;
  transition: color var(--transition-speed);
}
a:hover {
  color: var(--accent-color-1-darker);
  text-decoration: underline;
}

/*--------------------------------------------------------------
# Header & Navigation
--------------------------------------------------------------*/
.site-header {
  background-color: rgba(224, 229, 236, 0.85); /* Semi-transparent neuro-bg */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: calc(var(--spacing-unit) * 0.5) 0;
  height: var(--header-height);
  z-index: 1030; /* Above most content */
}
.navbar-brand {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--text-color-dark) !important;
}
.neuro-nav .nav-link {
  font-family: var(--font-secondary);
  font-weight: 500;
  color: var(--text-color-medium) !important;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: var(--border-radius-sm);
  transition: background-color var(--transition-speed), color var(--transition-speed), box-shadow var(--transition-speed);
}
.neuro-nav .nav-link:hover,
.neuro-nav .nav-link.active {
  color: var(--text-color-accent) !important;
  background-color: rgba(255,255,255,0.5);
  box-shadow: var(--neuro-shadow-pressed);
}
.navbar-toggler {
  border: none;
  box-shadow: var(--neuro-shadow-convex-outer);
  padding: 0.5rem 0.75rem;
}
.navbar-toggler:focus {
  box-shadow: var(--neuro-shadow-pressed);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/*--------------------------------------------------------------
# Global Button Styles
--------------------------------------------------------------*/
.btn, button, input[type="submit"], input[type="button"] {
  font-family: var(--font-primary);
  font-weight: 600;
  padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.75);
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  display: inline-block;
  text-align: center;
  vertical-align: middle;
  user-select: none;
}

.neuro-button {
  background-color: var(--neuro-bg-color);
  color: var(--text-color-accent);
  box-shadow: var(--neuro-shadow-convex-outer);
}
.neuro-button:hover, .neuro-button:focus {
  box-shadow: var(--neuro-shadow-hover);
  background-color: var(--neuro-bg-color);
  color: var(--accent-color-1-darker);
  transform: translateY(-2px);
}
.neuro-button:active {
  box-shadow: var(--neuro-shadow-pressed);
  transform: translateY(1px);
}

/* Light button for dark backgrounds (e.g., Hero) */
.neuro-button-light {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--text-color-light);
  box-shadow: 3px 3px 6px rgba(0,0,0,0.3), -3px -3px 6px rgba(255,255,255,0.3);
  backdrop-filter: blur(5px);
}
.neuro-button-light:hover, .neuro-button-light:focus {
  background-color: rgba(255, 255, 255, 0.3);
  box-shadow: 5px 5px 10px rgba(0,0,0,0.4), -5px -5px 10px rgba(255,255,255,0.4);
  color: var(--text-color-light);
  transform: translateY(-2px);
}
.neuro-button-light:active {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 2px 2px 4px rgba(0,0,0,0.3), inset -2px -2px 4px rgba(255,255,255,0.3);
  transform: translateY(1px);
}

.neuro-button-outline {
  background-color: transparent;
  color: var(--text-color-accent);
  border: 2px solid var(--text-color-accent);
  box-shadow: none;
}
.neuro-button-outline:hover, .neuro-button-outline:focus {
  background-color: var(--text-color-accent);
  color: var(--text-color-light);
  border-color: var(--text-color-accent);
  box-shadow: var(--neuro-shadow-convex-outer); /* Add subtle shadow on hover */
}

/* "Read More" link style */
.read-more-link {
  font-weight: 600;
  color: var(--text-color-accent);
  display: inline-block;
  margin-top: calc(var(--spacing-unit) * 0.5);
  text-decoration: none;
}
.read-more-link::after {
  content: ' \2192'; /* Right arrow */
  transition: transform var(--transition-speed);
  display: inline-block;
}
.read-more-link:hover::after {
  transform: translateX(5px);
}
.read-more-link:hover {
  text-decoration: underline;
}

/*--------------------------------------------------------------
# Global Form Input Styles
--------------------------------------------------------------*/
.neuro-input, .form-control {
  background-color: var(--neuro-bg-color);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: calc(var(--spacing-unit) * 0.75) var(--spacing-unit);
  box-shadow: var(--neuro-shadow-concave-inner);
  color: var(--text-color-dark);
  width: 100%;
  transition: box-shadow var(--transition-speed);
}
.neuro-input::placeholder {
  color: var(--text-color-medium);
  opacity: 0.7;
}
.neuro-input:focus, .form-control:focus {
  background-color: var(--neuro-bg-color); /* Keep background consistent */
  color: var(--text-color-dark);
  outline: none;
  box-shadow: var(--neuro-shadow-pressed), 0 0 0 0.2rem rgba(var(--gradient-primary-end-rgb, 41, 128, 185), 0.25); /* Focus ring with variable */
}
/* For Bootstrap validation states */
.form-control.is-invalid, .form-control.is-valid {
    background-image: none !important; /* Remove Bootstrap's default icons if they clash with neuromorphism */
}
.form-label {
  font-weight: 500;
  margin-bottom: calc(var(--spacing-unit) * 0.5);
  color: var(--text-color-dark);
}

/*--------------------------------------------------------------
# Global Card Styles (Neuromorphic)
--------------------------------------------------------------*/
.neuro-card {
  background-color: var(--neuro-bg-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--neuro-shadow-convex-outer);
  padding: calc(var(--spacing-unit) * 1.5);
  transition: all var(--transition-speed);
  overflow: hidden; /* Important for inner shadows and image rounding */
  display: flex;
  flex-direction: column;
}
.neuro-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--neuro-shadow-hover);
}
.neuro-card .card-title {
  color: var(--text-color-dark);
  font-weight: 700;
}
.neuro-card .card-text {
  color: var(--text-color-medium);
  font-size: 0.95rem;
}
.neuro-card .card-body { /* Ensure card body flexes to push content */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.neuro-card .card-body .btn, .neuro-card .card-body .read-more-link { /* Push button to bottom if card is h-100 */
    margin-top: auto; 
}

/* Image styling within neuro-cards */
.neuro-image {
  border-radius: var(--border-radius-sm); /* Slightly smaller radius for inner elements */
  object-fit: cover;
}
.card .card-image { /* Container for image in card */
  margin-bottom: var(--spacing-unit);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  display: flex; /* For centering image if needed */
  justify-content: center;
  align-items: center;
  text-align: center; /* For img if display:inline-block or similar */
}
/* Specific for workshop image cards where image is on top */
.card.image-card .card-image {
  width: 100%; /* Full width of the card */
  height: 250px; /* Fixed height for image container */
  margin-left: auto;
  margin-right: auto;
}
.card.image-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card.image-card { /* Center content in image cards */
  align-items: center; /* Center image container if it's not full width */
  text-align: center; /* Center text in card-body */
}
.card.image-card .card-body {
    width: 100%; /* Ensure card body takes full width for text alignment */
}


/* General centering for card-like elements */
.card, .item, .testimonial, .team-member, .product-card {
    text-align: center; /* Center inline/text content */
}
.card > img, .card .card-image > img { /* Center block-level images if not full width */
    margin-left: auto;
    margin-right: auto;
}


/*--------------------------------------------------------------
# Sections
--------------------------------------------------------------*/
.section-block {
  padding-top: calc(var(--spacing-unit) * 3);
  padding-bottom: calc(var(--spacing-unit) * 3);
}
.bg-light-gradient {
  background: linear-gradient(135deg, var(--gradient-secondary-start), var(--gradient-secondary-mid), var(--gradient-secondary-end));
}

/* Section background images with overlay */
[style*="background-image"] {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  position: relative; /* For pseudo-element overlay */
}
/* Overlay for text readability on background images */
.hero-content-overlay, .page-title-section .hero-content-overlay {
  position: relative; /* Or on a child if the section itself has the bg */
  z-index: 1;
  padding: calc(var(--spacing-unit) * 2) 0; /* Add padding to content within overlay */
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)); /* Dark overlay */
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.page-title-section .hero-content-overlay { /* Specific for sub-page headers */
    min-height: 250px; /* Give some height to these banners */
}


/* Hero Section */
.hero-section {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color-light); /* Enforced by HTML, good to have here too */
}
.hero-section .hero-title {
  color: var(--text-color-light);
  font-size: 3.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-section .hero-subtitle {
  color: var(--text-color-light);
  font-size: 1.5rem;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* About Us Section (index page) */
#about .neuro-card img {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Methodology Section - Progress Bars */
.neuro-progress {
  height: 20px;
  border-radius: var(--border-radius-sm);
  background-color: var(--neuro-bg-color);
  box-shadow: var(--neuro-shadow-concave-inner);
  overflow: visible; /* To allow text on bar to be clear */
  padding: 3px; /* Small padding so progress bar doesn't touch edges */
}
.neuro-progress .progress-bar {
  background: linear-gradient(90deg, var(--gradient-primary-start), var(--gradient-primary-end));
  color: var(--text-color-light);
  font-weight: 500;
  font-size: 0.8rem;
  border-radius: calc(var(--border-radius-sm) - 3px); /* Match parent but account for padding */
  box-shadow: var(--neuro-shadow-convex-outer); /* Make bar itself look raised */
  text-align: center;
  line-height: 14px; /* Adjust for progress bar height minus padding */
}

/* Common Mistakes Section - Accordion */
.neuro-accordion .neuro-accordion-item {
  background-color: var(--neuro-bg-color);
  margin-bottom: var(--spacing-unit);
  border-radius: var(--border-radius-md);
  box-shadow: var(--neuro-shadow-convex-outer);
  overflow: hidden; /* For rounded corners on content */
  border: none;
}
.neuro-accordion .neuro-accordion-button {
  background-color: var(--neuro-bg-color);
  color: var(--text-color-dark);
  font-family: var(--font-primary);
  font-weight: 600;
  padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 1.5);
  width: 100%;
  text-align: left;
  border: none;
  box-shadow: none; /* Shadow is on the item */
  transition: background-color var(--transition-speed);
}
.neuro-accordion .neuro-accordion-button:not(.collapsed) {
  background-color: var(--neuro-bg-color-darker); /* Slightly different when open */
  color: var(--text-color-accent);
  box-shadow: var(--neuro-shadow-pressed); /* Pressed effect when open */
}
.neuro-accordion .neuro-accordion-button:focus {
  outline: none;
  box-shadow: var(--neuro-shadow-pressed);
}
.neuro-accordion .neuro-accordion-button::after { /* Bootstrap accordion arrow */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232980B9'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transition: transform var(--transition-speed);
}
.neuro-accordion .neuro-accordion-button:not(.collapsed)::after {
  transform: rotate(-180deg);
}
.neuro-accordion .accordion-body {
  padding: calc(var(--spacing-unit) * 1.5);
  background-color: var(--neuro-bg-color); /* Ensure body has base color */
}
.neuro-accordion .accordion-body .card-image img {
    border: 3px solid var(--neuro-bg-color-lighter); /* Subtle border for images inside accordion */
}

/* Clientele, Workshops, External Resources - rely on global .neuro-card */
/* Workshops specific image card styling handled in global card styles */

/* History Section */
#history p {
    max-width: 800px; /* Improve readability for long text */
    margin-left: auto;
    margin-right: auto;
}

/* Awards/Recognition Section */
#recognition .neuro-card {
  text-align: center;
}
#recognition .neuro-card .fs-1 {
  color: var(--text-color-accent);
  margin-bottom: 0.5rem;
}

/* Contact Form Section */
.neuro-form {
  background-color: var(--neuro-bg-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--neuro-shadow-convex-outer);
}

/*--------------------------------------------------------------
# Page Specific Styles
--------------------------------------------------------------*/
/* For About, Contacts, Privacy, Terms pages with a banner */
.page-title-section {
    color: var(--text-color-light); /* Default text color for this section type */
}

/* Privacy & Terms pages content padding */
main[data-barba-namespace="privacy-policy"],
main[data-barba-namespace="terms-of-service"] {
  /* padding-top: calc(var(--header-height) + var(--spacing-unit) * 2); Removed, body has padding-top */
  /* If specific pages need more, use section padding or a wrapper */
}
/* Ensure the page title section itself isn't pushed down by body padding-top if it's the first element */
body > main > .page-title-section:first-child {
    /* No additional top margin needed if body has padding-top */
}

/* Success Page */
main[data-barba-namespace="success"] section {
  min-height: calc(100vh - var(--header-height) - var(--footer-height, 150px)); /* Adjust footer height estimate */
  display: flex;
  align-items: center;
  justify-content: center;
}
main[data-barba-namespace="success"] .neuro-card {
  text-align: center;
}
main[data-barba-namespace="success"] .neuro-card img { /* Success icon */
    display: block;
    margin-left: auto;
    margin-right: auto;
}


/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
  background: linear-gradient(135deg, var(--gradient-secondary-end), var(--gradient-secondary-mid)); /* Subtle gradient */
  color: var(--text-color-medium);
  padding: calc(var(--spacing-unit) * 2.5) 0;
  border-top: 3px solid var(--neuro-bg-color-lighter); /* Neuromorphic separator */
  box-shadow: inset 0 5px 15px rgba(0,0,0,0.05);
}
.site-footer .footer-heading {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  color: var(--text-color-dark);
  margin-bottom: var(--spacing-unit);
  font-weight: 600;
}
.site-footer p {
  color: var(--text-color-medium);
  margin-bottom: 0.5rem;
}
.site-footer .list-unstyled li {
  margin-bottom: 0.5rem;
}
.site-footer .footer-link {
  color: var(--text-color-medium);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed);
}
.site-footer .footer-link:hover {
  color: var(--text-color-accent);
  text-decoration: underline;
}
/* Styling for social media text links */
.site-footer ul.list-unstyled a[target="_blank"] { /* Assuming social links open in new tab */
  display: inline-block;
  padding: 0.25rem 0.5rem; /* Small padding to make them more like "buttons" */
  border-radius: var(--border-radius-sm);
}
.site-footer ul.list-unstyled a[target="_blank"]:hover {
  background-color: rgba(0,0,0,0.05); /* Subtle hover for text links */
}

/*--------------------------------------------------------------
# Animations & Transitions (Scroll based)
--------------------------------------------------------------*/
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--transition-speed), transform 0.6s var(--transition-speed);
  transition-timing-function: ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/
@media (max-width: 991.98px) { /* Bootstrap LG breakpoint */
  .hero-section .hero-title {
    font-size: 2.8rem;
  }
  .hero-section .hero-subtitle {
    font-size: 1.25rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .page-title {
    font-size: 2.2rem;
  }
  .site-header {
    height: auto; /* Allow header to expand for toggler */
    min-height: var(--header-height);
  }

  .navbar-collapse {
    background-color: var(--neuro-bg-color);
    margin-top: 0.5rem;
    padding: var(--spacing-unit);
    border-radius: var(--border-radius-md);
    box-shadow: var(--neuro-shadow-convex-outer);
  }
  .neuro-nav .nav-link {
    margin-bottom: 0.5rem;
    display: block; /* Full width links in mobile */
    text-align: center;
  }
}

@media (max-width: 767.98px) { /* Bootstrap MD breakpoint */
  .hero-section .hero-title {
    font-size: 2.2rem;
  }
  .hero-section .hero-subtitle {
    font-size: 1.1rem;
  }
  .btn, button, input[type="submit"], input[type="button"] {
    padding: calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 1.2);
    font-size: 0.85rem;
  }
  .section-block {
    padding-top: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit) * 2);
  }
  .col-lg-8.mx-auto { /* Ensure single column content is readable */
    padding-left: var(--spacing-unit);
    padding-right: var(--spacing-unit);
  }
}

@media (max-width: 575.98px) { /* Bootstrap SM breakpoint */
  h1, .h1 { font-size: 2rem; }
  h2, .h2 { font-size: 1.75rem; }
  .section-title { font-size: 1.75rem; }
  .page-title { font-size: 1.9rem; }
  .hero-section {
    padding: var(--spacing-unit) 0; /* Less padding on small screens for hero */
  }
}

/* Helper variable for Bootstrap primary color's RGB components (if needed for rgba focus rings etc.) */
/* This is a workaround as CSS vars can't directly be used in rgba() components easily without JS */
:root {
  /* Example for Bootstrap blue #007bff */
  --gradient-primary-end-rgb: 0, 123, 255; /* Update if accent-color-1 changes from Bootstrap blue */
}
*{
  opacity: 1 !important;
}