/**
 * Barbershop Website - Main Stylesheet
 * 
 * TABLE OF CONTENTS:
 * 1. CSS Variables (Colors, Fonts, Sizes) -> EDIT COLORS HERE
 * 2. Base Styles & Reset
 * 3. Typography & Utilities
 * 4. Header & Navigation
 * 5. Hero Section
 * 6. About Section
 * 7. Services Section
 * 8. Pricing Section
 * 9. Gallery Section
 * 10. Testimonials Section
 * 11. Contact & Footer
 * 12. Animations & Misc
 * 13. Responsive Media Queries
 */

/* =========================================================================
   1. CSS Variables
   ========================================================================= */
:root {
  /* Edit these colors to instantly change the website's theme */
  --bg-color: #080808;
  /* Deeper rich black */
  --bg-darker: #040404;
  /* Pure dramatic black */
  --bg-light: #121212;
  /* Subtle contrast element */
  --bg-card: rgba(255, 255, 255, 0.02);

  --accent-color: #d8b87c;
  /* Refined soft gold */
  --accent-hover: #e8cd9a;
  /* Lighter gold for hovers */

  --text-main: #f5f5f5;
  /* Primary white */
  --text-muted: #a3a3a3;
  /* Elegant muted silver for descriptions */
  --border-color: rgba(255, 255, 255, 0.08);
  /* Subtle glass border */

  --header-height: 90px;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius: 6px;
}

/* =========================================================================
   2. Base Styles & Reset
   ========================================================================= */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* =========================================================================
   3. Typography & Utilities
   ========================================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.section {
  padding: 120px 0;
}

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

.text-center {
  text-align: center;
}

/* Reusable Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 38px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #000;
  border: 1px solid var(--accent-color);
  box-shadow: 0 4px 15px rgba(216, 184, 124, 0.15);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent-color);
  box-shadow: 0 6px 20px rgba(216, 184, 124, 0.25);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* =========================================================================
   4. Header & Navigation
   ========================================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background-color: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-color);
  height: 80px;
}

.header.scrolled .nav-container {
  height: 80px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  transition: var(--transition);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 1px;
}

.logo span {
  color: var(--accent-color);
}

.nav-list {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  color: var(--text-main);
  opacity: 0.8;
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  color: var(--accent-color);
}

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--text-main);
  margin: 6px 0;
  transition: var(--transition);
}

/* =========================================================================
   5. Hero Section
   ========================================================================= */
