/*
 * Global styles for the NOBCChE University of Tennessee Knoxville chapter website.
 *
 * The palette is inspired by the University of Tennessee's signature orange and
 * the chapter’s branding. Colors and layout variables live at the top of
 * the file so they can be easily tweaked if the look needs adjusting.
 */

/* CSS custom properties for easy theming */
:root {
  --primary-color: #ff8200;     /* UT orange */
  --secondary-color: #f5f5f5;   /* light gray for backgrounds */
  --dark-color: #1a1a1a;        /* dark charcoal */
  --light-color: #ffffff;       /* white */
  --accent-color: #58595b;      /* medium gray */
  --max-width: 1200px;
  --transition-speed: 0.3s;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* CSS reset to ensure consistent styling across browsers */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--secondary-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Header and navigation */
header {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 48px;
  width: auto;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  color: var(--light-color);
  margin-left: 1.5rem;
  font-weight: 600;
  transition: color var(--transition-speed);
  font-size: 1rem;
}

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

/* Highlight the active navigation link */
nav a.active {
  color: var(--primary-color);
}

/* Responsive navigation: stack links on small screens */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  nav a {
    margin: 0.5rem 1rem;
  }
}

/* Hero section */
.hero {
  position: relative;
  height: 60vh;
  background-image: url('assets/images/hero.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light-color);
}

/* Dark overlay on hero for better contrast */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

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

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.button {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

/* Slightly darker shade for button hover state. CSS doesn't support
 * dynamic darken functions natively, so we specify the desired color.
 * This value corresponds to roughly a 10% darker version of
 * our primary orange (#ff8200 → #e67300).
 */
.button:hover {
  background-color: #e67300;
}

/* Utility container to limit width */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Section styling */
.section {
  padding: 4rem 0;
  background-color: var(--secondary-color);
}

.section.alt {
  background-color: var(--light-color);
}

.section h2 {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.section p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

/* Flex layout for two-column sections */
.two-column {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.two-column .text,
.two-column .image {
  flex: 1;
  min-width: 280px;
}

.two-column img {
  border-radius: 8px;
}

/* Prevent large images in two‑column layouts from overwhelming text.
 * Center the image and limit its width for better balance on larger screens. */
.two-column .image img {
  max-width: 80%;
  margin: 0 auto;
}

/* Cards for features/events */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background-color: var(--light-color);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.card p {
  flex: 1;
  font-size: 1rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.card a {
  align-self: flex-start;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 0.5rem;
  transition: color var(--transition-speed);
}

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

/* Form styling */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

form label {
  font-weight: 600;
  color: var(--dark-color);
}

form input,
form textarea,
form select {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form button {
  align-self: flex-start;
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

form button:hover {
  background-color: #e67300;
}

/* Table/responsive iframe wrapper */
.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-top: 2rem;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

footer p {
  margin-bottom: 0.5rem;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}