/* ============================================
   HDog Humanize Vet & Pet - Main Stylesheet
   Caraguatatuba - SP
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #F9A873;
  --primary-dark: #D1610C;
  --primary-light: #F7A36F;
  --white: #FFFFFF;
  --dark: #160901;
  --bg-light: #FFF8F2;
  --bg-warm: #FEF5ED;
  --shadow: 0 4px 20px rgba(209, 97, 12, 0.1);
  --shadow-hover: 0 8px 32px rgba(209, 97, 12, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Space Grotesk', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--dark); line-height: 1.3; font-weight: 700; }
h1 { font-size: 45px; }
h2 { font-size: 35px; }
h3 { font-size: 26px; }
h4 { font-size: 22px; }
p { margin-bottom: 1rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 70px 0; }

/* --- Preloader --- */
.preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-spinner {
  width: 50px; height: 50px;
  border: 4px solid var(--primary);
  border-top-color: var(--primary-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Header & Navigation --- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: var(--transition);
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; max-width: 1200px; margin: 0 auto;
}
.logo img { height: 55px; width: auto; }
.nav-desktop { display: flex; align-items: center; gap: 0; }
.nav-desktop > ul { display: flex; align-items: center; gap: 0; }
.nav-desktop > ul > li {
  position: relative;
}
.nav-desktop > ul > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-desktop > ul > li > a:hover,
.nav-desktop > ul > li.active > a { color: var(--primary-dark); }
.nav-desktop > ul > li > a .arrow {
  font-size: 10px; transition: transform 0.3s;
}
.nav-desktop > ul > li:hover > a .arrow { transform: rotate(180deg); }

/* Submenu */
.submenu {
  position: absolute; top: 100%; left: 0;
  background: var(--white);
  min-width: 240px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  padding: 8px 0;
  z-index: 100;
}
.nav-desktop > ul > li:hover > .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: 14px; color: var(--dark);
  transition: var(--transition);
}
.submenu li a:hover {
  background: var(--bg-warm);
  color: var(--primary-dark);
  padding-left: 26px;
}
.submenu li a .sub-icon {
  width: 20px; text-align: center; font-size: 16px;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px; z-index: 1001;
}
.menu-toggle span {
  display: block; width: 26px; height: 3px;
  background: var(--primary-dark);
  margin: 5px 0; border-radius: 2px;
  transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Mobile Nav */
.nav-mobile {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 999;
  overflow-y: auto;
  padding: 80px 20px 30px;
}
.nav-mobile.active { display: block; animation: slideIn 0.3s ease; }
.nav-mobile ul { }
.nav-mobile > ul > li > a {
  display: block; padding: 14px 0;
  font-size: 17px; font-weight: 600;
  color: var(--dark); border-bottom: 1px solid #f0e6de;
}
.nav-mobile .submenu {
  position: static; opacity: 1; visibility: visible;
  transform: none; box-shadow: none;
  display: none; padding: 0 0 0 16px;
  background: transparent; border-radius: 0;
}
.nav-mobile .submenu.open { display: block; }
.nav-mobile .submenu li a { padding: 10px 0; border-bottom: 1px solid #f9f1eb; font-size: 15px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

/* --- Banner / Hero --- */
.banner {
  margin-top: 75px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.banner-desktop { display: block; width: 100%; height: auto; }
.banner-mobile { display: none; width: 100%; height: auto; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: var(--primary-dark);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px; font-weight: 600;
  border: none; border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(209, 97, 12, 0.3);
}
.btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(209, 97, 12, 0.4);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-dark);
  color: var(--primary-dark);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--primary-dark);
  color: var(--white);
}
.btn-sm { padding: 10px 22px; font-size: 14px; }

