/* style.css */

/*
  Table of Contents:
  1. CSS Variables
  2. Global Resets & Base Styles (complementing Tailwind)
  3. Typography
  4. Layout Utilities
  5. Navigation (Header, Mobile Menu)
  6. Hero Section
  7. Card Styles (Generic & Specifics)
  8. Button Styles (Global & States)
  9. Form Styles
  10. Accordion Styles
  11. Footer Styles
  12. Specific Page Styles (Success, Privacy, Terms)
  13. Utility Classes (Parallax, Shadows, etc.)
  14. Animations & Transitions
*/

/* 1. CSS Variables */
:root {
    --font-primary: 'Manrope', sans-serif;
    --font-secondary: 'Rubik', sans-serif;

    /* Neutral Color Scheme */
    --color-neutral-lightest: #FFFFFF; /* White */
    --color-neutral-light: #F0F0F0;    /* Light gray for body background */
    --color-neutral-medium: #A0A0A0;   /* Medium gray for secondary text, borders */
    --color-neutral-dark: #333333;     /* Dark gray for primary text */
    --color-neutral-darkest: #1E1E1E;  /* Near black for strong accents, brutalist shadows */

    /* Accent Colors - Bold and Vibrant */
    --color-accent-primary: #E8491E; /* Example: Fiery Orange/Red */
    --color-accent-primary-darker: #C0392B; /* Darker shade for hover/active */
    --color-accent-secondary: #007BFF; /* Example: Bright Blue */

    /* Text Colors */
    --color-text-light: var(--color-neutral-lightest);
    --color-text-dark: var(--color-neutral-dark);
    --color-text-medium: var(--color-neutral-medium);
    --color-text-on-accent: var(--color-neutral-lightest);

    /* Brutalist Elements */
    --border-brutalist: 2px solid var(--color-neutral-darkest);
    --shadow-brutalist-hard: 5px 5px 0px var(--color-neutral-darkest);
    --shadow-brutalist-hard-small: 3px 3px 0px var(--color-neutral-darkest);
    --shadow-brutalist-hard-inset: inset 3px 3px 0px 0px rgba(0,0,0,0.2);

    /* Gradients */
    --gradient-dark-overlay: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6));
    --gradient-accent-subtle: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary)); /* For subtle highlights */

    /* Transitions & Animations */
    --transition-speed-fast: 0.2s;
    --transition-speed-normal: 0.3s;
    --transition-easing: ease-in-out;

    /* Spacing */
    --spacing-xs: 0.25rem; /* 4px */
    --spacing-sm: 0.5rem;  /* 8px */
    --spacing-md: 1rem;    /* 16px */
    --spacing-lg: 1.5rem;  /* 24px */
    --spacing-xl: 2rem;    /* 32px */
    --spacing-xxl: 3rem;   /* 48px */
}

/* 2. Global Resets & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-secondary);
    background-color: var(--color-neutral-light);
    color: var(--color-text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Ensure Tailwind base styles are applied if this file is loaded after Tailwind CDN */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Apply root variables to Tailwind config colors if needed (done in HTML via script for this setup) */

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 800; /* Manrope bold */
    line-height: 1.2;
    color: var(--color-neutral-darkest);
    margin-bottom: var(--spacing-md);
}

/* Tailwind's text utilities are preferred, but global fallbacks can be set */
h1 { font-size: 2.5rem; } /* text-4xl or 5xl */
h2 { font-size: 2rem; }   /* text-3xl or 4xl */
h3 { font-size: 1.5rem; } /* text-2xl or 3xl */
h4 { font-size: 1.25rem; }/* text-xl or 2xl */

p {
    margin-bottom: var(--spacing-md);
    font-size: 1rem; /* text-base */
    color: var(--color-text-dark); /* Ensure high contrast */
}

a {
    color: var(--color-accent-primary);
    text-decoration: none;
    transition: color var(--transition-speed-fast) var(--transition-easing);
}
a:hover, a:focus {
    color: var(--color-accent-primary-darker);
    text-decoration: underline;
}

.section-title {
    /* Tailwind classes are used in HTML, but this is a fallback/enhancement */
    /* text-3xl md:text-4xl lg:text-5xl font-bold mb-8 md:mb-12 text-center */
    color: var(--color-neutral-darkest); /* Ensure dark for contrast */
}

