/*
 * styles.css - The Atomic Aura (Multipage Edition)
 * This stylesheet provides the consistent visual structure and aesthetic
 * for the entire "I AM ATOMIC" themed multi-page website.
 * It includes CSS3 Transitions, Keyframe Animations, responsive design,
 * and styling for shared components like header, nav, and footer.
 */

/* Universal Box-Sizing for consistent Box Model behavior */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Basic Body Styles (Element Selector) */
body {
  font-family: "Inter", sans-serif; /* Using Inter font */
  background-color: #1a202c; /* Deep dark background */
  color: #cbd5e0; /* Light gray text for contrast */
  line-height: 1.6;
  margin: 0; /* Remove default body margin */
  padding: 0; /* Remove default body padding */
  min-height: 100vh; /* Ensure body takes full viewport height */
  display: flex;
  flex-direction: column; /* For sticky footer layout */
}

/* Main Content Area (Class Selector) */
.main-content {
  max-width: 1200px; /* Increased max width for more content space */
  margin: 0 auto; /* Center the main content */
  padding: 20px; /* Padding inside the main content area */
  flex-grow: 1; /* Allows main content to grow and push footer down */
}

/* Section Styling (Class Selector) - Common styles for all content sections */
.content-section {
  background-color: #2d3748; /* Dark section background */
  padding: 30px; /* Inner space around content (Box Model: Padding) */
  margin-bottom: 40px; /* Space between sections (Box Model: Margin) */
  border-radius: 10px; /* Rounded corners */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); /* Deeper shadow for depth */
  border: 1px solid #4a5568; /* Light border (Box Model: Border) */
}

.content-section h2 {
  font-size: 2.8rem; /* Heading size for sections */
  color: #c3a6ff; /* Lighter violet */
  margin-bottom: 25px; /* Space below H2 */
  border-bottom: 3px solid #805ad5; /* Thicker underline for headings */
  padding-bottom: 15px; /* Padding for the underline */
  text-align: center; /* Center section headings */
}

.content-section p {
  font-size: 1.15rem;
  margin-bottom: 20px; /* Consistent spacing for paragraphs */
  line-height: 1.8;
  color: #cbd5e0;
}

/* General Link Styling */
a {
  color: #9f7aea; /* Violet links */
  text-decoration: none; /* No underline */
  transition: color 0.3s ease, text-decoration 0.3s ease; /* Smooth transition for links */
}

a:hover {
  text-decoration: underline; /* Underline on hover */
  color: #d6bcfa; /* Lighter violet on hover */
}

/* -------------------- Header Styling -------------------- */
.main-header {
  text-align: center;
  padding: 60px 20px 20px 20px; /* Top padding, then standard */
  margin-bottom: 40px; /* Space below the header */
  background-color: #2d3748; /* Fallback background color */
  background-image: url("https://media.tenor.com/kipGUL3LxH4AAAAM/i-am-atomic-atomic.gif"); /* The Atomic GIF */
  background-size: cover; /* Cover the entire header area */
  background-position: center; /* Center the background image */
  background-repeat: no-repeat; /* Do not repeat the image */
  border-bottom: 5px solid #6b46c1; /* Thicker violet border for emphasis */
  position: relative; /* Needed for pseudo-element overlay */
  overflow: hidden; /* Hide overflowing GIF parts */
  z-index: 1; /* Ensure header content is above overlay */
}

/* Overlay for better text readability on top of the GIF */
.main-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6); /* Dark overlay */
  z-index: -1; /* Behind the content */
}

.header-content {
  position: relative; /* Ensure text is above overlay */
  z-index: 2;
}

.main-header h1 {
  font-size: 4.5rem; /* Even larger font size for main title */
  color: #a78bfa; /* Vibrant violet */
  margin-bottom: 15px; /* Space below the H1 */
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.9); /* Stronger glow effect */
}

.main-header p {
  font-size: 1.5rem; /* Larger text for subheading */
  color: #e2e8f0;
}