/* --- Cards --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(249, 168, 115, 0.12);
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--white);
  margin-bottom: 18px;
  transition: var(--transition);
}
.card:hover .card-icon { transform: scale(1.1) rotate(-5deg); }
.card h3 { font-size: 22px; margin-bottom: 12px; }
.card p { font-size: 15px; color: #555; line-height: 1.7; margin-bottom: 16px; }
.card .btn-sm { margin-top: 8px; }

/* Service Card with Image */
.card-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  background: var(--white);
}
.card-img:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.card-img img {
  width: 100%; height: 220px; object-fit: cover;
  transition: transform 0.5s ease;
}
.card-img:hover img { transform: scale(1.05); }
.card-img .card-body { padding: 24px; }
.card-img .card-body h3 { font-size: 22px; margin-bottom: 10px; }
.card-img .card-body p { font-size: 15px; color: #555; }

/* --- Sections --- */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 {
  font-size: 35px;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.section-title h2::after {
  content: '';
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 2px;
}
.section-title p {
  font-size: 17px; color: #666;
  max-width: 600px; margin: 18px auto 0;
}
.section-subtitle {
  font-family: var(--font-body);
  font-size: 16px; font-weight: 500;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.bg-warm { background: var(--bg-warm); }
.bg-light { background: var(--bg-light); }

/* About / Two Column */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.two-col img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.two-col-reverse { direction: rtl; }
.two-col-reverse > * { direction: ltr; }

/* Diferenciais */
.diferencia-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.diferencial-item {
  display: flex; gap: 16px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.diferencial-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.diferencial-item .dif-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--white);
}
.diferencial-item h4 { font-size: 18px; margin-bottom: 6px; }
.diferencial-item p { font-size: 14px; color: #666; margin: 0; }

/* Ideais / Mission Cards */
.ideais-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.ideais-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.ideais-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.ideais-card .ideais-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--white);
}
.ideais-card h3 { font-size: 24px; margin-bottom: 12px; }
.ideais-card p { font-size: 15px; color: #555; }

/* Service Page Hero */
.service-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
}
.service-hero img {
  width: 100%; height: 400px; object-fit: cover;
}
.service-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(22,9,1,0.7), transparent);
  display: flex; align-items: flex-end;
  padding: 40px;
}
.service-hero-overlay h1 {
  color: var(--white);
  font-size: 42px;
}

/* Service Content Blocks */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 50px;
}
.service-block:nth-child(even) { direction: rtl; }
.service-block:nth-child(even) > * { direction: ltr; }
.service-block img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%; height: 300px; object-fit: cover;
}
.service-block h3 { font-size: 28px; margin-bottom: 14px; color: var(--primary-dark); }
.service-block p { font-size: 15px; color: #555; line-height: 1.8; }

/* Gallery Grid (no crop) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-grid img {
  width: 100%; height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}

/* Specialist Page */
.specialist-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
}
.specialist-hero img {
  width: 100%; height: 400px; object-fit: cover;
}
.specialist-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(22,9,1,0.7), transparent);
  display: flex; align-items: flex-end;
  padding: 40px;
}
.specialist-hero-overlay h1 {
  color: var(--white);
  font-size: 42px;
}
.specialist-content {
  max-width: 800px;
  margin: 0 auto;
}
.specialist-content p {
  font-size: 16px; line-height: 1.9; color: #444;
  margin-bottom: 1.2rem;
}

/* --- Gallery / Carousel --- */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 10px 0;
}
.carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.5s ease;
}
.carousel-track img {
  flex: 0 0 calc(20% - 13px);
  width: calc(20% - 13px);
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.carousel-track img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px; color: var(--primary-dark);
  transition: var(--transition);
  z-index: 5;
  box-shadow: var(--shadow);
}
.carousel-btn:hover {
  background: var(--primary-dark);
  color: var(--white);
  border-color: var(--primary-dark);
}
.carousel-btn.prev { left: 6px; }
.carousel-btn.next { right: 6px; }