/* 4. Layout Utilities (Mostly handled by Tailwind) */
.container { /* Tailwind's container class is used */
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}
@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }


/* 5. Navigation (Header, Mobile Menu) */
header {
    /* bg-brand-neutral-light border-b-2 border-brand-neutral-dark sticky top-0 z-50 */
    border-bottom: var(--border-brutalist);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow for fixed header */
}

header .font-manrope { /* For logo and nav items */
    font-family: var(--font-primary);
}
header nav a {
    position: relative;
    padding-bottom: var(--spacing-xs);
    color: var(--color-text-dark);
}
header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 2px;
    right: 0;
    background: var(--color-accent-primary);
    transition: width var(--transition-speed-normal) var(--transition-easing);
}
header nav a:hover::after,
header nav a.font-bold::after { /* Active link style from HTML */
    width: 100%;
    left: 0;
    background-color: var(--color-accent-primary);
}
header nav a:hover {
    color: var(--color-accent-primary);
    text-decoration: none;
}

#burger-menu-button svg {
    transition: transform var(--transition-speed-normal) var(--transition-easing);
}
#burger-menu-button[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

#mobile-menu {
    border-top: var(--border-brutalist);
    background-color: var(--color-neutral-light); /* Ensure bg color */
}
#mobile-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--color-text-dark);
}
#mobile-menu a:hover {
    background-color: var(--color-neutral-lightest);
    color: var(--color-accent-primary);
}


/* 6. Hero Section */
#hero {
    /* min-h-screen flex items-center justify-center text-center */
    color: var(--color-text-light); /* White text */
    position: relative; /* For overlay */
}
#hero::before { /* Dark overlay for text readability on image */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-dark-overlay);
    z-index: 0; /* Behind content */
}
#hero > .container {
    position: relative; /* Ensure content is above overlay */
    z-index: 1;
}
#hero h1 {
    color: var(--color-text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); /* From HTML */
}
#hero p {
    color: var(--color-text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7); /* From HTML */
}

/* Parallax effect for hero background (if using CSS method) */
.hero-parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 7. Card Styles */
.card {
    /* bg-white border-2 border-brand-neutral-dark shadow-brutalist-hard overflow-hidden */
    background-color: var(--color-neutral-lightest);
    border: var(--border-brutalist);
    box-shadow: var(--shadow-brutalist-hard);
    transition: transform var(--transition-speed-normal) var(--transition-easing),
                box-shadow var(--transition-speed-normal) var(--transition-easing);
    display: flex; /* For centering content as per strict rule */
    flex-direction: column;
    /* align-items: center;  Content inside card-content can be centered with text-align or flex */
}

.card:hover {
    transform: translateY(-5px) translateX(-5px);
    box-shadow: 8px 8px 0px var(--color-neutral-darkest); /* Enhanced brutalist shadow */
}

.card-image { /* Container for the image */
    width: 100%;
    /* height: 200px; Example fixed height, can be adjusted per card type if needed */
    overflow: hidden;
    /* display: flex; align-items: center; justify-content: center; */ /* Centering image inside */
}

.card-image img {
    width: 100%;
    height: 100%; /* Make image fill its container */
    object-fit: cover; /* Crucial for fixed height containers */
    display: block; /* Remove extra space below image */
    /* margin: 0 auto; /* If parent is text-align: center, but flex is better for .card-image */
}

.card-content {
    padding: var(--spacing-lg);
    flex-grow: 1; /* Allows content to take remaining space if card has fixed height */
    /* text-align: center; For centering text elements inside */
    display: flex;
    flex-direction: column;
    /* justify-content: center; /* To vertically center content if desired */
    /* align-items: center; /* To horizontally center content */
}
.card-content h3 {
    margin-top: 0;
    color: var(--color-neutral-darkest);
}
.card-content p {
    color: var(--color-text-dark); /* Ensure good contrast */
}

/* Specific card styles for different sections (e.g., team member, event) can go here */
/* Example: Instructor cards might need specific image container height */
#about .card-image img { /* For instructor portrait */
    /* width: 128px; height: 128px; in HTML, handled by Tailwind classes */
}
#events .card-image, #projects .card-image {
    height: 250px; /* Example fixed height for event/project cards */
}


