/* ========================================
   FRIASHARDWOOD - STYLE.CSS
   Modern Bootstrap 5 Integration
   ======================================== */

/* ===== 1. CSS VARIABLES ===== */
:root {
  --color-primary: #8B6F47;
  --color-primary-dark: #6B5435;
  --color-accent: #D4AF37;
  --color-cream: #f5eee6;
  --color-dark: #1a1a1a;
  --color-darker: #0d0d0d;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Open Sans', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* ===== 2. BASE & TYPOGRAPHY ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

a { text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* ===== 3. TOP CONTACT BAR ===== */
.top-contact-bar {
  background: var(--color-darker);
  padding: 0.625rem 0;
  font-size: 0.875rem;
}

.contact-link {
  color: rgba(255, 255, 255, 0.9);
}
.contact-link:hover { color: var(--color-accent); }
.contact-link i { margin-right: 0.5rem; color: var(--color-accent); }

.social-icons a {
  color: rgba(255, 255, 255, 0.7);
  margin-left: 1rem;
  font-size: 1rem;
}
.social-icons a:hover { color: var(--color-accent); }

@media (max-width: 767.98px) {
  .top-contact-bar .d-flex { justify-content: center !important; }
}

/* ===== 4. MODERN NAVBAR ===== */
.modern-navbar {
  background: var(--color-cream);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-main {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: 1px;
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 400;
  color: var(--color-primary);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 1px;
}

.nav-link {
  font-weight: 500;
  color: var(--color-dark) !important;
  padding: 0.5rem 0.875rem !important;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after { width: 60%; }

.nav-link:hover,
.nav-link.active { color: var(--color-primary) !important; }

.btn-estimate {
  background: var(--color-primary);
  color: white !important;
  border: none;
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 4px;
}

.btn-estimate:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
}
.btn-estimate::after { display: none; }

.navbar-toggler { border: none; padding: 0.5rem; }
.navbar-toggler:focus { box-shadow: none; }

/* ===== 5. HERO CAROUSEL & OVERLAY ===== */
.hero-carousel-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

#heroCarousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-inner,
.carousel-item { height: 100%; }

.carousel-slide-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
}

.carousel-item.active .carousel-slide-bg {
  transform: scale(1.05);
}

.carousel-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0.5) 50%,
    rgba(0,0,0,0.6) 100%
  );
  z-index: 1;
}

/* Static Text Overlay */
.hero-text-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10;
  pointer-events: none;
}

.hero-text-overlay * { pointer-events: auto; }

.carousel-title {
  color: white;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  margin-bottom: 1rem;
}

.title-static {
  display: block;
  font-size: 0.45em;
  letter-spacing: 4px;
  opacity: 0.9;
  font-weight: 400;
}

.title-animated {
  display: inline-block;
  min-height: 1.2em;
}

.carousel-tagline {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: 2rem;
}

.btn-hero-primary {
  background: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary);
  padding: 0.875rem 2.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 4px;
}

.btn-hero-primary:hover {
  background: transparent;
  color: white;
  border-color: white;
  transform: translateY(-2px);
}

.carousel-indicators { bottom: 2rem; z-index: 5; }
.carousel-indicators button {
  width: 40px; height: 3px;
  background: rgba(255,255,255,0.5);
  border: none; border-radius: 0;
}
.carousel-indicators button.active {
  background: white; width: 60px;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 5;
}

.hero-carousel-section:hover .carousel-control-prev,
.hero-carousel-section:hover .carousel-control-next { opacity: 0.8; }

/* ===== 6. TAGLINE SECTION ===== */
.tagline-section {
  background: var(--color-cream);
  padding: 4rem 0 3rem;
}

.tagline-main {
  font-size: 0.875rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.tagline-heading {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--color-dark);
  margin-bottom: 0;
}

.divider {
  width: 60px; height: 2px;
  background: var(--color-primary);
  margin: 1.5rem auto;
}

/* ===== 7. FEATURES SECTION ===== */
.features-section { background: var(--color-cream); }

.feature-box {
  text-align: center;
  padding: 2rem 1.5rem;
  height: 100%;
}

.feature-icon-wrapper {
  width: 60px; height: 60px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-sm);
  color: var(--color-primary);
  font-size: 1.5rem;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-text {
  color: #6b7280;
  margin: 0;
}

/* ===== 8. SERVICES SECTION ===== */
.bg-cream { background: var(--color-cream); }

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: #6b7280;
  font-size: 1.0625rem;
}

.service-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-number {
  position: absolute;
  top: 1rem; right: 1rem;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(139,111,71,0.12);
  line-height: 1;
}

.service-icon {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: block;
}

