/*
  style.css
  Theme: Work & Study Australia
  Design System: Retro + Eco-minimalism
  Color Scheme: Tetradic
  Animation Style: Scroll-dependent effects
*/

/* -------------------------------------------------- */
/* 1. CSS Variables & Root Styles
/* -------------------------------------------------- */
:root {
  /* Tetradic Color Scheme */
  --retro-bg: #F5F5DC;          /* Beige */
  --retro-text: #3D2B1F;         /* Dark Brown */
  --retro-primary: #A67B5B;      /* Muted Brown */
  --retro-secondary: #5B8EA6;     /* Soft Blue */
  --retro-accent: #A65B5B;        /* Muted Red */
  --retro-highlight: #5BA67B;     /* Soft Green */

  /* Fonts */
  --font-heading: 'Roboto', sans-serif;
  --font-body: 'Lato', sans-serif;

  /* Transitions */
  --transition-fast: all 0.2s ease-in-out;
  --transition-normal: all 0.3s ease-in-out;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* -------------------------------------------------- */
/* 2. Base & Typography Styles
/* -------------------------------------------------- */
body {
  background-color: var(--retro-bg);
  color: var(--retro-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

a {
  color: var(--retro-secondary);
  transition: var(--transition-fast);
}

a:hover {
  color: var(--retro-highlight);
}

/* -------------------------------------------------- */
/* 3. Header & Navigation
/* -------------------------------------------------- */
header {
  transition: var(--transition-normal);
}

header nav a {
    position: relative;
    padding-bottom: 0.25rem;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--retro-primary);
    transition: width 0.3s ease-in-out;
}

header nav a:hover::after {
    width: 100%;
}

/* -------------------------------------------------- */
/* 4. Global Button Styles
/* -------------------------------------------------- */
button,
.btn,
input[type='submit'] {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-normal);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover,
.btn:hover,
input[type='submit']:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Example of a primary button, could be applied with Tailwind classes */
.btn-primary {
  background-color: var(--retro-secondary);
  color: white;
}
.btn-primary:hover {
  background-color: #4a788f; /* Darker shade of secondary */
}

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

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

#hero h1, #hero p {
  color: #FFFFFF;
}

/* Cards (Methodology, Community, Careers, etc.) */
.card {
  display: flex;
  flex-direction: column;
  text-align: center;
  height: 100%; /* Ensure cards in a grid row are the same height */
}

.card .card-content {
  flex-grow: 1; /* Allows content to fill space, pushing footer to bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.card .card-image img {
  width: 100%;
  height: 12rem; /* Fixed height for consistent card image sizes */
  object-fit: cover;
  border-radius: 0.375rem; /* Corresponds to Tailwind's rounded-md */
  margin: 0 auto;
}

/* Community Carousel */
#community-carousel button {
  width: 3rem;
  height: 3rem;
  line-height: 3rem;
  font-size: 1.5rem;
  border-radius: 9999px; /* rounded-full */
}

/* Contact Form */
#contact-form input, #contact-form textarea {
  font-family: var(--font-body);
  background-color: #fff;
  border: 1px solid rgba(166, 123, 91, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  transition: var(--transition-normal);
}

#contact-form input:focus, #contact-form textarea:focus {
  outline: none;
  border-color: var(--retro-secondary);
  box-shadow: 0 0 0 3px rgba(91, 142, 166, 0.3);
}

/* -------------------------------------------------- */
/* 6. Animations (Scroll-Triggered)
/* -------------------------------------------------- */
/* Initial state for elements that will be animated on scroll */
.scroll-animate, .fade-in {
  opacity: 1;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* The state when the element is visible */
.scroll-animate.is-visible, .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Apply delays using data-delay attribute from JS */
.scroll-animate[data-delay="0.1"].is-visible { transition-delay: 0.1s; }
.scroll-animate[data-delay="0.2"].is-visible { transition-delay: 0.2s; }
.scroll-animate[data-delay="0.3"].is-visible { transition-delay: 0.3s; }
.scroll-animate[data-delay="0.4"].is-visible { transition-delay: 0.4s; }


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

/* Success Page */
.success-page-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.success-page-container h1 {
    color: var(--retro-highlight);
}

/* Privacy & Terms Pages */
.legal-content-container, .about-content-container, .contact-page-container {
    padding-top: 100px; /* Offset for sticky header */
    padding-bottom: 80px;
}

.legal-content-container h2, .about-content-container h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content-container ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* -------------------------------------------------- */
/* 8. Footer
/* -------------------------------------------------- */
footer {
    background-color: var(--retro-text);
}

footer a {
  color: rgba(245, 245, 220, 0.8); /* retro-bg with opacity */
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

footer a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  display: block;
  margin-top: 2px;
  right: 0;
  background: #fff;
  transition: width 0.3s ease;
}

footer a:hover {
  color: #FFFFFF;
}

footer a:hover::after {
  width: 100%;
  left: 0;
  background: #fff;
}