/* -------------------- Navigation Styling -------------------- */
.main-nav {
  margin-top: 20px;
  background-color: rgba(
    0,
    0,
    0,
    0.5
  ); /* Semi-transparent background for nav */
  padding: 10px 0;
  border-radius: 5px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; /* Use flexbox for horizontal navigation */
  justify-content: center; /* Center nav items */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.nav-list li {
  margin: 0 15px;
}

.nav-link {
  display: block;
  padding: 8px 15px;
  color: #d6bcfa;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.nav-link:hover {
  background-color: #6b46c1; /* Darker violet on hover */
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none; /* Remove underline on hover, handled by background */
}

.nav-link.current-page {
  background-color: #805ad5; /* Highlight current page */
  color: #fff;
  box-shadow: 0 0 10px rgba(128, 90, 213, 0.5);
}

.nav-toggle {
  display: none; /* Hidden by default, shown on mobile */
  background: none;
  border: none;
  color: #d6bcfa;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
}

/* -------------------- Button Styling -------------------- */
.atomic-button {
  background-color: #805ad5; /* Atomic violet */
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  cursor: pointer;
  margin: 10px; /* Consistent margin for buttons */
  transition: background-color 0.3s ease, transform 0.2s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(128, 90, 213, 0.4);
}

.atomic-button:hover {
  background-color: #6b46c1; /* Darker violet on hover */
  transform: translateY(-2px); /* Slight lift effect */
  box-shadow: 0 6px 20px rgba(128, 90, 213, 0.6);
}

.small-button {
  padding: 10px 20px;
  font-size: 1rem;
}

/* -------------------- Hero Section Styling (Home Page) -------------------- */
.hero-section {
  display: flex;
  flex-direction: row; /* Default layout for desktop */
  align-items: center;
  gap: 40px;
  background-color: #2d3748;
  padding: 60px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero-text h2 {
  font-size: 3.5rem;
  color: #a78bfa;
  margin-bottom: 20px;
  text-align: left; /* Override center alignment from .content-section h2 */
  border-bottom: none; /* Remove underline */
  padding-bottom: 0;
}

.hero-text p {
  font-size: 1.25rem;
  color: #e2e8f0;
  margin-bottom: 30px;
}

.hero-visual {
  flex: 0 0 400px; /* Fixed width for desktop */
  max-width: 50%; /* Max width relative to hero section */
  text-align: center;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 2px solid #6b46c1;
}

.image-caption {
  font-size: 0.9rem;
  color: #a0aec0;
  margin-top: 10px;
}

/* -------------------- Philosophy Page Specifics -------------------- */
.philosophy-quote-block {
  background-color: #3f4a5a;
  border-left: 5px solid #a78bfa;
  padding: 20px;
  margin: 30px auto;
  border-radius: 5px;
  font-style: italic;
  font-size: 1.2rem;
  color: #e2e8f0;
  position: relative; /* For the expanding effect */
  overflow: hidden; /* Hide overflow during transition */
  transition: max-height 0.7s ease-out, opacity 0.7s ease-out; /* Smooth transition */
  max-height: 100px; /* Default collapsed height */
  opacity: 1;
}

.philosophy-quote-block.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.read-more-button-container {
  text-align: center;
  margin-top: -20px; /* Pull button up slightly */
  z-index: 2; /* Ensure button is clickable */
  position: relative;
}

/* -------------------- Arsenal Page Specifics -------------------- */
.ability-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(280px, 1fr)
  ); /* Responsive grid */
  gap: 30px;
  margin-top: 30px;
}

.ability-card {
  background-color: #3f4a5a;
  border: 1px solid #5a6a7c;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    background-color 0.3s ease; /* Transitions for hover */
}

.ability-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 25px rgba(128, 90, 213, 0.4);
  background-color: #4a5568;
}

.ability-card h3 {
  font-size: 1.8rem;
  color: #a78bfa;
  margin-bottom: 15px;
  border-bottom: 1px dashed #805ad5;
  padding-bottom: 10px;
}

.ability-card p {
  font-size: 1rem;
  color: #e2e8f0;
  margin-bottom: 0;
}

.ability-icon {
  font-size: 3rem; /* Font Awesome icons */
  color: #d6bcfa;
  margin-bottom: 20px;
  display: block; /* Ensures centering */
  filter: drop-shadow(
    0 0 10px rgba(167, 139, 250, 0.5)
  ); /* Atomic glow for icons */
}

/* -------------------- Chronicles Page Specifics -------------------- */
.chronicle-entry {
  background-color: #3f4a5a;
  border: 1px solid #5a6a7c;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.chronicle-entry h3 {
  font-size: 1.8rem;
  color: #a78bfa;
  margin-bottom: 10px;
  text-align: left; /* Override general section h2 alignment */
  border-bottom: none;
  padding-bottom: 0;
}

.chronicle-entry .date {
  font-size: 0.9rem;
  color: #a0aec0;
  margin-bottom: 15px;
  display: block;
}

.chronicle-entry p {
  font-size: 1rem;
  color: #e2e8f0;
  margin-bottom: 0;
}

.load-more-container {
  text-align: center;
  margin-top: 30px;
}

/* -------------------- Contact Page Specifics (Form Styling) -------------------- */
.application-form {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Space between form groups */
  padding: 30px;
  border: 1px solid #6b46c1; /* Atomic violet border */
  border-radius: 8px;
  background-color: #3f4a5a; /* Slightly lighter background for the form */
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 1.1rem;
  color: #c3a6ff;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
  padding: 12px;
  border-radius: 5px;
  border: 1px solid #5a6a7c;
  background-color: #2d3748; /* Input background */
  color: #e2e8f0; /* Input text color */
  font-size: 1rem;
  outline: none; /* Remove default outline */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #a78bfa; /* Highlight border on focus */
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3); /* Subtle glow on focus */
}