/* "Read More" link style */
.read-more-link {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: bold;
    color: var(--color-accent-primary);
    text-decoration: none;
    padding: var(--spacing-xs) 0;
    position: relative;
    transition: color var(--transition-speed-fast) var(--transition-easing);
}
.read-more-link::after {
    content: '→'; /* Arrow */
    margin-left: var(--spacing-xs);
    transition: transform var(--transition-speed-fast) var(--transition-easing);
    display: inline-block;
}
.read-more-link:hover {
    color: var(--color-accent-primary-darker);
    text-decoration: none; /* remove default underline */
}
.read-more-link:hover::after {
    transform: translateX(4px);
}


/* 8. Button Styles (Global) */
.btn, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1rem; /* text-base or lg */
    padding: var(--spacing-sm) var(--spacing-lg); /* py-3 px-6 */
    border: var(--border-brutalist);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all var(--transition-speed-fast) var(--transition-easing);
    box-shadow: var(--shadow-brutalist-hard-small);
    line-height: 1.5; /* Ensure text is vertically centered */
}

.btn-primary, button[type="submit"] { /* Tailwind uses classes like btn-primary */
    background-color: var(--color-neutral-darkest);
    color: var(--color-text-light);
}
.btn-primary:hover, button[type="submit"]:hover {
    background-color: var(--color-neutral-dark); /* Slightly lighter dark */
    color: var(--color-text-light);
    transform: translateY(-2px) translateX(-2px);
    box-shadow: var(--shadow-brutalist-hard); /* Larger shadow on hover */
}
.btn-primary:active, button[type="submit"]:active {
    transform: translateY(1px) translateX(1px);
    box-shadow: var(--shadow-brutalist-hard-small) inset;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-neutral-darkest);
    border-color: var(--color-neutral-darkest);
}
.btn-secondary:hover {
    background-color: var(--color-neutral-darkest);
    color: var(--color-text-light);
    transform: translateY(-2px) translateX(-2px);
    box-shadow: var(--shadow-brutalist-hard);
}
.btn-secondary:active {
    transform: translateY(1px) translateX(1px);
    box-shadow: var(--shadow-brutalist-hard-small) inset;
}

/* 9. Form Styles */
.input-field, textarea.input-field {
    /* w-full p-3 border-2 border-brand-neutral-dark bg-white ... shadow-brutalist-hard-inset */
    width: 100%;
    padding: var(--spacing-sm);
    background-color: var(--color-neutral-lightest);
    color: var(--color-text-dark);
    border: var(--border-brutalist);
    box-shadow: var(--shadow-brutalist-hard-inset);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color var(--transition-speed-fast) var(--transition-easing),
                box-shadow var(--transition-speed-fast) var(--transition-easing);
    border-radius: 0; /* Brutalist often avoids rounded corners */
}
.input-field::placeholder {
    color: var(--color-neutral-medium);
    opacity: 0.8;
}
.input-field:focus, textarea.input-field:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: var(--shadow-brutalist-hard-inset), 0 0 0 2px var(--color-accent-primary); /* Focus ring */
}

label {
    /* block font-manrope text-lg font-medium text-brand-neutral-dark mb-2 */
    display: block;
    font-family: var(--font-primary);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-dark);
}

textarea.input-field {
    min-height: 120px;
    resize: vertical;
}


/* 10. Accordion Styles */
.accordion-item {
    /* bg-white border-2 border-brand-neutral-dark shadow-brutalist-hard */
    background-color: var(--color-neutral-lightest);
    border: var(--border-brutalist);
    box-shadow: var(--shadow-brutalist-hard-small);
    margin-bottom: var(--spacing-sm);
}
.accordion-header {
    /* w-full text-left p-4 font-manrope font-bold text-lg ... flex justify-between items-center */
    width: 100%;
    background-color: transparent;
    border: none;
    padding: var(--spacing-md);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.125rem; /* text-lg */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-neutral-darkest);
    transition: background-color var(--transition-speed-fast) var(--transition-easing);
}
.accordion-header:hover {
    background-color: var(--color-neutral-light); /* Subtle hover */
}
.accordion-header svg {
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
    transition: transform var(--transition-speed-normal) var(--transition-easing);
    color: var(--color-neutral-darkest);
}
.accordion-item.active .accordion-header svg {
    transform: rotate(180deg);
}
.accordion-content {
    /* hidden p-4 border-t-2 border-brand-neutral-dark */
    overflow: hidden;
    max-height: 0; /* For transition */
    padding: 0 var(--spacing-md); /* Padding applied when open */
    border-top: var(--border-brutalist);
    transition: max-height var(--transition-speed-normal) ease-in-out,
                padding var(--transition-speed-normal) ease-in-out;
    color: var(--color-text-dark);
}
.accordion-item.active .accordion-content {
    padding: var(--spacing-md);
    /* max-height is set by JS */
}


