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

/* ============================================================
   VARIÁVEIS E BASE
   ============================================================ */
:root {
  --palace-blue: #144897;
  --palace-blue-dark: #0f3672;
  --palace-blue-light: #1a5cbf;
  --palace-text: #2c3e50;
  --palace-text-muted: #6c757d;
  --palace-gray-bg: #f4f7fc;
  --palace-border: #e2eaf5;
  --navbar-height: 72px;
  --custom-primary: #144897;
  --font-family: 'Open Sans', var(--bs-font-sans-serif);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--palace-text);
  line-height: 1.7;
}

/* Offset para anchor links com navbar sticky */
section[id],
[id="contato"] {
  scroll-margin-top: var(--navbar-height);
}

/* ============================================================
   FORM - mantém estilos existentes com cor palace
   ============================================================ */
.btn-custom-primary {
  background-color: var(--custom-primary);
  border-color: var(--custom-primary);
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 6px;
  transition: all 0.25s ease;
  width: 100%;
}

.btn-custom-primary:hover,
.btn-custom-primary:focus,
.btn-custom-primary:active {
  background-color: var(--palace-blue-dark) !important;
  border-color: var(--palace-blue-dark) !important;
  color: #fff !important;
  filter: none !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(20, 72, 151, 0.35) !important;
}

.btn-custom-primary:disabled {
  background-color: var(--custom-primary) !important;
  border-color: var(--custom-primary) !important;
  opacity: 0.7;
}

/* ============================================================
   BOTÕES PALACE
   ============================================================ */
.btn-palace {
  background-color: var(--palace-blue);
  color: #fff;
  padding: 13px 36px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-block;
  transition: all 0.25s ease;
  border: 2px solid var(--palace-blue);
  letter-spacing: 0.3px;
}

.btn-palace:hover {
  background-color: var(--palace-blue-dark);
  border-color: var(--palace-blue-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 72, 151, 0.3);
}

.btn-palace-white {
  background-color: transparent;
  color: #fff;
  padding: 14px 44px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: all 0.25s ease;
  border: 2px solid #fff;
  letter-spacing: 0.5px;
}

.btn-palace-white:hover {
  background-color: #fff;
  color: var(--palace-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

/* ============================================================
   NAVBAR
   ============================================================ */
#main-navbar {
  height: var(--navbar-height);
  box-shadow: 0 2px 16px rgba(20, 72, 151, 0.10);
  z-index: 1030;
}

.navbar-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}

#main-navbar .nav-link {
  color: var(--palace-text);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}

#main-navbar .nav-link:hover {
  color: var(--palace-blue);
  background-color: rgba(20, 72, 151, 0.05);
}

#main-navbar .nav-link.active {
  color: var(--palace-blue);
  font-weight: 600;
}

.btn-nav-cta {
  background-color: var(--palace-blue) !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
}

.btn-nav-cta:hover {
  background-color: var(--palace-blue-dark) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(20, 72, 151, 0.3);
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--navbar-height));
  background-color: var(--palace-blue);
  display: flex;
  align-items: center;
}

.hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-video-wrapper.is-visible {
  opacity: 1;
}

.hero-video-wrapper iframe,
#hero-yt-player {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100vw !important;
  height: 56.25vw !important; /* 16:9 */
  min-height: 100% !important;
  min-width: 177.78vh !important; /* 16:9 invertido */
  pointer-events: none !important;
  border: 0 !important;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 28, 70, 0.45) 0%, rgba(20, 72, 151, 0.28) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 20px;
}

.hero-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  margin-bottom: 0;
}

.hero-form-wrapper {
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   TIPOGRAFIA DAS SEÇÕES
   ============================================================ */
.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 800;
  color: var(--palace-blue);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--palace-text-muted);
  max-width: 760px;
  line-height: 1.75;
  margin-bottom: 0;
}

.section-text {
  font-size: 0.97rem;
  color: #4a5568;
  line-height: 1.85;
  margin-bottom: 1rem;
}

/* ============================================================
   IMAGENS DAS SEÇÕES
   ============================================================ */
.section-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 14px;
  background-color: var(--palace-gray-bg);
  display: block;
  margin: 0 auto;
}

/* ============================================================
   SEÇÃO SOBRE
   ============================================================ */
.section-sobre {
  background-color: #fff;
}

/* ============================================================
   FUNDO ALTERNADO
   ============================================================ */
.bg-section-alt {
  background-color: var(--palace-gray-bg);
}

