/* =========================================================
   Autosolid — index.css (Dark Theme Only, Bug Fixes Included)
   ========================================================= */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* =========================================================
   Color Scheme & Variables (Dark Theme Only)
   ========================================================= */
:root {
  color-scheme: dark;

  --primary-bg: #212529;
  --primary-bg-alt: #2c3e50;
  --secondary-bg: #1a2533;

  --text-light: #f8f9fa;
  --text-muted: #e0e4e9; /* slightly brighter for better contrast */

  --accent-color: #e8491d;
  --accent-hover: #f05f3a;

  --card-bg: #2c3e50;
  --border-color: #34495e;

  --shadow-1: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-2: 0 10px 20px rgba(0,0,0,0.20);
  --focus-ring: 0 0 0 3px rgba(232, 73, 29, 0.35);

  --content-max: 1200px;
  --gutter: 5%;
  --header-height: 72px;
}

/* =========================================================
   Reset / Base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--text-light); text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
main { flex-grow: 1; }

/* Account for sticky header when using anchor links */
main section[id] { scroll-margin-top: var(--header-height); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-color);
  color: var(--text-light);
  padding: 8px 12px;
  z-index: 2000;
  transition: top 0.3s ease;
  border-radius: 4px;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: 3px;
}

/* =========================================================
   Header / Main Navigation
   ========================================================= */
.app-header {
  background-color: rgba(26, 37, 51, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem var(--gutter);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  min-height: var(--header-height);
}

.app-header.scrolled {
  background-color: var(--secondary-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-1);
}

.logo img {
  max-width: 150px;
  height: auto;
  transition: opacity 0.3s ease;
}
.logo a:hover img { opacity: 0.85; }

.main-nav ul { display: flex; gap: 2rem; align-items: center; }

.main-nav a {
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}
.main-nav a:hover,
.main-nav a.active { color: var(--accent-color); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

/* =========================================================
   Hero Carousel
   ========================================================= */
.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 450px;
  color: var(--text-light);
  overflow: hidden;
}

.carousel-container { position: relative; height: 100%; width: 100%; }

.carousel-track {
  list-style: none;
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--primary-bg-alt); /* Fallback for missing images */
  display: flex; justify-content: center; align-items: center;
  text-align: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  z-index: 0;
}
.carousel-slide.current-slide {
  position: relative;
  opacity: 1; visibility: visible; z-index: 1;
}

.visually-hidden-fallback,
.visually-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}

.slide-content {
  max-width: 90%;
  padding: 2rem;
  position: relative; z-index: 2;
}
.slide-content h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.slide-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2rem auto;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

/* CTA button */
.cta-button {
  background-color: var(--accent-color);
  color: var(--text-light);
  padding: 0.8rem 2rem;
  border-radius: 5px;
  font-weight: 600;
  text-transform: uppercase;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-block;
  border: none; cursor: pointer;
}
.cta-button:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}
.cta-button:focus-visible { box-shadow: var(--focus-ring); }
.cta-button:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed; transform: none; box-shadow: none;
}

/* Carousel controls */
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background-color: rgba(0,0,0,0.4);
  border: none; color: white; font-size: 2rem;
  width: 50px; height: 50px; border-radius: 50%;
  cursor: pointer; transition: background-color 0.3s ease, outline 0.3s ease;
  z-index: 3; display: flex; align-items: center; justify-content: center;
}
.carousel-nav:hover,
.carousel-nav:focus-visible {
  background-color: rgba(0,0,0,0.7);
  outline: 3px solid var(--accent-color); outline-offset: 3px;
}
.carousel-nav.prev { left: 2rem; }
.carousel-nav.next { right: 2rem; }

.carousel-indicators {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; gap: 0.75rem;
}
.carousel-indicators button {
  width: 12px; height: 12px; border-radius: 50%;
  background: #ffffff; opacity: 0.7; border: none; cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.carousel-indicators button.current-slide {
  background: var(--accent-color); opacity: 1; transform: scale(1.2);
}

.carousel-toggle {
  position: absolute; bottom: 2rem; right: 2rem;
  background-color: rgba(0,0,0,0.4);
  color: white; padding: 0.5rem 1rem; border-radius: 5px; border: none;
  cursor: pointer; font-size: 1rem; transition: background-color 0.3s ease, outline 0.3s ease;
  z-index: 3;
}
.carousel-toggle:hover,
.carousel-toggle:focus-visible {
  background-color: rgba(0,0,0,0.7);
  outline: 3px solid var(--accent-color); outline-offset: 3px;
}

