/*
Theme Name: Urpi Arquitectura
Theme URI: https://ejemplo.com/urpi-arquitectura
Author: Tu Nombre
Author URI: https://ejemplo.com
Description: Tema personalizado para Urpi Arquitectura
Version: 1.0.0
License: GPL v2 or later
Text Domain: urpi-arquitectura
*/

@font-face {
  font-family: 'Versatylo Rounded';
  src: url('assets/fonts/VersatyloRounded.woff2') format('woff2'),
       url('assets/fonts/VersatyloRounded.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* WebP preloader */
img[src*=".webp"] {
  opacity: 0;
  background-color: #EBE5D9;
}
img[src*=".webp"].loaded {
  animation: img-fade-in 0.35s ease forwards;
}

@keyframes img-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========================================
   Hero — Swiper Images
   ======================================== */

.hero-swiper img {
  opacity: 1;
  background-color: #EBE5D9;
  animation: hero-img-fade-in 0.4s ease;
}

@keyframes hero-img-fade-in {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* Shimmer loading effect for hero slides */
.slide-inner {
  position: relative;
  overflow: hidden;
  background-color: #EBE5D9;
}
.slide-inner.shimmer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.45) 50%,
    transparent 100%
  );
  animation: shimmer 1.4s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ========================================
   Hero — Swiper Pagination
   ======================================== */

.hero-pagination.swiper-pagination {
  position: relative !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  bottom: auto !important;
}

.hero-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  opacity: 1;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
}

.hero-bullet:hover {
  background: rgba(0, 0, 0, 0.22);
}

.hero-bullet.swiper-pagination-bullet-active {
  width: 26px;
  height: 10px;
  border-radius: 999px;
  background: #7B856F;
  border-color: #7B856F;
}

/* Mobile menu overlay */
#nav-overlay {
  display: none;
}

#nav-overlay.active {
  display: block;
}

/* ========================================
   Navbar scroll effect
   ======================================== */

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header.scrolled #header-container {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.site-header.scrolled #header-logo {
  height: 2.5rem;
}

/* ========================================
   Testimonios — Swiper
   ======================================== */

.testimonios-swiper .swiper-slide {
  display: flex;
  align-items: center;
}

/* ========================================
   Testimonios — Swiper Pagination
   ======================================== */

.testimonios-pagination.swiper-pagination {
  position: relative !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  bottom: auto !important;
}

.testimonios-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  opacity: 1;
  transition: all 0.3s ease;
}

.testimonios-pagination .swiper-pagination-bullet-active {
  width: 22px;
  border-radius: 999px;
  background: #EBE5D9;
}

/* Admin-bar offset */
.admin-bar .site-header {
  top: 32px;
}

/* Form toast animation */
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
#form-toast {
  animation: toast-in 0.35s ease-out;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
