/* ========================================
   Eastwood Paint & Carpentry
   Mobile-first responsive styles
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  --color-dark: #1A1A1A;
  --color-gold: #C8943E;
  --color-gold-light: #D4A655;
  --color-gold-hover: #B07E2E;
  --color-bg: #FAF6F1;
  --color-text: #2C2C2C;
  --color-text-light: #F5F0E8;
  --color-text-muted: #6B6B6B;
  --color-border: #E0D6C8;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-gold-hover);
}

ul {
  list-style: none;
}

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

.section__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.section__title--left {
  text-align: left;
}

.section__title--light {
  color: var(--color-text-light);
}

.section__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-gold);
  color: #fff;
  border-color: var(--color-gold);
}

.btn--primary:hover {
  background-color: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--color-text-light);
  border-color: var(--color-text-light);
}

.btn--outline:hover {
  background: var(--color-text-light);
  color: var(--color-dark);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

.btn__icon {
  flex-shrink: 0;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav--scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

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

.nav__logo img {
  height: 44px;
  width: auto;
}

.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__hamburger,
.nav__hamburger::before,
.nav__hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav__hamburger {
  position: relative;
}

.nav__hamburger::before,
.nav__hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav__hamburger::before {
  top: -7px;
}

.nav__hamburger::after {
  top: 7px;
}

/* Hamburger open state */
.nav__toggle[aria-expanded="true"] .nav__hamburger {
  background-color: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav__menu {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-dark);
  padding: 20px;
  border-top: 1px solid rgba(200, 148, 62, 0.2);
}

.nav__menu--open {
  display: block;
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav__link {
  display: block;
  padding: 12px 16px;
  color: var(--color-text-light);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav__link:hover {
  background: rgba(200, 148, 62, 0.1);
  color: var(--color-gold);
}

.nav__cta {
  background-color: var(--color-gold);
  color: #fff !important;
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
}

.nav__cta:hover {
  background-color: var(--color-gold-hover);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-dark) url('../images/portfolio/kitchen.png') center/cover no-repeat;
  padding: calc(var(--nav-height) + 40px) 20px 60px;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.8);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__logo {
  max-width: 260px;
  height: auto;
  margin: 0 auto 2rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-text-light);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--color-gold-light);
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* ---------- Services ---------- */
.services {
  padding: 80px 0;
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.service-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(200, 148, 62, 0.1);
  color: var(--color-gold);
  margin-bottom: 1.25rem;
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.service-card__text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.service-card__link {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Portfolio ---------- */
.portfolio {
  padding: 80px 0;
  background: #fff;
}

.portfolio__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.portfolio__item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 3/2;
  background: var(--color-border);
}

.portfolio__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio__item:hover img {
  transform: scale(1.05);
}

.portfolio__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio__item:hover .portfolio__overlay {
  opacity: 1;
}

.portfolio__caption {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- About ---------- */
.about {
  padding: 80px 0;
}

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

.about__image {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 5/6;
  background: var(--color-border);
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text {
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.about__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 2rem;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px;
  background: rgba(200, 148, 62, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(200, 148, 62, 0.2);
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.badge__number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}

.badge__icon {
  font-size: 1.5rem;
  color: var(--color-gold);
  line-height: 1;
}

.badge__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

/* ---------- Testimonials ---------- */
.testimonials {
  padding: 80px 0;
  background: #fff;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.testimonial-card {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 28px 24px;
  border: 1px solid var(--color-border);
}

.testimonial-card__stars {
  color: var(--color-gold);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.testimonial-card__text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.testimonial-card__author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-card__author strong {
  font-size: 0.95rem;
  color: var(--color-dark);
}

.testimonial-card__author span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ---------- FAQ ---------- */
.faq {
  padding: 80px 0;
  background: var(--color-dark);
}

.faq__grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq__item {
  border: 1px solid rgba(200, 148, 62, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.faq__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-light);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.faq__question:hover {
  background: rgba(200, 148, 62, 0.1);
}

.faq__icon {
  font-size: 1.4rem;
  color: var(--color-gold);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq__item--open .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq__item--open .faq__answer {
  max-height: 300px;
}

.faq__answer p {
  padding: 0 20px 20px;
  color: rgba(245, 240, 232, 0.8);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq__answer a {
  color: var(--color-gold-light);
  text-decoration: underline;
}

/* ---------- Contact ---------- */
.contact {
  padding: 80px 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* Form */
.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-dark);
}

.required {
  color: var(--color-gold);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(200, 148, 62, 0.15);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #c0392b;
}

.form-error {
  font-size: 0.8rem;
  color: #c0392b;
  margin-top: 4px;
  min-height: 1.2em;
}

.form-success {
  padding: 16px;
  background: rgba(200, 148, 62, 0.1);
  border: 1px solid var(--color-gold);
  border-radius: 8px;
  text-align: center;
  grid-column: 1 / -1;
}

.form-success p {
  color: var(--color-gold-hover);
  font-weight: 600;
}

/* Contact Info Sidebar */
.contact-info__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--color-dark);
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--color-text);
}

.contact-info__item svg {
  flex-shrink: 0;
  color: var(--color-gold);
}

.contact-info__item a {
  color: var(--color-text);
}

.contact-info__item a:hover {
  color: var(--color-gold);
}

.contact-info__map {
  margin-top: 24px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-dark);
  color: var(--color-text-light);
  padding: 60px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(200, 148, 62, 0.15);
}

.footer__logo {
  height: 40px;
  width: auto;
  margin-bottom: 12px;
}

.footer__tagline {
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.6);
  line-height: 1.6;
}

.footer__links h4,
.footer__contact h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--color-gold-light);
}

