/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import "contacts.css";

/* Web Awesome Color Variables */
:root {
  --wa-color-neutral-50: #fafafa;
  --wa-color-neutral-100: #f5f5f5;
  --wa-color-neutral-200: #e5e5e5;
  --wa-color-neutral-300: #d4d4d4;
  --wa-color-neutral-400: #a3a3a3;
  --wa-color-neutral-500: #737373;
  --wa-color-neutral-600: #525252;
  --wa-color-neutral-700: #404040;
  --wa-color-neutral-800: #262626;
  --wa-color-neutral-900: #171717;
  --wa-color-blue-60: #3b82f6;
  --wa-color-gray-70: #737373;
}

/* Base styles */
body {
  font-family: 'Merriweather', Georgia, serif;
  line-height: 1.6;
  color: #e5e5e5;
  margin: 0;
  padding: 0;
  /* Ensure body takes full width and height for cinematic layout */
  overflow-x: hidden;
  background-color: #1e1e1e;
  /* Darker background for non-homepage pages */
  min-height: 100vh;
  width: 100%;
}

/* Homepage gets no background color (transparent for hero image) */
body.homepage {
  background: transparent;
  color: white;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Cormorant', Georgia, serif;
  font-weight: 400;
}

/* Remove container padding on homepage for full-width hero */
body.homepage main.container {
  padding: 0;
  max-width: none;
  margin: 0;
}

/* Adjust main content to account for fixed navbar */
body:not(.homepage) {
  padding-top: 120px;
  /* Increased from 80px for more space below navbar */
}

/* Ensure body takes full height for proper navbar positioning */
html {
  background-color: #1e1e1e;
  /* Ensure consistent dark background coverage */
}

html,
body {
  min-height: 100%;
}

/* Header and Navigation */
.navbar {
  color: white;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0);
}

/* Scrolled state for all pages */
.navbar.scrolled {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 1200px;
  /* Wider navbar while keeping content at 800px */
}

.brand {
  color: white;
  text-decoration: none;
  font-size: 3rem;
  font-weight: bold;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.nav-secondary {
  font-size: 0.85rem;
  opacity: 0.8;
  color: #ccc;
}

.nav-links a.nav-secondary:hover {
  opacity: 1;
  color: white;
}

/* Mobile responsive navigation */
@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #333;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-top: 1px solid #444;
    /* Initially hidden to prevent flash */
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
    /* Ensure menu is immediately hidden on mobile */
    display: none;
  }

  /* Only show the menu when explicitly opened */
  .nav-links.mobile-menu-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 1rem 2rem;
    border-radius: 0;
    border-bottom: 1px solid #444;
    width: 100%;
    text-align: left;
    justify-content: flex-start;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
}

/* Web Awesome icon styling in navigation */
.nav-links wa-icon {
  font-size: 1rem;
  opacity: 0.8;
}

/* Alerts */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #6c757d;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: #545b62;
}

.btn-primary {
  background-color: #007bff;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #545b62;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
}

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

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* Cinematic Hero Section */
.cinematic-hero {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Ensure hero breaks out of any container constraints */
  z-index: 1;
  background: #181818;
  /* fallback background for image loading */
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

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

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 2rem;
  margin-top: 80px;
  /* Account for fixed navbar */
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 300;
  margin-bottom: 3rem;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1.4;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-decoration: none;
  display: inline-block;
}

