/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #1a3a6b;
  --blue-light: #2b5ea7;
  --blue-pale: #e8f0fe;
  --red: #d32f2f;
  --red-dark: #b71c1c;
  --gold: #f9a825;
  --green: #2e7d32;
  --teal: #00897b;
  --gray-light: #f5f7fa;
  --gray: #6b7280;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  line-height: 1.3;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-danger:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
}

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

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

.btn-white {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
  font-weight: 700;
}

.btn-white:hover {
  background: var(--blue-pale);
  border-color: var(--blue-pale);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 20px;
}

/* Logo image in header */
.logo img {
  height: 55px;
  width: auto;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: #333;
  transition: color 0.2s;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.3s;
}

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

.nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn small {
  font-weight: 400;
  font-size: 0.7rem;
  margin-left: 5px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s;
}

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

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

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

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 50%, #3d7dd9 100%);
  color: var(--white);
  padding: 60px 0 50px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -50px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
  max-width: 560px;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero-text > p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 10px;
}

/* #8 - Se habla espanol badge */
.badge-spanish {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

/* #9 - Hero badges row with seal */
.hero-badges {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

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

.hero-rating .stars {
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.hero-rating span {
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-seal {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-seal svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* Hero - brand character on desktop */
.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  max-width: 340px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.2));
  animation: float 4s ease-in-out infinite;
}

/* Full logo shown only on mobile hero */
.hero-logo-mobile {
  display: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.stars {
  color: var(--gold);
  font-size: 1.3rem;
  letter-spacing: 2px;
}

/* ===== SERVICES ===== */
.services {
  padding: 80px 0;
  background: var(--gray-light);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* #4 - Service cards with SVG icons */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

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

.service-card.featured {
  border: 2px solid var(--red);
}

.service-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: var(--white);
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.service-icon {
  color: var(--blue-light);
  margin-bottom: 18px;
}

.service-card h3 {
  font-size: 1.15rem;
  color: var(--blue);
  margin-bottom: 18px;
}

.service-card ul {
  list-style: none;
  text-align: left;
  padding: 0 10px;
}

.service-card li {
  padding: 6px 0;
  font-size: 0.95rem;
  color: #555;
}

.service-card li::before {
  content: '\2713';
  color: var(--green);
  font-weight: 700;
  margin-right: 10px;
}

/* ===== GALLERY ===== */
.gallery {
  padding: 80px 0;
  background: var(--white);
}

.gallery .section-title {
  margin-bottom: 4px;
}

.gallery .section-subtitle {
  margin-bottom: 44px;
}

/* Carousel */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.gallery-pair {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.gallery-label {
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blue);
  margin-bottom: 16px;
}

.gallery-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* #5 - Taller gallery images, #15 - hover zoom */
.gallery-item img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform 0.4s ease;
}

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

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--white);
  z-index: 2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-before {
  background: rgba(211, 47, 47, 0.9);
}

.badge-after {
  background: rgba(46, 125, 50, 0.9);
}

/* Carousel controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--blue);
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}

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

.carousel-prev {
  left: 12px;
}

.carousel-next {
  right: 12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 8px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.carousel-dot.active {
  background: var(--blue);
  transform: scale(1.15);
}

/* ===== REVIEWS ===== */
.reviews {
  padding: 80px 0;
  background: var(--blue-pale);
}

/* #6 - Reviews summary */
.reviews-summary {
  text-align: center;
  margin: 16px 0 36px;
}

.stars-lg {
  font-size: 2rem;
  letter-spacing: 4px;
}

.reviews-score {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue);
  margin-top: 4px;
}

.reviews-count {
  display: block;
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 2px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.review-card:hover {
  transform: translateY(-3px);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.review-stars {
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 1px;
}

.review-text {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.75;
  margin-bottom: 14px;
  font-style: italic;
}

.review-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.review-header strong {
  display: block;
  font-size: 1rem;
}

.review-meta {
  font-size: 0.8rem;
  color: var(--gray);
}

/* ===== CONTACT ===== */
.contact {
  padding: 80px 0;
  background: var(--white);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.8rem;
  color: var(--blue);
  margin-bottom: 12px;
}

.contact-info > p {
  color: var(--gray);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--blue-pale);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue-light);
}

.contact-item a {
  color: var(--blue-light);
  font-weight: 500;
  transition: color 0.2s;
}

.contact-item a:hover {
  color: var(--red);
}

/* #7 - Form visual separation */
.estimate-form {
  background: var(--gray-light);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid #e2e8f0;
}

.form-title {
  font-size: 1.2rem;
  color: var(--blue);
  margin-bottom: 4px;
  text-align: center;
}

.estimate-form input,
.estimate-form select,
.estimate-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}

