/* style.css */

/* ---------------------------------- */
/*      1. CSS Variables & Reset      */
/* ---------------------------------- */

:root {
  /* Tetradic Color Scheme */
  --color-primary: #4A69BD;       /* Strong Blue */
  --color-secondary: #F6B93B;     /* Vivid Yellow/Orange */
  --color-accent1: #E44D4D;       /* Strong Red */
  --color-accent2: #6AB04C;       /* Fresh Green */
  --color-primary-dark: #3B5496;

  /* Neumorphism & Background */
  --color-background: #EBF0F5;
  --color-light-shadow: rgba(255, 255, 255, 0.9);
  --color-dark-shadow: rgba(163, 177, 198, 0.6);

  /* Typography */
  --color-text: #333745;
  --color-text-light: #5A616F;
  --color-headings: #222222;
  --color-white: #FFFFFF;
  --font-family-headings: 'Raleway', sans-serif;
  --font-family-body: 'Open Sans', sans-serif;

  /* Spacing & Sizing */
  --header-height: 80px;
  --border-radius-soft: 20px;
  --border-radius-sharp: 5px;
  --container-width: 1140px;
  --container-padding: 1.5rem;
  --section-padding: 5rem 0;

  /* Transitions */
  --transition-speed: 0.3s;
  --transition-morph: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

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

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

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

/* ---------------------------------- */
/*       2. Typography & Links        */
/* ---------------------------------- */

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

.section-title {
  font-size: 2.8rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-headings);
}

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

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

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

/* ---------------------------------- */
/*       3. Layout & Components       */
/* ---------------------------------- */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

section {
  padding: var(--section-padding);
}

/* --- Global Button Styles --- */
.btn, button[type="submit"] {
  display: inline-block;
  font-family: var(--font-family-headings);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: var(--border-radius-sharp);
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: var(--transition-morph);
  text-align: center;
  transform-origin: center;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
  box-shadow: 6px 6px 0px var(--color-dark-shadow);
  transform: translate(-3px, -3px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 6px 6px 0px var(--color-dark-shadow);
  transform: translate(-3px, -3px);
}

/* --- Card Styles --- */
.card {
  background: var(--color-background);
  border-radius: var(--border-radius-soft);
  box-shadow: 8px 8px 16px var(--color-dark-shadow), -8px -8px 16px var(--color-light-shadow);
  padding: 1.5rem;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 12px 12px 24px var(--color-dark-shadow), -12px -12px 24px var(--color-light-shadow);
}

.card-image {
  width: 100%;
  height: 200px; /* Fixed height for image container */
  border-radius: var(--border-radius-soft);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: inset 4px 4px 8px var(--color-dark-shadow), inset -4px -4px 8px var(--color-light-shadow);
}

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

.card-content {
  width: 100%;
}

.card-content h3 {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-size: 1.4rem;
}

/* ---------------------------------- */
/*       4. Header & Navigation       */
/* ---------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--color-background);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: background-color var(--transition-speed) ease;
}

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

.logo {
  font-family: var(--font-family-headings);
  font-weight: 900;
  font-size: 2rem;
  color: var(--color-primary);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-menu a {
  font-family: var(--font-family-headings);
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  padding: 0.5rem 0;
}

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

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-text);
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
}

/* ---------------------------------- */
/*          5. Section Styles         */
/* ---------------------------------- */

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

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: var(--color-white);
}

/* --- Statistics Section --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.stat-card {
  background: var(--color-background);
  padding: 2rem;
  text-align: center;
  border-radius: var(--border-radius-soft);
  box-shadow: 8px 8px 16px var(--color-dark-shadow), -8px -8px 16px var(--color-light-shadow);
}

.stat-card h3 {
  font-size: 3rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

/* --- Portfolio Section --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* --- Events (Accordion) Section --- */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  margin-bottom: 1rem;
  background: var(--color-background);
  border-radius: var(--border-radius-soft);
  box-shadow: 6px 6px 12px var(--color-dark-shadow), -6px -6px 12px var(--color-light-shadow);
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-family-headings);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-headings);
  text-align: left;
}

