/* Custom CSS for Rachael Schroeder Website */

:root {
  /* Purple accent colors */
  --purple-primary: #8b5fbf;
  --purple-light: #a678d9;
  --purple-dark: #6a4493;
  --purple-subtle: rgba(139, 95, 191, 0.1);
  
  /* Dark theme palette */
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #222222;
  --bg-light: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #888888;
  --border-color: #333333;
  
  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Playfair Display', serif;
}

/* Global Styles */
* {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

html {
  overflow-x: hidden; /* Prevent horizontal scroll on html */
}

/* Main content container with side margins */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media screen and (min-width: 1400px) {
  .container {
    padding: 0 4rem;
  }
}

@media screen and (min-width: 1600px) {
  .container {
    padding: 0 6rem;
  }
}

/* Section spacing */
.section {
  padding: 4rem 0;
}

@media screen and (min-width: 768px) {
  .section {
    padding: 6rem 0;
  }
}

/* Typography */
.title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.hero-subtitle {
  color: var(--purple-primary);
  font-weight: 500;
}

.content {
  color: var(--text-secondary);
}

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

.content strong {
  color: var(--text-primary);
}

/* Inline links within content */
.inline-link {
  display: inline; /* Explicitly ensure inline behavior */
  color: var(--purple-primary);
  text-decoration: underline;
  text-decoration-color: rgba(139, 95, 191, 0.5);
  text-underline-offset: 3px;
  transition: all 0.3s ease;
  hyphens: auto; /* Allow hyphenation in links */
  word-break: normal;
  white-space: normal; /* Ensure normal white space handling */
}

.inline-link:hover {
  color: var(--purple-light);
  text-decoration-color: var(--purple-light);
}

/* Better text wrapping for mobile */
@media screen and (max-width: 768px) {
  .content p {
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto; /* Enable hyphenation for natural text flow */
  }
  
  .inline-link {
    display: inline; /* Maintain inline on mobile */
    hyphens: auto; /* Allow hyphenated breaks in links on mobile */
    word-break: normal;
    white-space: normal;
  }
}

/* Navigation */
.navbar {
  background-color: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar-item {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-item:hover,
.navbar-item:focus,
.navbar-item.is-active {
  color: var(--purple-primary) !important;
  background-color: transparent !important;
}

.navbar-brand .navbar-item {
  color: var(--purple-primary);
  font-weight: 700;
  letter-spacing: 1px;
}

/* Mobile navbar improvements */
.navbar-burger {
  color: var(--text-primary);
  height: 3.25rem;
  width: 3.25rem;
}

.navbar-burger span {
  background-color: var(--purple-primary);
  height: 2px;
  width: 18px;
}

.navbar-burger:hover {
  background-color: rgba(139, 95, 191, 0.1);
}

/* Mobile menu styles */
@media screen and (max-width: 1023px) {
  .navbar-menu {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  }
  
  .navbar-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .navbar-item:last-child {
    border-bottom: none;
  }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding-top: 80px;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

.hero-body {
  padding: 6rem 1.5rem;
  width: 100%;
}

.hero .container {
  width: 100%;
  max-width: 1200px;
}

.hero .columns {
  width: 100%;
  margin: 0;
}

.hero .column {
  padding: 1rem;
}

.hero-image {
  position: relative;
  max-width: 400px;
  margin: 2rem auto; /* Add top/bottom margin for shadow space */
  border-radius: 20px;
  overflow: visible; /* Allow shadow to extend beyond container */
  box-shadow: 0 20px 40px rgba(139, 95, 191, 0.3);
  background-color: var(--bg-card);
  width: 100%;
  aspect-ratio: 1; /* Enforce square aspect ratio */
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  display: block;
  border-radius: 20px; /* Move border-radius to the img element */
}

.hero-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--purple-primary), var(--purple-light));
  opacity: 0.1;
  border-radius: 20px;
  z-index: -1;
}

/* Fallback for broken images */
.hero-image img[src=""],
.hero-image img:not([src]) {
  opacity: 0;
}

.hero-image img[alt]:after {
  content: attr(alt);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  width: 100%;
}

/* Buttons */
.button.is-primary {
  background-color: var(--purple-primary);
  border-color: var(--purple-primary);
  color: var(--white);
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.button.is-primary:hover {
  background-color: var(--purple-dark);
  border-color: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 95, 191, 0.3);
}

.button.is-outlined {
  border-color: var(--purple-primary);
  color: var(--purple-primary);
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.button.is-outlined:hover {
  background-color: var(--purple-primary);
  border-color: var(--purple-primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 95, 191, 0.3);
}

/* Stats Card */
.stats-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 3rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
  margin-bottom: 2rem;
}

.stat-item:last-child {
  margin-bottom: 0;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--purple-primary);
  font-family: var(--font-display);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Service Cards */
.service-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(139, 95, 191, 0.25);
  border-color: var(--purple-primary);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--purple-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-icon i {
  font-size: 1.5rem;
  color: var(--purple-primary);
}

.service-card p {
  color: var(--text-secondary);
}

.featured-service {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
  color: var(--text-primary);
}

.featured-service .service-icon {
  background: rgba(255, 255, 255, 0.2);
}

.featured-service .service-icon i {
  color: var(--text-primary);
}

.featured-service .title {
  color: var(--text-primary);
}

.featured-service p {
  color: rgba(255, 255, 255, 0.9);
}

/* Project Cards */
.project-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(139, 95, 191, 0.25);
  border-color: var(--purple-primary);
}