.hero {
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  position: relative;
  background: url('../assets/images/hero-bg.png') center/cover no-repeat;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(4, 4, 4, 0.95) 0%, rgba(4, 4, 4, 0.6) 50%, rgba(4, 4, 4, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
  margin-top: 50px;
}

.subtitle {
  display: block;
  color: var(--accent-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 25px;
  font-weight: 500;
}

.hero .title {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 30px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero .description {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 50px;
  max-width: 550px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

/* =========================================================================
   6. About Section
   ========================================================================= */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100%;
  height: 100%;
  border: 1px solid var(--accent-color);
  opacity: 0.5;
  z-index: 0;
  border-radius: var(--border-radius);
}

.image-wrapper {
  position: relative;
  z-index: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.section-subtitle {
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 15px;
  font-weight: 500;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 25px;
  line-height: 1.2;
}

.section-desc {
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 60px;
  font-size: 1.1rem;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 25px;
  font-size: 1.05rem;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.feature h3 {
  color: var(--accent-color);
  font-size: 2.5rem;
  margin-bottom: 5px;
  font-family: var(--font-body);
  font-weight: 300;
}

.feature p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* =========================================================================
   7. Services Section
   ========================================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: var(--bg-card);
  padding: 50px 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-color);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

.service-card:hover {
  background-color: var(--bg-light);
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 25px;
  opacity: 0.9;
  filter: drop-shadow(0 0 10px rgba(216, 184, 124, 0.2));
}

.service-title {
  font-size: 1.6rem;
  margin-bottom: 15px;
}

.service-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* =========================================================================
   8. Pricing Section
   ========================================================================= */
.pricing-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: flex-start;
}

.price-list {
  background: var(--bg-card);
  padding: 50px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.price-list-title {
  font-size: 1.8rem;
  color: var(--text-main);
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.price-item {
  margin-bottom: 35px;
}

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

.price-info {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
}

.price-name {
  font-size: 1.15rem;
  font-family: var(--font-heading);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.price-dots {
  flex-grow: 1;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
  margin: 0 20px 6px;
}

.price-value {
  font-size: 1.3rem;
  color: var(--accent-color);
  font-weight: 600;
  font-family: var(--font-body);
}

.price-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* =========================================================================
   9. Gallery Section
   ========================================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  height: 350px;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  opacity: 0;
  transition: var(--transition);
}

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

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

/* =========================================================================
   10. Testimonials Section
   ========================================================================= */
.testimonial-slider-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-card);
  padding: 60px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.testimonial-card {
  display: none;
  text-align: center;
  padding: 0 20px;
}

.testimonial-card.active {
  display: block;
  animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quote-icon {
  font-family: var(--font-heading);
  font-size: 6rem;
  color: var(--accent-color);
  line-height: 0.5;
  height: 50px;
  margin-bottom: 30px;
  opacity: 0.2;
}

.testimonial-text {
  font-size: 1.4rem;
  font-weight: 300;
  font-style: italic;
  margin-bottom: 40px;
  color: var(--text-main);
  line-height: 1.8;
}

.testimonial-author h4 {
  margin: 0 0 5px;
  color: var(--accent-color);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.testimonial-author span {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.slider-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 50px;
}

.slider-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.slider-btn:hover {
  background: var(--accent-color);
  color: #000;
  border-color: var(--accent-color);
}

/* =========================================================================
   11. Contact & Footer
   ========================================================================= */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.info-items {
  margin: 50px 0;
}

.info-item {
  display: flex;
  margin-bottom: 40px;
  align-items: flex-start;
}

.info-icon {
  font-size: 1.5rem;
  margin-right: 25px;
  color: var(--accent-color);
  background: var(--bg-card);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.info-text h4 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.info-text p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent-color);
  color: #000;
  border-color: var(--accent-color);
  transform: translateY(-3px);
}

.map-placeholder {
  width: 100%;
  margin-top: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.contact-form-wrapper {
  background: var(--bg-card);
  padding: 50px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.contact-form h3 {
  font-size: 2rem;
  margin-bottom: 35px;
}

.form-group {
  margin-bottom: 25px;
}

.form-control {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(216, 184, 124, 0.1);
}

.form-control::placeholder {
  color: #555;
}

select.form-control {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8b87c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  background-size: 1em;
}

.btn-block {
  display: flex;
  width: 100%;
  margin-top: 10px;
}

.error-msg {
  display: none;
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 8px;
}

.form-group.error .form-control {
  border-color: #ef4444;
  background-color: rgba(239, 68, 68, 0.03);
}

.form-group.error .error-msg {
  display: block;
}

.form-success {
  display: none;
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  padding: 15px;
  margin-top: 25px;
  border-radius: var(--border-radius);
  text-align: center;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-error {
  display: none;
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 15px;
  margin-top: 25px;
  border-radius: var(--border-radius);
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Footer */
.footer {
  background-color: #020202;
  padding: 60px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 25px;
  font-size: 1.8rem;
}

.copyright {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
  letter-spacing: 0.5px;
}

/* =========================================================================
   12. Animations & Misc
   ========================================================================= */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 45px;
  height: 45px;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

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

.back-to-top:hover {
  transform: translateY(-5px);
  background-color: var(--accent-color);
  color: #000;
  border-color: var(--accent-color);
}

/* Utilities for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =========================================================================
   13. Responsive Media Queries
   ========================================================================= */
@media (max-width: 992px) {
  .hero .title {
    font-size: 3.5rem;
  }

  .about-container,
  .pricing-menu,
  .contact-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }

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

  .price-list {
    padding: 40px 30px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .hamburger.active:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: rgba(4, 4, 4, 0.98);
    backdrop-filter: blur(20px);
    padding: 120px 40px;
    transition: var(--transition);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 30px;
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .hero .title {
    font-size: 2.8rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .section {
    padding: 80px 0;
  }

  .testimonial-slider-container {
    padding: 40px 20px;
  }

  .quote-icon {
    font-size: 4rem;
  }

  .testimonial-text {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-form-wrapper {
    padding: 30px 20px;
  }

  .price-list {
    padding: 30px 20px;
  }
}