.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__links a {
  color: rgba(245, 240, 232, 0.7);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--color-gold);
}

.footer__contact p {
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.7);
  margin-bottom: 4px;
}

.footer__contact a {
  color: rgba(245, 240, 232, 0.7);
}

.footer__contact a:hover {
  color: var(--color-gold);
}

.footer__social {
  margin-top: 16px;
}

.footer__social a {
  color: rgba(245, 240, 232, 0.7);
  transition: color 0.2s ease;
}

.footer__social a:hover {
  color: var(--color-gold);
}

.footer__bottom {
  padding: 20px 0;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.4);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.lightbox__close:hover {
  opacity: 0.7;
}

.lightbox__img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

/* ---------- Fade-in Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ==========================================
   RESPONSIVE — TABLET (768px+)
   ========================================== */
@media (min-width: 768px) {

  .section__title {
    font-size: 2.5rem;
  }

  /* Nav */
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    display: flex;
    position: static;
    background: transparent;
    padding: 0;
    border: none;
  }

  .nav__list {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .nav__link {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .nav__cta {
    margin-top: 0;
    margin-left: 8px;
    padding: 8px 20px;
    border-radius: 6px;
  }

  /* Hero */
  .hero__logo {
    max-width: 320px;
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__actions {
    flex-direction: row;
    justify-content: center;
  }

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

  /* Portfolio */
  .portfolio__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
  }

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

  /* Contact Form */
  .contact__grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 60px;
  }

  .contact-form {
    grid-template-columns: 1fr 1fr;
  }

  .form-group--full {
    grid-column: 1 / -1;
  }

  .contact-form .btn {
    grid-column: 1 / -1;
  }

  .form-success {
    grid-column: 1 / -1;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* ==========================================
   RESPONSIVE — DESKTOP (1280px+)
   ========================================== */
@media (min-width: 1280px) {

  .container {
    padding: 0 40px;
  }

  .section__title {
    font-size: 2.75rem;
  }

  .hero__title {
    font-size: 3.5rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  .services,
  .portfolio,
  .about,
  .testimonials,
  .faq,
  .contact {
    padding: 100px 0;
  }
}