.accordion-icon {
  font-size: 1.5rem;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  padding: 0 1.5rem;
}

.accordion-content p {
  padding-bottom: 1.5rem;
}

/* --- Community Section --- */
.community-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
  gap: 3rem;
  background: var(--color-background);
  padding: 3rem;
  border-radius: var(--border-radius-soft);
  box-shadow: 10px 10px 20px var(--color-dark-shadow), -10px -10px 20px var(--color-light-shadow);
}

.community-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-soft);
}

/* --- External Links Section --- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.link-card {
  display: block;
  padding: 2rem;
  background: var(--color-background);
  border: 2px solid var(--color-text);
  border-radius: var(--border-radius-sharp);
  transition: var(--transition-morph);
}

.link-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0px var(--color-primary);
  border-color: var(--color-primary);
}

.link-card h4 {
  font-size: 1.3rem;
  color: var(--color-headings);
  margin-bottom: 0.5rem;
}

/* --- Contact Section --- */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--color-background);
  border: none;
  border-radius: var(--border-radius-soft);
  box-shadow: inset 5px 5px 10px var(--color-dark-shadow), inset -5px -5px 10px var(--color-light-shadow);
  color: var(--color-text);
  font-family: var(--font-family-body);
  font-size: 1rem;
  transition: box-shadow var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: inset 7px 7px 14px var(--color-dark-shadow), inset -7px -7px 14px var(--color-light-shadow), 0 0 0 2px var(--color-primary);
}

.form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--color-text-light);
  pointer-events: none;
  transition: all 0.2s ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -1.5rem;
  left: 0;
  font-size: 0.85rem;
  color: var(--color-primary);
}

.contact-form button[type="submit"] {
  width: 100%;
}

/* ---------------------------------- */
/*             6. Footer              */
/* ---------------------------------- */

.site-footer {
  background-color: #D1D9E6;
  padding: 4rem 0 2rem 0;
  border-top: 5px solid var(--color-primary);
}

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

.footer-content h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--color-headings);
}

.footer-links ul, .footer-social ul {
  list-style: none;
}

.footer-links a, .footer-social a {
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
  display: inline-block;
  font-weight: 600;
}

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

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--color-dark-shadow);
  padding-top: 2rem;
  color: var(--color-text-light);
}

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

/* --- Contact Page --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}
.contact-info ul { list-style: none; margin-top: 1rem; }
.contact-info li { margin-bottom: 0.75rem; }
.map-container { margin-top: 2rem; border-radius: var(--border-radius-soft); overflow: hidden; }
.map-container img { width: 100%; display: block; }

/* --- About Page --- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}
.about-image img {
    width: 100%;
    border-radius: var(--border-radius-soft);
}

/* --- Privacy & Terms Pages --- */
.page-section {
    padding-top: calc(var(--header-height) + var(--section-padding));
    padding-bottom: var(--section-padding);
}
.text-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}
.text-content p {
    margin-bottom: 1rem;
}

/* --- Success Page --- */
.success-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}
.success-box {
  background: var(--color-background);
  padding: 4rem;
  border-radius: var(--border-radius-soft);
  box-shadow: 12px 12px 24px var(--color-dark-shadow), -12px -12px 24px var(--color-light-shadow);
}
.success-box p {
  margin: 1rem 0 2rem;
  font-size: 1.1rem;
}

/* ---------------------------------- */
/*       8. Transitions & Media       */
/* ---------------------------------- */

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

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

/* --- Media Queries --- */
@media (max-width: 992px) {
  .section-title { font-size: 2.2rem; }
  .hero-title { font-size: 3rem; }
  .community-content, .about-content, .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--color-background);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    box-shadow: -10px 0 20px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  }
  .nav-menu.active {
    right: 0;
  }
  .nav-toggle {
    display: block;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .portfolio-grid { grid-template-columns: 1fr; }
}