/* =========================================================
   Generic Sections
   ========================================================= */
.content-section,
.services { padding: 5rem var(--gutter); }

/* [FIX] Removed text-align: center from services section */
.content-section:not(.about-section) { text-align: center; }

.content-section.bg-alt, .services.bg-alt { background-color: var(--primary-bg-alt); }
.content-section.bg-secondary { background-color: var(--secondary-bg); }

.content-section h2,
.services h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
  color: var(--text-light);
  text-align: center;
}
.content-section > .inner > p,
.services > .inner > p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 3rem auto;
  text-align: center;
}

/* Constrain wide blocks */
.content-section > .inner,
.services > .inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* =========================================================
   Services
   ========================================================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--secondary-bg);
  border-radius: 8px;
  overflow: hidden;
  display: flex; 
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--border-color);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }

.service-card img {
  width: 100%; height: 200px; object-fit: cover;
}

.service-card-content {
  padding: 1.5rem;
  display: flex; 
  flex-direction: column; 
  flex-grow: 1;
  text-align: left; /* [FIX] Explicitly set text-align to left */
}
.service-card-content h3 {
  font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--text-light);
}
.service-card-content p {
  color: var(--text-muted); 
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.service-button {
  color: var(--accent-color);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
  align-self: flex-start;
  margin-top: auto;
}
.service-button:hover { color: var(--accent-hover); transform: translateX(2px); }

/* =========================================================
   Occasions
   ========================================================= */
#occasions {
  background-color: var(--secondary-bg); 
  padding: 5rem var(--gutter);
  text-align: center;
}

#occasions h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  color: var(--text-light);
  font-weight: 700;
}
#occasions p {
  max-width: 700px; margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.1rem; line-height: 1.6;
}

/* =========================================================
   About
   ========================================================= */
.about-section { padding: 5rem var(--gutter); }

.about-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
}

.about-image-container img {
  width: 100%; height: auto; border-radius: 8px; object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.about-content h2 { text-align: left; }

.about-subtitle {
  font-size: 1.3rem; font-weight: 600; color: var(--accent-color); margin-bottom: 1.5rem;
}

.about-content > p {
  color: var(--text-muted); text-align: left; margin-bottom: 2rem;
}

.values-title {
  font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1.5rem;
  padding-bottom: 0.5rem; border-bottom: 2px solid var(--border-color); color: var(--text-light);
}

.about-values {
  display: flex; flex-direction: column; gap: 1.5rem; padding: 0; margin: 0;
}
.about-values li { display: flex; align-items: flex-start; gap: 1rem; }
.about-values svg { flex-shrink: 0; width: 28px; height: 28px; color: var(--accent-color); margin-top: 5px; }
.about-values strong {
  font-weight: 600; color: var(--text-light); display: block; font-size: 1.1rem; margin-bottom: 0.25rem;
}
.about-values p { color: var(--text-muted); margin: 0; line-height: 1.5; }

/* =========================================================
   Contact Form
   ========================================================= */
.contact-form {
  max-width: 700px; margin: 2rem auto 0 auto; text-align: left;
}

.form-group { margin-bottom: 1.5rem; }
.form-group.honeypot { display: none !important; }

.form-group label {
  display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-muted);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%; padding: 0.8rem 1rem;
  background-color: var(--primary-bg);
  border: 1px solid var(--border-color); border-radius: 6px;
  color: var(--text-light);
  font-family: inherit; font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  accent-color: var(--accent-color);
}

.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form input[type="tel"]::placeholder,
.contact-form textarea::placeholder {
  color: #b8c2cc;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent-color); box-shadow: var(--focus-ring);
}

.contact-form textarea { resize: vertical; min-height: 120px; }

.contact-form .cta-button { width: 100%; padding: 1rem; font-size: 1.1rem; }

#form-feedback {
  margin-bottom: 1.5rem; padding: 1rem; border-radius: 6px; text-align: center; font-weight: 600; display: none;
}
#form-feedback.feedback-success {
  background-color: rgba(46, 204, 113, 0.1);
  border: 1px solid #2ecc71; color: #2ecc71;
}
#form-feedback.feedback-error {
  background-color: rgba(231, 76, 60, 0.1);
  border: 1px solid #e74c3c; color: #e74c3c;
}