/* ============================================================
   SEÇÃO FINANCIAMENTO - BENEFITS
   ============================================================ */
.benefits-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--palace-blue);
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.benefit-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background-color: var(--palace-blue);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.benefit-content strong {
  display: block;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--palace-text);
  margin-bottom: 3px;
}

.benefit-content p {
  font-size: 0.88rem;
  color: var(--palace-text-muted);
  margin-bottom: 0;
  line-height: 1.65;
}

/* ============================================================
   SEÇÃO TIPOS DE IMÓVEIS
   ============================================================ */
.section-imoveis {
  background-color: #fff;
}

.imovel-card {
  text-align: center;
  padding: 28px 16px 24px;
  border-radius: 14px;
  border: 1.5px solid var(--palace-border);
  background-color: #fff;
  transition: all 0.3s ease;
  cursor: default;
}

.imovel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(20, 72, 151, 0.13);
  border-color: var(--palace-blue);
}

.imovel-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 14px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.imovel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--palace-blue);
  margin-bottom: 8px;
}

.imovel-text {
  font-size: 0.82rem;
  color: var(--palace-text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================================================
   SEÇÃO DEPOIMENTOS
   ============================================================ */
.section-depoimentos {
  background-color: var(--palace-blue);
}

.section-depoimentos .section-title {
  color: #fff;
}

.depoimento-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.depoimento-stars {
  margin-bottom: 14px;
}

.depoimento-stars i {
  color: #f5a623;
  font-size: 15px;
}

.depoimento-text {
  font-size: 0.95rem;
  color: #3a4a5c;
  line-height: 1.75;
  flex: 1;
  margin-bottom: 20px;
  font-style: italic;
}

.depoimento-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--palace-border);
  padding-top: 16px;
  margin-top: auto;
}

.depoimento-avatar {
  font-size: 38px;
  color: var(--palace-blue);
  line-height: 1;
}

.depoimento-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--palace-blue);
}

/* Carousel customizations */
#depoimentosCarousel .carousel-inner {
  padding-bottom: 60px;
}

.depoimentos-indicators {
  bottom: 10px;
}

.depoimentos-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  transition: background 0.25s;
}

.depoimentos-indicators button.active {
  background-color: #fff;
  width: 28px;
  border-radius: 5px;
}

#depoimentosCarousel .carousel-control-prev,
#depoimentosCarousel .carousel-control-next {
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  top: 50%;
  transform: translateY(calc(-50% - 30px));
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transition: background 0.2s;
}

#depoimentosCarousel .carousel-control-prev {
  left: 0;
}

#depoimentosCarousel .carousel-control-next {
  right: 0;
}

#depoimentosCarousel .carousel-control-prev:hover,
#depoimentosCarousel .carousel-control-next:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

#depoimentosCarousel .carousel-control-prev-icon,
#depoimentosCarousel .carousel-control-next-icon {
  width: 18px;
  height: 18px;
}

/* ============================================================
   SEÇÃO SOBRE PALACE
   ============================================================ */
.section-sobre-palace {
  background-color: var(--palace-gray-bg);
}

/* ============================================================
   SEÇÃO CTA FINAL
   ============================================================ */
.section-cta {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--palace-blue-dark);
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 28, 70, 0.12) 0%, rgba(20, 72, 151, 0.08) 100%);
}

.cta-text {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.75;
  font-weight: 400;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-palace {
  background-color: var(--palace-blue);
  color: #fff;
}

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

.footer-desc {
  color: rgba(255, 255, 255, 0.70);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.footer-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 18px;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.80);
  font-size: 0.90rem;
}

.footer-contact-list li i {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.60);
  flex-shrink: 0;
}

.footer-contact-list a {
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact-list a:hover {
  color: #fff;
}

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

.footer-social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
  font-size: 0.90rem;
  transition: color 0.2s, transform 0.2s;
}

.footer-social-link i {
  font-size: 16px;
}

.footer-social-link:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.15);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
}

/* ============================================================
   RESPONSIVIDADE - TABLET (md)
   ============================================================ */
@media (max-width: 991.98px) {
  .hero-section {
    min-height: 100vh;
    padding: 0;
  }

  .hero-content {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .hero-form-wrapper {
    padding: 28px 24px;
  }

  #depoimentosCarousel .carousel-control-prev {
    left: -8px;
  }

  #depoimentosCarousel .carousel-control-next {
    right: -8px;
  }

  .section-img {
    height: auto;
    max-width: 100%;
  }
}