/* --- Reviews --- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(249, 168, 115, 0.1);
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.review-stars { color: #FFB800; font-size: 18px; margin-bottom: 12px; }
.review-text { font-size: 15px; color: #555; font-style: italic; margin-bottom: 14px; line-height: 1.7; }
.review-author { font-weight: 600; font-size: 14px; color: var(--dark); }
.review-date { font-size: 13px; color: #999; }

/* --- Contact Bar --- */
.contact-bar {
  background: linear-gradient(135deg, var(--primary-dark), #b8520a);
  padding: 40px 0;
  text-align: center;
  color: var(--white);
}
.contact-bar h2 { color: var(--white); font-size: 32px; margin-bottom: 10px; }
.contact-bar p { font-size: 16px; opacity: 0.92; margin-bottom: 20px; }
.contact-bar .btn {
  background: var(--white);
  color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.contact-bar .btn:hover {
  background: var(--primary);
  color: var(--white);
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer h4 {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 18px;
  font-family: var(--font-heading);
}
.footer p, .footer a { font-size: 14px; color: rgba(255,255,255,0.75); line-height: 1.8; }
.footer a:hover { color: var(--primary); }
.footer-contact li { margin-bottom: 8px; display: flex; align-items: flex-start; gap: 10px; }
.footer-contact .f-icon { color: var(--primary); font-size: 16px; margin-top: 3px; flex-shrink: 0; }
.footer-map iframe {
  border-radius: var(--radius-sm);
  width: 100%; height: 220px;
}
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  font-size: 20px;
  color: var(--primary);
  transition: var(--transition);
  margin-right: 10px;
}
.footer-social a:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-3px);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: var(--primary); }
.footer-bottom a:hover { text-decoration: underline; }

/* --- WhatsApp Float --- */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 998;
  transition: var(--transition);
  animation: pulse-wp 2s infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}
.whatsapp-float svg { width: 32px; height: 32px; fill: white; }
@keyframes pulse-wp {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.6); }
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 14px 0;
  font-size: 14px;
  color: #888;
}
.breadcrumb a { color: var(--primary-dark); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 8px; color: #ccc; }

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--dark);
  color: rgba(255,255,255,0.9);
  padding: 20px;
  z-index: 9999;
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-banner.show { display: block; animation: slideUp 0.4s ease; }
.cookie-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.cookie-inner p { font-size: 14px; flex: 1; margin: 0; }
.cookie-inner a { color: var(--primary); text-decoration: underline; }
.cookie-btns { display: flex; gap: 10px; }
.cookie-btns .btn { padding: 10px 24px; font-size: 14px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* --- 404 Page --- */
.page-404 {
  min-height: 70vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px;
}
.page-404 h1 { font-size: 120px; color: var(--primary); line-height: 1; }
.page-404 h2 { font-size: 28px; margin: 16px 0; }
.page-404 p { font-size: 16px; color: #666; margin-bottom: 28px; }

/* --- Responsive --- */
@media (max-width: 992px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .nav-desktop { display: none; }
  .menu-toggle { display: block; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 30px; }
  .two-col-reverse { direction: ltr; }
  .diferencia-grid { grid-template-columns: 1fr; }
  .ideais-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .service-block { grid-template-columns: 1fr; }
  .service-block:nth-child(even) { direction: ltr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .carousel-track img { flex: 0 0 calc(50% - 8px); width: calc(50% - 8px); }
  .banner-desktop { display: none; }
  .banner-mobile { display: block; }
}
@media (max-width: 600px) {
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  section { padding: 50px 0; }
  .cards-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 8px 16px; }
  .logo img { height: 45px; }
  .carousel-track img { flex: 0 0 calc(100% - 0px); width: 100%; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .service-hero img, .specialist-hero img { height: 260px; }
  .service-hero-overlay h1, .specialist-hero-overlay h1 { font-size: 28px; }
  .cookie-inner { flex-direction: column; text-align: center; }
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Curved Dividers */
.curve-divider {
  position: relative;
}
.curve-divider::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: inherit;
  clip-path: ellipse(55% 100% at 50% 100%);
}
.curve-top::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 60px;
  background: inherit;
  clip-path: ellipse(55% 100% at 50% 0%);
  z-index: 1;
}

/* Smooth Wave */
.wave-separator {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.wave-separator svg {
  width: 100%;
  height: 60px;
  display: block;
}
