:root {
  --black: #020404;
  --gold: #D89B2B;
  --white: #ffffff;
  --gray: #f5f5f5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: var(--black);
  color: var(--white);
  line-height: 1.5;


}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

.mainsection {
  height: 80vh;
}

/* HEADER */
.header {
  background: #020404;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  width: 40px;
}

.logo-text {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url('/img/sof-qro-cerrajeria-logo-text.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.logo-text span {
  display: block;
  font-size: 0.9rem;
  color: transparent;
  text-indent: -9999px;
}

.logo-text strong {
  color: transparent;
  font-size: 1rem;
  text-indent: -9999px;
}

/* MENU */
.menu {
  display: flex;
  gap: 30px;
}

.menu a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  transition: 0.3s;
}

.menu a:hover {
  color: #fff;
}

/* CTA */
.nav-cta {
  display: flex;
  gap: 10px;
}

.popup {
  width: auto;
  margin: 15vh 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.popup-container {
  width: 750%;
  max-width: 900px;
  background-color: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--white);
}

.popup .btn {
  border: 2px solid var(--white);
  margin: 20px 30px;
}

.btn {
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}

.call {
  border: 1px solid #FAFAF9;
  color: #fff;
  display: inline-flex;
  align-items: center;
}

.whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: #d4a437;
  color: #000;

  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;

  transition: all 0.3s ease;
}

.whatsapp img {
  width: 18px;
  height: 18px;
}

.call img {
  width: 22px;
  height: 22px;
  margin-right: 8px;
}

/* Hover effect */
.whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 164, 55, 0.3);
}

.btn:hover {
  opacity: 0.8;
}

