/* CSS Variables */
:root {
  --color-bg: #000000;
  --color-text: #FFFFFF;
  --color-accent: #FF0000;
  --color-gray: #333333;
  --color-gray-light: #666666;
  --color-gray-accessible: #b3b3b3; /* WCAG AAA compliant */
  --max-width: 1200px;
  --font-heading: 'Cinzel', serif;
  --font-accent: 'Pirata One', cursive;
  --font-body: 'Montserrat', sans-serif;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Skip to Content Link (Accessibility) */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #FFFFFF;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 700;
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid #FFFFFF;
  outline-offset: 2px;
}

/* Focus Visible Styles */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif !important;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Global font override */
body * {
  font-family: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif !important;
  color: var(--color-text);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 1px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

a {
  color: #FF3333;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

a:hover {
  color: #FF6666;
  text-decoration: underline;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}

/* Header Styles */
.header {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-gray);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 60px;
  width: auto;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.3s ease;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
}

.nav-menu a.active {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
}

.header-cta-item {
  margin-left: 1rem;
}

.header-cta-btn {
  padding: 0.5rem 1.5rem;
  font-size: 0.95rem;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 100px 20px 50px;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7));
}

.hero-content {
  max-width: 800px;
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--color-accent);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid var(--color-accent);
}

.btn:hover {
  background: transparent;
  color: var(--color-accent);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-text);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* Fixed CTA Button */
.fixed-cta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 998;
  animation: pulse 2s infinite;
}

/* Hide fixed CTA on very small screens to avoid overlap */
@media (max-width: 480px) {
  .fixed-cta {
    bottom: 90px; /* Add margin above footer on small screens */
  }
}

@media (max-width: 360px) {
  .fixed-cta {
    display: none; /* Hide completely on ultra-small screens */
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-gray);
  border-radius: 10px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.section-title {
  font-family: var(--font-heading);
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  position: relative;
  font-weight: 600;
}

/* Footer */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-gray);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  text-align: center;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: left;
}

.footer h4 {
  font-family: var(--font-heading);
  color: var(--color-accent);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-gray);
  text-align: center;
  color: var(--color-gray-accessible); /* Improved contrast for accessibility */
  font-size: 0.9rem;
}

.footer p {
  color: var(--color-gray-accessible); /* WCAG AAA: 7.0:1 contrast ratio */
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  color: var(--color-text);
  padding: 1.5rem 1rem 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--color-gray);
  border-radius: 5px;
  color: var(--color-text);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Testimonials */
.testimonial {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 10px;
  border-left: 3px solid var(--color-accent);
  margin-bottom: 1.5rem;
}

.testimonial h4 {
  font-family: var(--font-heading);
  color: var(--color-accent);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--color-gray-light);
}

/* Accordion */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  border-bottom: 1px solid var(--color-gray);
  margin-bottom: 1rem;
}

.accordion-header {
  background: transparent;
  border: none;
  color: var(--color-text);
  padding: 1.5rem 0;
  width: 100%;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header:hover {
  color: var(--color-accent);
}

.accordion-content {
  padding: 0 0 1.5rem;
  display: none;
}

.accordion-content.active {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image Carousel */
.carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
}

.carousel-slide img {
  width: 100%;
  max-height: 70vh;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--color-text);
  border: none;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* Media Queries */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    flex-direction: column;
    padding: 2rem;
    text-align: center;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    text-align: center;
  }
  
  .hero {
    min-height: 60vh;
  }
  
  .fixed-cta {
    bottom: 20px;
    right: 20px;
    display: none; /* Hidden on mobile to prevent overlap */
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  /* Mobile: enforce square thumbnails for consistency */
  .gallery-item img {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ==========================================
   DESIGN & PERFORMANCE ENHANCEMENTS
   ========================================== */

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--color-accent);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #cc0000;
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
}

/* Section Dividers */
.section-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  margin: 4rem 0;
  position: relative;
}

.section-divider::before {
  content: '⚡';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg);
  padding: 0 1rem;
  font-size: 1.5rem;
  color: var(--color-accent);
}

/* Enhanced Button Styles */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 0, 0, 0.4);
}

.btn:active {
  transform: translateY(0);
}

/* Loading Skeleton for Images */
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Smooth Section Transitions */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Card Hover Effects */
.card {
  transition: all 0.3s ease;
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid var(--color-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 10px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

.card:hover::after {
  opacity: 1;
}

/* Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #ff6666);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Floating CTA Button */
.floating-cta {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--color-accent);
  color: white;
  padding: 15px 25px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.floating-cta.visible {
  opacity: 1;
  visibility: visible;
}

.floating-cta:hover {
  background: #cc0000;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(255, 0, 0, 0.8); }
}

/* Image Lazy Load Blur Effect */
img {
  transition: filter 0.3s ease;
}

img.loading {
  filter: blur(10px);
}

img.loaded {
  filter: blur(0);
}

/* Enhanced Gallery Item Hover */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item::before {
  content: '🔍 View';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 0, 0.9);
  padding: 10px 20px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  font-weight: 600;
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-item img {
  transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(0.7);
}

/* Section Badges */
.section-badge {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

/* Testimonial Enhancement */
.testimonial {
  position: relative;
  transition: all 0.3s ease;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 10px;
  font-size: 5rem;
  color: var(--color-accent);
  opacity: 0.2;
  font-family: Georgia, serif;
}

.testimonial:hover {
  transform: scale(1.02);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  .floating-cta {
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    padding: 12px 20px;
  }
  
  .floating-cta.visible {
    transform: translateX(-50%);
  }
  
  .section-divider {
    margin: 2rem 0;
  }
}

/* Mobile Sticky Bar */
.mobile-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  border-top: 1px solid var(--color-gray);
  z-index: 1000;
  display: none;
}

.mobile-sticky-bar .bar {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.mobile-sticky-bar a {
  color: #fff;
  text-decoration: none;
  display: block;
  text-align: center;
  padding: 12px 10px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .mobile-sticky-bar { display: block; }
  body { padding-bottom: 60px; }
}

/* Google Reviews Widget */
.reviews-widget {
  margin: 2rem 0 3rem;
}

.reviews-widget .gr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.reviews-widget .gr-score {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.reviews-widget .gr-rating {
  font-size: 1.75rem;
  font-weight: 700;
}

.reviews-widget .gr-count {
  color: var(--color-gray-accessible);
}

.reviews-widget .gr-link {
  color: #8ab4f8; /* legible link color */
  text-decoration: underline;
}

.reviews-widget .gr-note {
  font-size: 0.9rem;
  color: var(--color-gray-accessible);
  margin-bottom: 1rem;
}

.reviews-widget .gr-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.reviews-widget .review {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-gray);
  border-radius: 10px;
  padding: 1rem;
}

.reviews-widget .review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.reviews-widget .review-author-img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
}

.reviews-widget .review-meta {
  display: flex; flex-direction: column; gap: 2px;
}

.reviews-widget .review-author {
  color: #fff; font-weight: 600;
}

.reviews-widget .review-date {
  font-size: 0.85rem; color: var(--color-gray-accessible);
}

.reviews-widget .stars { color: #FFD700; letter-spacing: 1px; }

.reviews-widget .review-text { margin-top: 0.5rem; }

.reviews-widget .gr-actions { margin-top: 1rem; text-align: center; }

.reviews-widget .gr-error { color: var(--color-gray-accessible); text-align: center; }