.form-group textarea {
  resize: vertical; /* Allow vertical resizing of textarea */
  min-height: 100px;
}

.error-message {
  color: #f87171; /* Red color for error messages */
  font-size: 0.9rem;
  margin-top: 5px;
  min-height: 20px; /* Ensure space for error messages */
}

.form-submit-button {
  align-self: flex-end; /* Align button to the right */
  margin-top: 20px;
}

/* -------------------- Media Section Styling (Reusable for Ultimate Revelation) -------------------- */
.media-section {
  text-align: center; /* Center media content */
}

.media-figure {
  margin-bottom: 30px; /* Space between media figures */
  display: inline-block; /* Ensures consistent layout for figures */
  max-width: 100%; /* Ensure figures themselves are responsive */
}

.media-figure iframe,
.media-figure img {
  border-radius: 10px; /* Rounded corners for media */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5); /* Stronger shadow for media */
  max-width: 100%; /* Ensure media is responsive */
  height: auto; /* Maintain aspect ratio */
}

/* -------------------- Footer Styling -------------------- */
.main-footer {
  text-align: center;
  padding: 30px;
  border-top: 2px solid #4a5568; /* Separator line */
  color: #a0aec0; /* Lighter gray text */
  font-size: 1rem;
  margin-top: 50px;
}

/* -------------------- Responsive Design with Media Queries -------------------- */

/* Mobile devices (max-width: 768px) */
@media (max-width: 768px) {
  .main-header {
    padding-top: 30px; /* Adjust header padding */
  }
  .main-header h1 {
    font-size: 2.8rem; /* Smaller header on mobile */
  }

  .main-header p {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: block; /* Show hamburger icon */
    margin: 0 auto 15px auto; /* Center it */
  }

  .nav-list {
    flex-direction: column; /* Stack nav items vertically */
    height: 0; /* Hidden by default */
    overflow: hidden; /* Hide overflow */
    transition: height 0.3s ease-out; /* Smooth slide transition */
  }

  .nav-list.active {
    height: auto; /* Show when active */
  }

  .nav-list li {
    margin: 5px 0; /* Adjust vertical margin */
    width: 100%;
  }

  .nav-link {
    padding: 10px 0;
    text-align: center;
  }

  .content-section {
    padding: 20px;
    margin-bottom: 30px;
  }

  .content-section h2 {
    font-size: 2rem; /* Smaller section headings */
  }

  .content-section p {
    font-size: 1rem;
  }

  .atomic-button {
    padding: 12px 20px;
    font-size: 1rem;
    margin: 10px auto; /* Center buttons when stacked */
    display: block; /* Make buttons block level */
    width: calc(100% - 20px); /* Nearly full width */
  }

  .hero-section {
    flex-direction: column; /* Stack hero content vertically */
    padding: 30px;
    gap: 20px;
  }

  .hero-text {
    text-align: center;
  }
  .hero-text h2 {
    font-size: 2.5rem;
    text-align: center;
  }

  .hero-visual {
    flex: none; /* Remove flex sizing */
    max-width: 100%; /* Full width for image */
    width: 100%;
  }

  .ability-grid {
    grid-template-columns: 1fr; /* Single column for abilities */
    gap: 20px;
  }

  .chronicle-entry h3 {
    font-size: 1.5rem;
    text-align: center;
  }
  .chronicle-entry .date {
    text-align: center;
  }

  .form-submit-button {
    align-self: center; /* Center button in form */
    width: calc(100% - 20px);
  }

  .media-figure iframe,
  .media-figure img {
    width: 100%; /* Ensure media scales to fit */
    height: auto;
  }
}

/* Tablet devices (min-width: 769px and max-width: 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-content {
    padding: 30px;
  }

  .main-header h1 {
    font-size: 3.8rem;
  }

  .main-header p {
    font-size: 1.3rem;
  }

  .nav-list {
    justify-content: space-around;
  }

  .nav-list li {
    margin: 0 10px;
  }

  .content-section h2 {
    font-size: 2.5rem;
  }

  .hero-section {
    flex-direction: column; /* Stack hero content vertically on tablets */
    padding: 50px;
    gap: 30px;
  }
  .hero-text {
    text-align: center;
  }
  .hero-text h2 {
    text-align: center;
  }
  .hero-visual {
    flex: none;
    max-width: 80%;
    width: auto; /* Let image natural width be guide */
  }

  .ability-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns for tablets */
    gap: 25px;
  }
}