/* ============================================================
   RESPONSIVIDADE - MOBILE (≤ 767px)
   ============================================================ */
@media (max-width: 767.98px) {

  /* GLOBAL — remove scroll lateral */
  html,
  body {
    overflow-x: hidden;
  }

  /* NAVBAR */
  #main-navbar {
    height: auto;
    min-height: 64px;
  }

  .navbar-logo {
    height: 38px;
  }

  #navbarNav {
    border-top: 1px solid var(--palace-border);
    margin-top: 8px;
    padding: 8px 0 16px;
  }

  #main-navbar .nav-link {
    padding: 10px 0;
    font-size: 0.95rem;
  }

  .btn-nav-cta {
    margin-top: 8px;
    display: inline-block;
    width: auto;
  }

  /* HERO */
  .hero-section {
    overflow: hidden;
    min-height: 100svh;
  }

  .hero-content {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero-title {
    font-size: 1.5rem;
    line-height: 1.28;
    margin-bottom: 14px;
  }

  .hero-text {
    font-size: 0.93rem;
    line-height: 1.75;
  }

  .hero-form-wrapper {
    padding: 28px 22px;
    margin-top: 12px;
    border-radius: 12px;
  }

  /* TIPOGRAFIA DE SEÇÕES */
  .section-title {
    font-size: 1.4rem;
    line-height: 1.28;
  }

  .section-subtitle {
    font-size: 0.93rem;
  }

  .section-text {
    font-size: 0.93rem;
  }

  /* SEÇÃO SOBRE / FINANCIAMENTO / SOBRE PALACE */
  .section-sobre,
  .section-financiamento,
  .section-sobre-palace {
    padding-top: 52px !important;
    padding-bottom: 52px !important;
  }

  .section-img {
    max-width: 78%;
    margin-top: 8px;
    height: auto;
  }

  /* BENEFITS */
  .benefits-title {
    font-size: 1rem;
  }

  .benefits-list {
    gap: 14px;
  }

  .benefit-item {
    gap: 12px;
  }

  .benefit-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
    border-radius: 8px;
  }

  .benefit-content strong {
    font-size: 0.9rem;
  }

  .benefit-content p {
    font-size: 0.85rem;
  }

  /* IMÓVEIS */
  .section-imoveis {
    padding-top: 52px !important;
    padding-bottom: 52px !important;
  }

  .imoveis-grid {
    row-gap: 14px !important;
  }

  .imovel-card {
    padding: 20px 12px 18px;
    border-radius: 12px;
  }

  .imovel-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
  }

  .imovel-title {
    font-size: 0.88rem;
  }

  .imovel-text {
    font-size: 0.78rem;
  }

  /* DEPOIMENTOS */
  .section-depoimentos {
    padding-top: 52px !important;
    padding-bottom: 52px !important;
  }

  .depoimento-card {
    padding: 26px 20px 22px;
    min-height: auto;
  }

  .depoimento-text {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  #depoimentosCarousel .carousel-control-prev,
  #depoimentosCarousel .carousel-control-next {
    display: none;
  }

  /* CTA */
  .section-cta .container {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }

  .cta-text {
    font-size: 0.95rem;
  }

  .btn-palace-white {
    padding: 13px 30px;
    font-size: 0.95rem;
  }

  /* FOOTER */
  .footer-palace .container {
    padding-top: 40px !important;
    padding-bottom: 32px !important;
  }

  .footer-logo {
    height: 44px;
  }

  .footer-title {
    margin-top: 28px;
    margin-bottom: 14px;
  }

  .footer-contact-list li {
    font-size: 0.86rem;
    word-break: break-word;
  }

  .footer-social-link {
    font-size: 0.86rem;
  }
}

/* ============================================================
   RESPONSIVIDADE - MOBILE PEQUENO (≤ 575px)
   ============================================================ */
@media (max-width: 575.98px) {

  .hero-content {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .hero-text {
    font-size: 0.9rem;
  }

  .hero-form-wrapper {
    padding: 22px 16px;
    border-radius: 10px;
  }

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

  .section-depoimentos .section-title {
    font-size: 1.2rem;
  }

  .btn-palace {
    width: 100%;
    text-align: center;
    padding: 13px 20px;
  }

  .depoimento-card {
    padding: 22px 16px 18px;
  }

  .depoimento-text {
    font-size: 0.86rem;
  }

  .imovel-icon {
    width: 50px;
    height: 50px;
  }
}