/* MOBILE */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 900px) {

  .menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #020404;
    flex-direction: column;
    align-items: center;
    display: none;
    padding: 20px 0;
  }

  .menu.active {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

/* HERO */
.background-hero {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/img/sof-cerrajero-en-queretaro.png');
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  z-index: -1;
}

.hero {
  padding: 80px 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero h1 span {
  color: var(--gold);
}

.badge {
  display: inline-block;
  background: var(--gold);
  color: black;
  padding: 5px 12px;
  border-radius: 20px;
  margin: 15px 0;
  font-weight: bold;
}

.cta {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  border: 2px solid var(--gold);
  color: var(--white);
  text-decoration: none;
  border-radius: 5px;
  transition: 0.3s;
}

.call-primary {
  border: 2px solid #FAFAF9;
  color: #FAFAF9;
}

.btn.primary {
  background: transparent;
  color: #FAFAF9;
  display: inline-flex;
  align-items: center;
}

.btn.primary img {
  width: 22px;
  height: 22px;
  margin-right: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.trust {
  position: relative;
  height: 30px;
  overflow: hidden;
  padding: 40px 0;
}

.trust-item {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;

  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.trust-item img {
  width: 18px;
  height: 18px;
}

.trust-item span {
  font-size: 0.95rem;
  color: #ccc;
}

/* active state */
.trust-item.active {
  opacity: 1;
  transform: translateY(0);
}

/* SERVICES */
.services {
  padding: 3rem 0;
  background-color: var(--gray);
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  color: var(--black);
  margin-bottom: 1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

/* CARD */

.service-card {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  transition: .3s ease;

}

.service-card:hover {
  transform: translateY(-8px);
}

/* IMAGE */

.service-image {
  height: 20vh;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CONTENT */

.service-content {
  position: relative;
  padding: 4.5rem 2rem 2rem;
  text-align: center;
}

/* FLOATING ICON */

.service-icon {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  border: 2px solid #d89b2b;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;

  position: absolute;

  top: 0;
  left: 50%;

  transform: translate(-50%, -50%);

  box-shadow:
    0 10px 25px rgba(0, 0, 0, .45);

  z-index: 10;
}

.service-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

/* TITLE */

.service-content h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--black);
}

/* GOLD DIVIDER */

.service-divider {
  width: 55px;
  height: 3px;
  background: #d89b2b;
  margin: 0 auto 1.5rem;
  border-radius: 999px;
}

/* TEXT */

.service-content p {
  color: rgba(0, 0, 0, .50);
  line-height: 1.8;
  font-size: 1rem;
}

/* HOVER EFFECT */

.service-card:hover .service-icon {
  transform: translate(-50%, -50%) scale(1.05);
  transition: .3s ease;
}

/* MOBILE */

@media (max-width: 768px) {

  .service-image {
    height: 240px;
  }

  .service-content {
    padding: 4rem 1.5rem 2rem;
  }

  .service-content h3 {
    font-size: 1.4rem;
  }

}

/* =========================
   TABLET
========================= */

@media (max-width: 1100px) {

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-icon {
    width: 60px;
    height: 60px;
  }

}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {
  .hero .cta {
    display: none;
  }

  .services {
    padding: 5rem 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-image {
    height: 220px;
  }

  .service-content {
    padding: 1.6rem;
  }

  .section-title {
    margin-bottom: 3rem;
  }

  .backbround-hero {
    background-position: center;
  }

}

/* COVERAGE */
.coverage {
  padding: 60px 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
}

.map-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-container figure {
  display: block;
  width: 100%;
  height: 100%;
}

.map-container img {
  width: 100%;
  height: auto;
}

.coverage figcaption {
  display: none;
}

.coverage ul {
  columns: 2;
  margin-top: 20px;
}

.coverage li {
  margin-bottom: 10px;
}

.custom-list {
  list-style: none;
  padding: 0;
}

.custom-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.custom-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;

  width: 16px;
  height: 16px;

  background: url('/img/sof-cerrajeria-pin-icon.svg') no-repeat center;
  background-size: contain;
}

.custom-list li a {
  color: var(--white);
  text-decoration: none;
}

.custom-list li a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* WHY */
.why {
  background: var(--gray);
  color: black;
  padding: 60px 0;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
}

.why-text {
  display: none;
}

/* REVIEWS */
.reviews {
  padding: 60px 0;
}

.review {
  background: #111;
  padding: 20px;
  border-radius: 10px;
}

.reviews a {
  color: var(--gold);
  text-decoration: none;
  border: none;
}

.reviews a:hover {
  text-decoration: underline;
}

/* FOOTER */
.footer {
  background: #111;
  color: #fff;
  padding: 60px 0 20px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
}

.footer-brand {
  width: 100%;
  padding: 0 10%;
}

.footer-brand img {
  width: 100%;
  height: auto;
}

.footer h4 {
  margin-bottom: 10px;
  color: #d4a437;
}

.footer h3 span {
  color: #d4a437;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 6px;
}

.footer a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.8rem;
}

.footer a:hover {
  color: #fff;
}

.socials {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.socials a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: 0.3s;
}

.socials img {
  width: 18px;
  height: 18px;
}

/* Hover effect (premium feel) */
.socials a:hover {
  border-color: #d4a437;
  transform: translateY(-2px);
}

.socials a:hover img {
  filter: brightness(0) saturate(100%) invert(75%) sepia(40%) saturate(500%) hue-rotate(5deg);
}

.footer-cta {
  text-align: center;
  margin-top: 40px;
}

.footer-cta .btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background: #d4a437;
  color: #000;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  opacity: 0.6;
}

.footer-contact img {
  width: 18px;
  height: 18px;
  margin-right: 2px;
}

/* STICKY MOBILE CTA */
.sticky {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
}

/* LOADING */
.loading {
  position: fixed;
  inset: 0;
  background: #020404;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.loading img {
  width: 45%;
}

.logo-loading-text span {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}

.logo-loading-text strong {
  color: #d4a437;
  font-size: 1rem;
  text-align: center;
}

.loading img {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* hidden state */
.loading.hide {
  opacity: 0;
  visibility: hidden;
}

.sticky a {
  flex: 1;
  text-align: center;
  padding: 15px;
  text-decoration: none;
  font-weight: bold;
}

.call {
  border: 1px solid #FAFAF9;
  color: FAFAF9;
  font-weight: bold;

}

.call-sticky {
  background: var(--black);
}

.whatsapp {
  background: #D89B2B;
  color: #FAFAF9;
}

@media(min-width:768px) {
  .sticky {
    display: none;
  }

}

/* =========================================
   RESPONSIVE - TABLETS
========================================= */

@media (max-width: 1024px) {
  .mainsection {
    height: auto;
  }

  .container {
    width: 92%;
  }

  .hero h1 {
    font-size: 3.2rem;
    line-height: 1.1;
  }

  .services .grid,
  .reviews .grid,
  .why .grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .coverage {
    gap: 2rem;
  }

  .map-container figure {
    display: block;
    width: 100%;
    height: 100%;
  }

  .map-container img {
    width: 100%;
    height: auto;
  }

  .footer-brand {
    padding: 0 25%;
  }
}


/* =========================================
   RESPONSIVE - MOBILE
========================================= */

@media (max-width: 768px) {
  .mainsection {
    height: auto;
  }

  /* GENERAL */
  .container {
    width: 92%;
  }

  .mainsection {
    padding: 5rem 0;
  }

  h1 {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  p {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* HEADER */
  .nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .menu {
    display: none;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
  }

  .menu-toggle {
    display: flex;
  }

  /* HERO */
  .hero {
    text-align: center;
    padding-top: 7rem;
  }

  .hero p {
    max-width: 100%;
  }

  .cta {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 1rem;
  }

  .cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* TRUST ITEMS */
  .trust {
    grid-template-columns: 1fr;
  }

  .trust-item {
    width: 100%;
  }


  /* COVERAGE */
  .coverage {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .coverage-intro-container {
    text-align: center;
  }

  .map-container figure {
    margin: 0;
  }

  .map-container img {
    width: 100%;
    border-radius: 1.5rem;
  }

  figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
  }

  /* WHY TEXT */
  .why-text {
    margin-top: 2rem;
  }

  .why-text p {
    font-size: 1rem;
    line-height: 1.9;
    white-space: normal;
  }

  /* FOOTER */
  .footer {
    text-align: center;
  }

  .footer-grid {
    gap: 3rem;
  }

  .footer-brand {
    padding: 0 25%;
  }

  .footer-brand img {
    margin: 0 auto;
  }

  .socials {
    justify-content: center;
  }

  .footer-contact p a {
    justify-content: center;
  }

  /* STICKY BAR */
  .sticky {
    display: flex;
    z-index: 1000;
  }
}


/* =========================================
   SMALL MOBILE DEVICES
========================================= */

@media (max-width: 480px) {
  .mainsection {
    height: auto;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  .hero {
    padding-top: 6rem;
  }

  .btn {
    font-size: 0.95rem;
    padding: 0.9rem 1rem;
  }

  .services .card,
  .review {
    padding: 1.2rem;
  }

  .popup-container {
    padding: 2rem 1.5rem;
  }

  .footer-brand {
    padding: 0 30%;
  }

}

@media only screen and (max-device-height: 480px) {
  body {
    background-image: url(/img/gria-dispositivo.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
    background-position-y: 25vh;
    background-color: #111111;
  }

  header {
    display: none;
  }

  section {
    display: none;
  }

  div {
    display: none;
  }

  img {
    display: none;
  }

  .footer {
    display: none;
  }

  .sticky {
    display: none;
  }
}