.service-card h5 { font-size: 1.25rem; margin-bottom: 0.75rem; }

.service-list {
  list-style: none;
  padding: 0; margin: 0;
}

.service-list li {
  padding: 0.375rem 0;
  color: #6b7280;
  display: flex; align-items: center; gap: 0.5rem;
}

.service-list li i { color: var(--color-primary); }

/* ===== 9. GALLERY SECTION ===== */
.gallery-section { background: white; }

.btn-filter {
  border: 1px solid #d1d5db;
  color: var(--color-dark);
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  background: white;
}

.btn-filter:hover,
.btn-filter.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.gallery-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  aspect-ratio: 4/3;
}

.gallery-img-wrapper img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-img-wrapper:hover img { transform: scale(1.08); }

.gallery-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(139,111,71,0.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-img-wrapper:hover .gallery-overlay { opacity: 1; }
.gallery-overlay i { color: white; font-size: 2rem; }

.gallery-item { transition: opacity 0.3s, transform 0.3s; }

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
}

/* ===== 10. REVIEWS SECTION ===== */
.review-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.review-text {
  font-style: italic;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.review-author strong {
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 1.125rem;
}

/* ===== 11. CONTACT SECTION ===== */
.contact-section { background: white; }

.contact-icon-circle {
  width: 48px; height: 48px;
  background: var(--color-cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-info-item a { color: var(--color-primary); }
.contact-info-item a:hover { color: var(--color-primary-dark); }

.contact-form {
  box-shadow: var(--shadow-md);
  border: 1px solid #e5e7eb;
}

.form-control, .form-select {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139,111,71,0.15);
}

/* ===== 12. FOOTER ===== */
.footer-section {
  background: var(--color-darker);
  color: rgba(255,255,255,0.85);
}

.footer-brand .brand-main { color: white; font-size: 1.5rem; }
.footer-brand .brand-sub { color: var(--color-primary); }

.footer-heading {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
}
.footer-links a:hover { color: var(--color-accent); }
.footer-links li { margin-bottom: 0.625rem; }

.footer-contact i { color: var(--color-primary); }
.footer-contact a { color: rgba(255,255,255,0.85); }

.footer-social {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  transition: var(--transition);
}
.footer-social:hover {
  background: var(--color-primary);
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
}

/* ===== 13. RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 991.98px) {
  .carousel-inner { min-height: 500px; }
}

@media (max-width: 767.98px) {
  .brand-main { font-size: 1.375rem; }
  .brand-sub { font-size: 0.5625rem; }
  .carousel-inner { min-height: 100vh; min-height: 100svh; }
  .btn-hero-primary { width: 100%; max-width: 320px; }
  .feature-box { padding: 1.5rem 1rem; }
  .service-card { padding: 1.5rem; }
  .contact-form { padding: 1.5rem; }
}

@media (max-width: 575.98px) {
  .top-contact-bar { padding: 0.5rem 0; }
  .contact-link { font-size: 0.9375rem; }
  .modern-navbar { padding: 0.75rem 0; }
  .brand-main { font-size: 1.25rem; }
  .carousel-inner { min-height: 85vh; }
  .tagline-section { padding: 3rem 0 2rem; }
}

/* ===== 14. UTILITIES ===== */
html { scroll-behavior: smooth; }

::selection {
  background: var(--color-primary);
  color: white;
}

/* Offcanvas Mobile Menu Tweaks */
.offcanvas-header { background: var(--color-cream); }
.mobile-contact { padding-top: 1rem; }
.mobile-contact a { color: var(--color-dark); }



/* ===== MOBILE FLOATING ACTION BUTTONS ===== */
.mobile-fab-container {
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column-reverse; /* WhatsApp on top, back-to-top below */
  gap: 0.75rem;
  z-index: 1050;
}

.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.fab-btn:active {
  transform: scale(0.95);
}

/* Back to Top Button - ALWAYS VISIBLE, ALWAYS CLICKABLE */
.fab-backtotop {
  background: var(--color-primary);
  /* Remove all opacity/pointer-events/transform logic */
}

.fab-backtotop:hover {
  background: var(--color-primary-dark);
}

/* Ensure the button is always above other content */
.mobile-fab-container {
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  z-index: 1050;  /* Higher than navbar (1030) */
}

/* WhatsApp Button */
.fab-whatsapp {
  background: #25D366; /* Official WhatsApp green */
}
.fab-whatsapp:hover {
  background: #128C7E;
}

/* Hide buttons when not scrolling (optional enhancement) */
.fab-backtotop.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

/* Small screen adjustments */
@media (max-width: 375px) {
  .mobile-fab-container {
    bottom: 1rem;
    right: 1rem;
  }
  .fab-btn {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }
}