/* ==========================================================================
   YNC Flooring - Design System & Base Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Open+Sans:wght@400;500&display=swap');

:root {
  /* Colors */
  --primary: #3D0415;
  --secondary: #8C2F39;
  --cta: #B23A48;
  --bg-light: #FFF1EB;
  --bg-medium: #FED0BB;
  --bg-accent: #FCB9B2;
  --hover-soft: #8C2F39;
  --card-bg: #FFFFFF;
  --white: #FFFFFF;
  --text-dark: #3D0415;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  /* Layout */
  --container-width: 1200px;
  --margin-side: 24px;
  --section-spacing: 80px;

  /* Shadows & Radius */
  --radius: 12px;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 700;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
}

h3 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
}

p {
  margin-bottom: 16px;
  color: #4A4A4A;
}

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

ul {
  list-style: none;
}

/* Layout Classes */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--margin-side);
}

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

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--cta);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background-color: var(--cta);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.card-img-top {
  width: calc(100% + 48px);
  margin: -24px -24px 24px -24px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-icon {
  font-size: 32px;
  color: var(--secondary);
  margin-bottom: 16px;
}

/* Social Icons & Floating Widget */
.social-icons {
  display: flex;
  gap: 16px;
  align-items: center;
}

.social-icons a {
  color: var(--white);
  font-size: 24px;
  transition: var(--transition);
}

.social-icons a:hover {
  color: var(--hover-soft);
  transform: translateY(-2px);
}

.floating-widget {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
}

.floating-widget-item {
  display: flex;
  align-items: center;
  background-color: var(--white);
  padding: 10px;
  border-radius: 0 8px 8px 0;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
  transform: translateX(calc(-100% + 48px));
  transition: transform 0.3s ease;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 14px;
  width: max-content;
}

.floating-widget-item:hover {
  transform: translateX(0);
}

.floating-widget-item img, .floating-widget-item i {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--cta);
}

/* ==========================================================================
   Sections
   ========================================================================== */

/* Navbar */
.navbar {
  background-color: var(--primary);
  color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 0;
  box-shadow: var(--shadow);
  transition: background-color 0.3s ease;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}

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

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--bg-light);
  font-weight: 500;
}

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

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--white);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* Offset for navbar */
  background-color: var(--primary);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
}

.hero p {
  color: var(--white);
  font-size: clamp(16px, 2vw, 20px);
  margin-bottom: 32px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--white);
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.hero .btn-secondary {
  color: var(--white);
  border-color: var(--white);
}

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

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-contact {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  flex-wrap: wrap;
}

.hero-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-contact a:hover {
  color: var(--hover-soft);
}

/* About Section */
.about {
  background-color: var(--bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Services Section */
.services {
  background-color: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  margin-top: 48px;
}

/* Differentials */
.differentials {
  background-color: var(--primary);
  color: var(--white);
}

.differentials h2, .differentials p {
  color: var(--white);
  text-align: center;
}

.differentials p {
  color: var(--bg-light);
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 32px;
  margin-top: 48px;
}

.diff-card {
  text-align: center;
  padding: 32px 24px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  transition: var(--transition);
}

.diff-card:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-8px);
}

.diff-icon {
  font-size: 40px;
  color: var(--hover-soft);
  margin-bottom: 16px;
}

.diff-card h3 {
  color: var(--white);
  font-size: 20px;
}

/* Portfolio */
.portfolio {
  background-color: var(--bg-light);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  grid-auto-rows: 250px;
  gap: 16px;
  margin-top: 48px;
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
}

.portfolio-item:nth-child(even) {
  grid-row: span 2;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

/* Testimonials */
.testimonials {
  background-color: var(--card-bg);
}

.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  margin-top: 48px;
}

.testi-card {
  background-color: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  position: relative;
}

.testi-card::before {
  content: '""';
  font-family: 'Times New Roman', serif;
  font-size: 60px;
  color: var(--hover-soft);
  position: absolute;
  top: 10px;
  left: 20px;
  opacity: 0.3;
}

.testi-text {
  font-style: italic;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.testi-author {
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--primary);
}

/* Final CTA */
.final-cta {
  background-color: var(--secondary);
  color: var(--white);
  text-align: center;
  padding: 80px 24px;
}

.final-cta h2, .final-cta p {
  color: var(--white);
}

.final-cta p {
  font-size: 20px;
  margin-bottom: 32px;
}

/* Footer */
.footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 64px 0 24px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer h3 {
  color: var(--white);
  margin-bottom: 24px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--white);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  color: var(--white);
}

.footer p i {
  color: var(--white);
}

.footer p {
  color: var(--white);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-down {
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-down.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .about-grid {
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-spacing: 56px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: -100%;
    width: 100%;
    background-color: var(--primary);
    flex-direction: column;
    padding: 32px 0;
    gap: 24px;
    transition: var(--transition);
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    left: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-features {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .hero-contact {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

.site-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}