.btn-primary.btn-large {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-primary.btn-large:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary.btn-large {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-secondary.btn-large:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Featured Work Section */
.featured-work {
  padding: 5rem 0;
  margin-top: 100vh;
  /* Push below the full-height hero */
  background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
}

.section-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 4rem;
  color: #e5e5e5;
  letter-spacing: 1px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Single column spanning full width */
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* News section spans full width */
.news-section {
  width: 100%;
}

.work-category {
  background: #2a2a2a;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.work-category h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: #e5e5e5;
  border-bottom: 2px solid var(--wa-color-blue-60);
  padding-bottom: 0.5rem;
}

.work-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #444;
}

.work-item:last-child {
  margin-bottom: 1rem;
  border-bottom: none;
}

.work-link {
  color: #e5e5e5;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.work-link:hover {
  color: var(--wa-color-blue-60);
}

.work-meta {
  color: var(--wa-color-gray-70);
  font-size: 0.9rem;
  margin: 0.5rem 0;
  font-style: italic;
}

.work-excerpt {
  color: #b5b5b5;
  line-height: 1.6;
}

/* Connect Actions */
.connect-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-link {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

.action-link:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.more-link {
  display: inline-block;
  color: var(--wa-color-blue-60);
  text-decoration: none;
  font-weight: 500;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.more-link:hover {
  color: var(--wa-color-blue-60);
  transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 0;
  }

  .cinematic-hero {
    height: 100vh;
    align-items: stretch;
    /* Allow content to fill height */
  }

  .hero-content {
    padding: 1rem;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100vh - 100px);
    /* Full height minus navbar space */
  }

  .hero-text {
    padding-top: 60px;
    /* Position text in upper portion */
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    padding-bottom: 40px;
    /* Reduced to move buttons closer to bottom */
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work-category {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }

  .mobile-menu-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
    display: none;
  }

  .nav-links.mobile-menu-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 1rem 2rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: left;
    justify-content: flex-start;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
}

/* Forms */
.auth-form {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: #2a2a2a;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #e5e5e5;
}

/* Web Awesome form component label styling for dark theme */
wa-input::part(label),
wa-textarea::part(label),
wa-checkbox::part(label) {
  color: #e5e5e5 !important;
  font-weight: 600;
}

.field .form-check-input {
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.field .form-check-label {
  display: inline;
  font-weight: normal;
  margin-bottom: 0;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Error messages */
.error-messages {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-messages ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--wa-color-gray-70);
}

/* Navigation */
.navigation {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.more-link {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}

.more-link:hover {
  text-decoration: underline;
}

/* Form Error Styling */
.wa-input--invalid {
  border-color: var(--wa-color-danger-600) !important;
  box-shadow: 0 0 0 1px var(--wa-color-danger-600) !important;
}

.wa-input--invalid:focus {
  border-color: var(--wa-color-danger-600) !important;
  box-shadow: 0 0 0 2px var(--wa-color-danger-200) !important;
  outline: none;
}

/* Error message styling */
small[style*="color: var(--wa-color-danger-600)"] {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

/* About page styles */
.about-edit {
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #444;
}

.page-header h1 {
  margin: 0;
  color: #e5e5e5;
}

.about-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #b5b5b5;
}

.about-content p {
  margin-bottom: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Video page styles */
.videos-page {
  /* Remove width constraints to allow full background coverage */
}

.video-show,
.video-form {
  max-width: 1200px;
  margin: 0 auto;
}

.video-form {
  max-width: 900px;
}

/* Web Awesome grid configuration for videos */
.videos-page .wa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: start;
}

.featured-videos .wa-grid {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

/* All Videos section - 3 videos per row */
.all-videos .wa-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .all-videos .wa-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .all-videos .wa-grid {
    grid-template-columns: 1fr;
  }
}

/* Web Awesome card styling for videos */
wa-card.video-card {
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

wa-card.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.video-link {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
}

.video-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.video-info h3,
.video-info h5 {
  color: var(--wa-color-neutral-050);
  font-weight: 600;
}

.video-info h3 a {
  color: inherit;
  text-decoration: none;
}

.video-info h3 a:hover {
  color: var(--wa-color-blue-60);
}

.video-info .video-description,
.video-info .video-duration {
  color: var(--wa-color-neutral-100);
  font-weight: 500;
}

.video-actions {
  margin-top: auto;
}

/* Media slot styling for Web Awesome cards */
wa-card.video-card img[slot="media"] {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.video-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.video-player-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: background 0.2s ease;
  cursor: pointer;
  z-index: 2;
}

.play-button:hover {
  background: rgba(0, 0, 0, 0.9);
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff6b35;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Sortable drag states */
.sortable-ghost {
  opacity: 0.4;
  transform: rotate(2deg);
}

.sortable-chosen {
  background: rgba(0, 123, 255, 0.1);
}

.sortable-drag {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  transform: rotate(2deg);
}

.drag-handle {
  cursor: grab;
}

/* Discourse topics styled like News posts */
.discourse-topics {
  width: 100%;
}

.discourse-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #444;
}

.discourse-item:last-child {
  margin-bottom: 1rem;
  border-bottom: none;
}

.discourse-link {
  color: #e5e5e5;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.discourse-link:hover {
  color: var(--wa-color-blue-60);
}

.discourse-meta {
  color: var(--wa-color-gray-70);
  font-size: 0.9rem;
  margin: 0.5rem 0;
  font-style: italic;
}