/* =========================================================
   Footer
   ========================================================= */
.app-footer {
  background-color: var(--secondary-bg);
  color: var(--text-muted);
  padding: 3rem var(--gutter);
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 2rem; max-width: var(--content-max); margin: 0 auto;
}

.footer-contact { text-align: left; }
.footer-contact p { margin: 0 0 0.5rem 0; }

.footer-contact a { color: var(--accent-color); font-weight: 500; }
.footer-contact a:hover { text-decoration: underline; }

.footer-nav ul {
  display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; padding: 0; margin: 0;
}

.footer-nav a {
  color: var(--text-light); font-weight: 600; padding: 0.5rem 0; position: relative; transition: color 0.3s ease;
}
.footer-nav a:hover,
.footer-nav a.active { color: var(--accent-color); }

.footer-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background-color: var(--accent-color); transition: width 0.3s ease;
}
.footer-nav a:hover::after,
.footer-nav a.active::after { width: 100%; }

.footer-bottom { text-align: right; }

/* =========================================================
   Cookie Bar
   ========================================================= */
#cookie-bar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background-color: var(--secondary-bg); color: var(--text-light);
  padding: 1rem 2rem; display: none; /* shown by JS if no cookie decision */
  justify-content: space-between; align-items: center;
  z-index: 2000; border-top: 1px solid var(--border-color);
  flex-wrap: wrap; gap: 1rem;
}
#cookie-bar p { margin: 0; flex-grow: 1; color: var(--text-muted); }
#cookie-bar .cta-button { padding: 0.6rem 1.5rem; flex-shrink: 0; }

/* =========================================================
   Back to Top
   ========================================================= */
#back-to-top {
  position: fixed; bottom: 20px; right: 20px;
  background-color: var(--accent-color); color: var(--text-light);
  border: none; border-radius: 50%; width: 50px; height: 50px; font-size: 24px;
  cursor: pointer; z-index: 1001;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background-color: var(--accent-hover); }
#back-to-top:focus-visible { box-shadow: var(--focus-ring); }

/* =========================================================
   Scroll Animations
   ========================================================= */
.animate-on-scroll {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* subtle stagger for service cards */
.service-card.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.service-card.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.service-card.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1200px) {
  .about-container { gap: 2.25rem; }
}

@media (max-width: 992px) {
  .about-container { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-content h2, .about-subtitle, .about-content > p { text-align: center; }
  .about-image-container { max-width: 500px; margin: 0 auto; order: -1; }
}

@media (max-width: 768px) {
  .app-header { flex-direction: column; gap: 1rem; padding: 1rem 2%; min-height: calc(var(--header-height) + 8px); }
  .main-nav ul { gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
  .main-nav a { font-size: 0.95rem; }
  .carousel-nav.prev { left: 1rem; }
  .carousel-nav.next { right: 1rem; }
  .carousel-toggle { bottom: 4.5rem; right: 1rem; font-size: 0.95rem; } /* Adjusted to avoid overlap */
  .footer-content { flex-direction: column; text-align: center; }
  .footer-contact, .footer-bottom { text-align: center; }
  .footer-nav ul { flex-direction: column; align-items: center; gap: 0.75rem; }
  #cookie-bar { flex-direction: column; text-align: center; }
}

@media (max-width: 576px) {
  .slide-content h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
  .slide-content p { font-size: clamp(0.95rem, 3.5vw, 1.05rem); }
  .carousel-nav { width: 40px; height: 40px; font-size: 1.5rem; }
}

/* =========================================================
   Reduced Motion / Transparency / Contrast
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .app-header, .carousel-toggle, .carousel-nav {
    background-color: var(--secondary-bg);
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
}

@media (prefers-contrast: more) {
  :root { --focus-ring: 0 0 0 3px rgba(232, 73, 29, 0.6); }
  .main-nav a::after, .footer-nav a::after { height: 3px; }
}

/* =========================================================
   Print
   ========================================================= */
@media print {
  .app-header, #cookie-bar, .carousel-nav, .carousel-toggle, #back-to-top { display: none !important; }
  a::after { content: " (" attr(href) ")"; font-weight: normal; font-size: 90%; color: #999; }
  .service-card, .about-image-container img { box-shadow: none !important; }
}
