/* 
  Varela Cocinas - Master Stylesheet
  Design System defined in _config & Stage 02
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Outfit:wght@600&display=swap');

:root {
  /* Brand Tokens */
  --color-primary: #732B1A;
  /* Varela Rust */
  --color-secondary: #1A457D;
  /* Construction Blue */
  --color-accent: #FFC72C;
  /* High-Vis Yellow */
  --color-dark: #121212;
  --color-light: #F5F5F5;
  --color-white: #FFFFFF;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --spacing-section: 8rem;
  --radius-btn: 9999px;
  --radius-card: 16px;

  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

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

/* Layout Parts */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: var(--spacing-section) 0;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(255, 199, 44, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 199, 44, 0.5);
}

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

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

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

nav {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--color-primary);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  color: var(--color-white);
  padding: 0;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.05));
  z-index: -1;
}

.hero-mascot {
  position: absolute;
  left: 5%;
  bottom: 0;
  height: 85%;
  max-height: 800px;
  z-index: 5;
  pointer-events: none;
}

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

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
}

/* Services / Gallery */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

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

.card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  height: 250px;
  background-color: var(--color-gray-200);
  background-size: cover;
  background-position: center;
}

.card-body {
  padding: 2rem;
}

.card h3 {
  margin-bottom: 1rem;
}

/* Carousel / Gallery */
.carousel-wrapper {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 2rem;
  padding-bottom: 2rem;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.carousel-track::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.carousel-track .card {
  flex: 0 0 calc(50% - 1rem);
  /* 2 cards per view on desktop */
  scroll-snap-align: start;
}

.carousel-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: var(--color-white);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.carousel-arrow:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.carousel-arrow.prev {
  left: -25px;
}

.carousel-arrow.next {
  right: -25px;
}

.scroll-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.scroll-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scroll-progress-bar {
  width: 200px;
  height: 4px;
  background: var(--color-gray-200, #eee);
  border-radius: 4px;
  overflow: hidden;
}

.scroll-progress-fill {
  height: 100%;
  background: var(--color-primary);
  width: 0%;
  transition: width 0.1s ease-out;
}

.placeholder-img {
  background-color: #111 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.2rem;
  border: 1px solid #333;
}

/* Contact Section */
.contact-section {
  position: relative;
  padding: 5rem 0;
  background-image: url('contact_bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--color-white);
}

.contact-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 0;
}

.contact-info h2 {
  color: var(--color-white);
  margin-bottom: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-form {
  background: var(--color-gray-100);
  padding: 3rem;
  border-radius: var(--radius-card);
}

.map-container {
  margin-top: 2.5rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.map-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.map-container iframe {
  display: block;
  filter: grayscale(0.2) contrast(1.05);
  transition: var(--transition);
}

.map-container:hover iframe {
  filter: grayscale(0) contrast(1);
}

.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: 0.75rem 1rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  font-family: inherit;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    align-items: flex-start;
    padding-top: 140px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .hero-content {
    margin-left: 0;
    text-align: center;
    width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-info {
    margin-bottom: 2rem;
  }

  .map-container {
    margin-top: 2rem;
    height: 300px;
  }

  .map-container iframe {
    height: 100%;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero-btns .btn {
    width: 100%;
    text-align: center;
  }

  .hero-mascot {
    left: 50%;
    transform: translateX(-50%);
    height: 40vh;
    max-height: 350px;
    width: auto;
    bottom: 0;
  }

  .contact-section {
    /* Focus the background image on the side where the mascot is pointing instead of the center */
    background-position: 20% center;
    /* Adjust to 20% if the mascot is on the left */
  }

  .carousel-track .card {
    flex: 0 0 100%;
    /* 1 card per view on mobile */
  }

  .carousel-arrow {
    display: none;
    /* Hide arrows on mobile, rely on swipe */
  }
}

/* Testimonials Section */
.testimonios-section {
  background-color: var(--color-dark);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.testimonios-section::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 40%;
  height: 60%;
  background: radial-gradient(circle, rgba(115, 43, 26, 0.15) 0%, transparent 70%);
  z-index: 0;
}

.testimonios-section .section-title h2 {
  color: var(--color-white);
}

.testimonios-section .section-title p {
  color: rgba(255, 255, 255, 0.7);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.testimonial-stars {
  color: var(--color-accent);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 4px;
}

.testimonial-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  margin-bottom: 2rem;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

.author-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-white);
}

.author-source {
  font-size: 0.85rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}