/* Video Container for YouTube Embeds */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
}

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

/* Video Placeholder (for local file compatibility) */
.video-placeholder {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-placeholder:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(139, 95, 191, 0.3);
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(139, 95, 191, 0.9);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.play-button:hover {
  background: var(--purple-primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 1rem;
  padding-top: 2rem;
}

.project-video {
  margin-bottom: 1.5rem;
}

.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-stats {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: var(--purple-subtle);
  color: var(--purple-light);
  border: 1px solid var(--purple-primary);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Testimonials */
.testimonial-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  border-left: 4px solid var(--purple-primary);
  transition: all 0.3s ease;
  height: 100%;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(139, 95, 191, 0.25);
}

.testimonial-content {
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.testimonial-author {
  color: var(--text-primary);
  font-weight: 600;
}

.testimonial-author strong {
  color: var(--text-primary);
  font-weight: 600;
}

.testimonial-author small {
  color: var(--text-secondary);
  font-weight: 400;
}

.testimonial-author a {
  color: var(--purple-primary);
  text-decoration: none;
}

.testimonial-author a:hover {
  color: var(--purple-light);
  text-decoration: underline;
}

/* Contact Section */
.contact-info {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.contact-item .icon {
  margin-right: 0.75rem;
  color: var(--purple-primary);
}

.contact-item a {
  color: var(--purple-primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-form {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.input, .textarea, .select select {
  background-color: var(--bg-light);
  border-color: var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  transition: border-color 0.3s ease;
}

.input:focus, .textarea:focus, .select select:focus {
  border-color: var(--purple-primary);
  box-shadow: 0 0 0 0.125em rgba(139, 95, 191, 0.25);
}

.input::placeholder, .textarea::placeholder {
  color: var(--text-muted);
}

.label {
  color: var(--text-primary);
  font-weight: 600;
}

.select:not(.is-multiple):not(.is-loading)::after {
  border-color: var(--purple-primary);
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 3rem 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-link {
  color: var(--text-secondary);
  transition: all 0.3s ease;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}

.social-link:hover {
  color: var(--purple-light);
  background-color: var(--purple-subtle);
  border-color: var(--purple-primary);
  transform: translateY(-3px);
}

/* Background Sections */
.has-background-secondary {
  background-color: var(--bg-secondary);
}

.has-background-card {
  background-color: var(--bg-card);
}

/* Additional spacing for hero content */
.hero .subtitle {
  color: var(--text-muted);
}

/* Responsive Design */
/* Mobile First - Extra Small Devices (320px and up) */
@media screen and (max-width: 480px) {
  /* Global container fixes */
  .container {
    padding: 0 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Navbar fixes for small screens */
  .navbar-brand .navbar-item {
    font-size: 1rem;
    padding-right: 0.5rem;
  }
  
  .navbar-burger {
    margin-left: auto;
  }
  
  /* Hero section mobile fixes */
  .hero {
    min-height: auto;
    padding-top: 70px;
  }
  
  .hero-body {
    padding: 2rem 1rem;
  }
  
  .hero .columns {
    display: flex;
    flex-direction: column;
  }
  
  .hero .column {
    width: 100% !important;
    flex: none !important;
  }
  
  .hero-image {
    max-width: 280px;
    margin: 1.5rem auto 2rem auto; /* Add space for shadow */
    aspect-ratio: 1; /* Maintain square aspect ratio */
  }
  
  .hero-title {
    font-size: 1.8rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: 1px;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: 1rem;
  }
  
  .hero .title.is-1 {
    font-size: 1.8rem !important;
  }
  
  .hero .subtitle.is-3 {
    font-size: 1rem !important;
  }
  
  /* Buttons responsive */
  .buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .button.is-large {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
  }
  
  /* Content spacing */
  .section {
    padding: 2rem 0;
  }
  
  /* Typography adjustments */
  .title.is-2 {
    font-size: 1.5rem !important;
  }
  
  .title.is-3 {
    font-size: 1.25rem !important;
  }
  
  /* Stats card mobile */
  .stats-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  /* Cards mobile spacing */
  .service-card, .project-card, .testimonial-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
  }
  
  /* Contact form mobile */
  .contact-form {
    margin-top: 1.5rem;
  }
  
  .contact-content .columns {
    flex-direction: column;
  }
  
  .contact-content .column {
    width: 100% !important;
  }
  
  /* Footer social links */
  .social-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .social-link {
    margin: 0.25rem;
  }
}

/* Small Mobile Devices (481px to 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-image {
    max-width: 320px;
    margin: 1.5rem auto; /* Add space for shadow */
    aspect-ratio: 1; /* Maintain square aspect ratio */
  }
  
  .buttons {
    justify-content: center;
  }
  
  .button.is-large {
    font-size: 1.1rem;
  }
}

/* Tablet and up */
@media screen and (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .stats-card {
    margin-top: 2rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .service-card, .project-card, .testimonial-card {
    margin-bottom: 1rem;
  }
  
  .contact-form {
    margin-top: 2rem;
  }
  
  .container {
    padding: 0 1rem;
    width: 100%;
    max-width: 100%;
  }
  
  .section {
    padding: 3rem 0;
    width: 100%;
  }
  
  .hero-body {
    padding: 4rem 1.5rem;
  }
  
  /* Force hero columns to stack */
  .hero .columns.is-vcentered {
    align-items: center;
  }
  
  .hero .column.is-half {
    width: 100% !important;
    flex: none !important;
  }
  
  /* Center align on mobile */
  .has-text-centered-mobile {
    text-align: center !important;
  }
}

/* Smooth scrolling offset for fixed navbar */
section {
  scroll-margin-top: 120px;
}

@media screen and (max-width: 768px) {
  section {
    scroll-margin-top: 100px;
  }
}

/* Animation for cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card, .project-card, .testimonial-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading state for images */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}

/* SEO and Performance Optimizations */

/* Improve Core Web Vitals */
html {
  scroll-behavior: smooth;
}

/* Optimize font loading - use font-display in Google Fonts URL instead */
/* Google Fonts already includes font-display: swap in the URL */

/* Image optimization - loading attribute goes in HTML */
img {
  max-width: 100%;
  height: auto;
}

/* Accessibility improvements */
:focus {
  outline: 2px solid var(--purple-primary);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--purple-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}

.skip-link:focus {
  top: 6px;
}

/* Improve button contrast */
.button:focus {
  box-shadow: 0 0 0 0.125em rgba(139, 95, 191, 0.5);
}

/* Better link styling for accessibility */
a:not(.button):not(.navbar-item):not(.social-link) {
  color: var(--purple-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:not(.button):not(.navbar-item):not(.social-link):hover {
  color: var(--purple-light);
  text-decoration: none;
}

/* Ensure sufficient color contrast */
.has-text-grey-dark {
  color: var(--text-secondary) !important;
}

/* Optimize layout shifts - use aspect-ratio for modern browsers */
.hero-image {
  aspect-ratio: 1; /* Square images */
}

.service-card,
.project-card,
.testimonial-card {
  min-height: 250px;
}

/* Print styles for better SEO */
@media print {
  .navbar,
  .hero-image,
  .social-links {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black !important;
    background: white !important;
  }
}

/* Utility Classes for Mobile */
.is-mobile-full-width {
  width: 100% !important;
}

.is-mobile-centered {
  text-align: center !important;
}

.is-mobile-hidden {
  display: none !important;
}

@media screen and (min-width: 769px) {
  .is-mobile-hidden {
    display: block !important;
  }
}

/* Ensure no horizontal overflow anywhere */
.container, .columns, .column {
  max-width: 100%;
  overflow-x: hidden;
}

/* Fix any potential layout breaking elements */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Improve touch targets on mobile */
@media screen and (max-width: 768px) {
  .button, .navbar-item, a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .navbar-item {
    padding: 1rem 1.5rem;
  }
}