.estimate-form input:focus,
.estimate-form select:focus,
.estimate-form textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(43, 94, 167, 0.1);
}

.estimate-form textarea {
  resize: vertical;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--blue);
  color: var(--white);
  padding: 48px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}

/* Footer brand */
.footer-logo-img {
  height: 70px;
  width: auto;
  margin-bottom: 8px;
  filter: brightness(1.5) contrast(0.9);
}

.footer-brand-name {
  font-family: 'Georgia', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

.footer-brand-name span {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.8;
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.7;
}

.footer-links h4,
.footer-social h4 {
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  opacity: 0.75;
  transition: opacity 0.2s, padding-left 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  padding-left: 4px;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  opacity: 0.85;
  transition: opacity 0.2s;
  background: rgba(255,255,255,0.1);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.social-link:hover {
  opacity: 1;
  background: rgba(255,255,255,0.15);
}

.social-link svg {
  flex-shrink: 0;
}

.footer-phone a {
  font-size: 1.05rem;
  font-weight: 600;
  opacity: 0.9;
}

.footer-phone a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ===== BACK TO TOP (#17) ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  /* #10 - Bigger mobile hero text */
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-image img {
    max-width: 280px;
  }

  /* #12 - Shorter service cards on tablet */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .service-card {
    padding: 24px 16px;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
    gap: 16px;
    border-top: 1px solid #eee;
  }

  .nav.open {
    display: flex;
  }

  .nav a::after {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hide-mobile {
    display: none;
  }

  .logo img {
    height: 40px;
  }

  .header-actions .btn-sm {
    padding: 8px 16px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .header-actions .btn-sm br {
    display: none;
  }

  .header-actions .btn-sm small::before {
    content: ' ';
  }

  .header-actions .btn-sm small {
    display: inline;
  }

  .hero {
    padding: 40px 0 36px;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  /* On mobile: hide character, show full logo */
  .hero-image {
    display: none;
  }

  .hero-logo-mobile {
    display: block;
    text-align: center;
    order: -1;
  }

  .hero-logo-mobile img {
    max-width: 260px;
    margin: 0 auto 20px;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.2));
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text > p {
    font-size: 1rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-badges {
    justify-content: center;
  }

  /* #12 - Stack services on mobile */
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
  }

  .service-card {
    padding: 24px 20px;
  }

  .service-card ul {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .service-card ul li {
    padding: 2px 0;
  }

  /* Stack gallery images vertically on mobile */
  .gallery-images {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery-item img {
    height: 250px;
  }

  .gallery-pair {
    padding: 16px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .carousel-prev {
    left: 6px;
  }

  .carousel-next {
    right: 6px;
  }

  /* #13 - Less whitespace on contact */
  .contact {
    padding: 50px 0;
  }

  .contact-info > p {
    margin-bottom: 20px;
  }

  .contact-details {
    gap: 16px;
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-badges {
    flex-direction: column;
    gap: 10px;
  }

  /* #11 - Stack gallery vertically on small mobile */
  .gallery-images {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 300px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .reviews-grid {
    gap: 16px;
  }

  .review-card {
    padding: 24px;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}