/* 11. Footer Styles */
footer {
    /* bg-brand-neutral-dark text-neutral-300 py-12 border-t-4 border-brand-accent */
    background-color: var(--color-neutral-darkest);
    color: var(--color-neutral-medium); /* Lighter text for dark bg */
    padding-top: var(--spacing-xxl);
    padding-bottom: var(--spacing-xxl);
    border-top: 4px solid var(--color-accent-primary);
}
footer h4, footer h5 {
    font-family: var(--font-primary);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}
footer p, footer li {
    font-family: var(--font-secondary);
    font-size: 0.875rem; /* text-sm */
    color: var(--color-neutral-medium);
}
footer a {
    color: var(--color-neutral-medium);
    transition: color var(--transition-speed-fast) var(--transition-easing);
}
footer a:hover {
    color: var(--color-text-light);
    text-decoration: underline;
}
footer .font-manrope { /* Logo text in footer */
    font-family: var(--font-primary);
}

/* Footer social links (text-based) */
footer .flex.space-x-4 a { /* Targeting the social links container */
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid transparent; /* Placeholder for potential brutalist touch */
    transition: color var(--transition-speed-fast), border-color var(--transition-speed-fast);
}
footer .flex.space-x-4 a:hover {
    color: var(--color-accent-primary);
    /* border-color: var(--color-accent-primary); Optional: add border on hover */
    text-decoration: none;
}


/* 12. Specific Page Styles */

/* success.html */
body.success-page { /* Add class="success-page" to body of success.html */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body.success-page main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-page .max-w-md { /* The centered card on success page */
    /* Styles for the card itself, border, shadow are from .card or Tailwind */
}
.success-page .max-w-md svg { /* Checkmark icon */
    color: var(--color-accent-secondary); /* Or a success green */
}

/* privacy.html & terms.html */
body.privacy-page main, body.terms-page main { /* Add class to body of privacy/terms.html */
    padding-top: 100px; /* To avoid overlap with fixed header */
}
.prose-styles h1, .prose-styles h2, .prose-styles h3 {
    color: var(--color-neutral-darkest);
}
.prose-styles p, .prose-styles ul, .prose-styles li {
    color: var(--color-text-dark);
}
.prose-styles a {
    color: var(--color-accent-primary);
}
.prose-styles a:hover {
    color: var(--color-accent-primary-darker);
}


/* 13. Utility Classes */
.bg-fixed-parallax { /* For parallax backgrounds */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
/* Style for background images with text overlay */
.bg-image-overlay {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.bg-image-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-dark-overlay);
    z-index: 1;
}
.bg-image-overlay > * { /* Ensure content is above overlay */
    position: relative;
    z-index: 2;
}

/* Text shadow for high contrast on images/complex backgrounds */
.text-shadow-overlay {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6), 0 0 5px rgba(0,0,0,0.4);
}


/* Glassmorphism example (use sparingly with Brutalism) */
.glass-effect {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 14. Animations & Transitions */
/* ScrollReveal class - initial state */
.reveal-on-scroll {
    visibility: hidden; /* Handled by ScrollReveal JS */
}

/* Smooth transitions for interactive elements are generally applied directly */
/* e.g., on buttons, links, cards */

/* Cookie Consent Popup (from HTML, basic styling) */
#cookie-consent-popup {
    /* Style provided in HTML, ensure it uses CSS variables if needed */
    /* border-top: 2px solid var(--color-accent-primary); */ /* Example */
}
#cookie-consent-popup button {
    /* Uses .btn styles, can be overridden if specific style needed here */
    /* background-color: var(--color-accent-primary); */
    /* color: var(--color-text-on-accent); */
}