/*
Theme Name: Romvill
Theme URI: https://romvill.com
Author: Romvill
Author URI: https://romvill.com
Description: Tema WordPress para Romvill — Inteligencia Territorial. Análisis de zona en Alicante, Marbella y Málaga.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: romvill
Tags: custom-menu, one-page, responsive-layout
*/

/* ===== Base Styles ===== */
html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* ===== Dimension Card Hover (Análisis page) ===== */
.dimension-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dimension-card:hover .dimension-overlay {
    opacity: 1;
    transform: translateY(0);
}

.dimension-card:hover .dimension-bg {
    transform: scale(1.05);
}

.dimension-overlay {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Sectores Split Hover ===== */
.split-hover:hover {
    flex-grow: 1.5;
}

.split-section {
    transition: all 0.5s ease-in-out;
}

/* ===== Metodología Radar Grid ===== */
.radar-grid {
    background-image: radial-gradient(circle, rgba(112, 128, 144, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* ===== Contact Form 7 Custom Styles ===== */
.wpcf7 select,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8f9fc;
    color: #0f172a;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.wpcf7 select:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: #135bec;
    box-shadow: 0 0 0 2px rgba(19, 91, 236, 0.2);
}

.wpcf7 input[type="submit"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: #135bec;
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.wpcf7 input[type="submit"]:hover {
    background: #0d3c9e;
}

.wpcf7-response-output {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* ===== No Scrollbar Utility ===== */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
/* ===== Contact Form — Romvill Style ===== */
.romvill-form { display: flex; flex-direction: column; gap: 2.25rem; }

.rf-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 640px) { .rf-row-2 { grid-template-columns: 1fr; } }

.rf-field { display: flex; flex-direction: column; gap: 0.625rem; }

.rf-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-family: 'Manrope', sans-serif;
    padding-top: 0.25rem;
}
.rf-req { color: #135bec; }

/* Inputs, selects, textarea */
.romvill-form .wpcf7-form-control:not([type=submit]) {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-family: 'Manrope', sans-serif;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.romvill-form .wpcf7-form-control:not([type=submit]):focus {
    border-color: #135bec;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(19,91,236,0.10);
}
.romvill-form .wpcf7-form-control:not([type=submit])::placeholder {
    color: #94a3b8;
}

/* Select arrow */
.romvill-form select.wpcf7-form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Textarea */
.romvill-form textarea.wpcf7-form-control {
    min-height: 130px;
    resize: vertical;
    line-height: 1.6;
}

/* Submit button */
.romvill-form .wpcf7-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: #1e293b;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
    margin-top: 0.5rem;
}
.romvill-form .wpcf7-submit:hover {
    background: #135bec;
    transform: translateY(-1px);
}

/* Validation errors */
.romvill-form .wpcf7-not-valid-tip {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
    font-family: 'Manrope', sans-serif;
}
.romvill-form .wpcf7-not-valid { border-color: #ef4444 !important; }
.wpcf7-response-output {
    margin-top: 1rem !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.5rem !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 0.875rem !important;
    border: none !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}
.wpcf7-form.invalid .wpcf7-response-output {
    background: #fef2f2 !important;
    color: #991b1b !important;
}

/* ===== Hero — efectos premium (fade-in cascada, Ken Burns, glow de texto) ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes kenburns {
    from { transform: scale(1.0); }
    to   { transform: scale(1.08); }
}
.fade-item { opacity: 0; animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.fade-1 { animation-delay: 0.3s; }
.fade-2 { animation-delay: 0.7s; }
.fade-3 { animation-delay: 1.1s; }
.fade-4 { animation-delay: 1.5s; }
.fade-5 { animation-delay: 1.9s; }
/* Refuerzo sutil de legibilidad detrás del bloque de texto (no tapa los slides) */
.hero-textglow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.20) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}
@media (prefers-reduced-motion: reduce) {
    .fade-item { opacity: 1 !important; animation: none !important; transform: none !important; }
    #hero-slideshow .hero-slide { animation: none !important; }
    .rv-pillar { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===== Trust Bar — Open Layout ===== */
.trust-bar {
    position: relative;
    z-index: 30;
    background-color: #0b1120;
    padding: 3rem 1.5rem;
}
.trust-bar::before,
.trust-bar::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(191, 161, 95, 0.25), transparent);
}
.trust-bar::before { top: 0; }
.trust-bar::after  { bottom: 0; }

.trust-bar__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    max-width: 72rem;
    margin: 0 auto;
}

/* Stat block (estado inicial en CSS: translate-y-4 no está compilado) */
.trust-stat {
    text-align: center;
    padding: 0.5rem 1rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.trust-stat.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.trust-stat__icon { margin-bottom: 8px; color: #3d4a5c; }

.trust-stat__number {
    display: block;
    font-size: 2.875rem;
    font-weight: 400;
    color: #f1f5f9;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    margin: 0;
}

.trust-stat__accent {
    width: 28px;
    height: 1px;
    margin: 12px auto;
    background: linear-gradient(90deg, transparent, #BFA15F, transparent);
}

.trust-stat__label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #BFA15F;
    margin: 0 0 12px;
    font-weight: 600;
}

.trust-stat__desc {
    font-size: 0.75rem;
    color: #7e8fa6;
    margin: 0;
    line-height: 1.5;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.trust-bar__divider {
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, transparent, rgba(191, 161, 95, 0.3), transparent);
    justify-self: center;
}

@media (prefers-reduced-motion: reduce) {
    .trust-stat { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 768px) {
    .trust-bar__inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .trust-bar__divider { width: 60px; height: 1px; margin: 0 auto; }
    .trust-stat__number { font-size: 2.25rem; }
    .trust-bar { padding: 2rem 1.5rem; }
}

/* MEJORA 7 — Pilares "Nuestro Servicio".
   Hover dorado y lift ya vienen del markup; aquí: radio 12px, animación de
   entrada escalonada al entrar en viewport (.is-visible vía IntersectionObserver)
   y, en modo oscuro, fondo glassmorphic exacto de la spec. */
.rv-pillar {
    border-radius: 12px !important;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.rv-pillar.is-visible { opacity: 1; transform: translateY(0); }
.rv-pillar:nth-child(1) { transition-delay: 0.20s; }
.rv-pillar:nth-child(2) { transition-delay: 0.35s; }
.rv-pillar:nth-child(3) { transition-delay: 0.50s; }
.rv-pillar:nth-child(4) { transition-delay: 0.65s; }
.dark .rv-pillar {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}
.dark .rv-pillar:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: #BFA15F !important;
}

/* MEJORA 8 — Borde dorado sutil bajo el nav */
.rv-nav { border-bottom-color: rgba(191, 161, 95, 0.15) !important; }

/* MEJORA 9 — Separador dorado superior en la sección "Nuestro Servicio" */
.rv-service-sep { border-top-color: rgba(191, 161, 95, 0.10) !important; }

/* ===== Monograma RV del nav (sustituye la antigua caja "R") ===== */
.rv-monogram {
    height: 44px;
    width: auto;
    display: block;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}
/* Texto ROMVILL proporcionado al monograma de 58px */
.site-logo span {
    font-size: 17px;
    letter-spacing: 3.5px;
    font-weight: 500;
}

/* ─── Nav Transparente sobre Hero ─────────────────────── */

/* Estado por defecto: transparente con gradiente sutil */
.rv-nav {
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 60%, transparent 100%) !important;
  border: none !important;
  box-shadow: none !important;
}

/* Texto blanco con sombra sobre el hero */
.rv-nav:not(.scrolled) .site-logo span {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.rv-nav:not(.scrolled) a {
  color: rgba(255,255,255,0.9) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.rv-nav:not(.scrolled) a:hover {
  color: #BFA15F !important;
}

.rv-nav:not(.scrolled) button {
  color: rgba(255,255,255,0.85) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.rv-nav:not(.scrolled) button:hover {
  color: #BFA15F !important;
}

/* Logo: siempre blanco sobre el hero */
.rv-nav:not(.scrolled) .rv-monogram.block {
  display: none !important;
}

.rv-nav:not(.scrolled) .rv-monogram.hidden {
  display: block !important;
}

/* CTA sobre hero: contorno blanco */
.rv-nav:not(.scrolled) a[href*="contacto"].rounded-full {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.55) !important;
  color: #fff !important;
}

.rv-nav:not(.scrolled) a[href*="contacto"].rounded-full:hover {
  background: #BFA15F !important;
  border-color: #BFA15F !important;
  color: #0f172a !important;
  text-shadow: none;
}

/* ─── Estado SCROLLED: modo día ─────────────────────── */

.rv-nav.scrolled {
  background: rgba(255,255,255,0.97) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

.rv-nav.scrolled .site-logo span {
  color: #111827 !important;
  text-shadow: none;
}

.rv-nav.scrolled a {
  color: rgba(17,24,39,0.65) !important;
  text-shadow: none;
}

.rv-nav.scrolled a:hover {
  color: #BFA15F !important;
}

.rv-nav.scrolled button {
  color: #374151 !important;
  text-shadow: none;
}

.rv-nav.scrolled button:hover {
  color: #BFA15F !important;
}

/* Logo scrolled día: dark visible, white oculto */
.rv-nav.scrolled .rv-monogram.block {
  display: block !important;
}

.rv-nav.scrolled .rv-monogram.hidden {
  display: none !important;
}

/* CTA scrolled día: borde dorado */
.rv-nav.scrolled a[href*="contacto"].rounded-full {
  background: transparent !important;
  color: #9A7529 !important;
  border: 1px solid #9A7529 !important;
}

.rv-nav.scrolled a[href*="contacto"].rounded-full:hover {
  background: #BFA15F !important;
  color: #fff !important;
}

/* ─── Estado SCROLLED: modo noche ─────────────────────── */

.dark .rv-nav.scrolled {
  background: rgba(15,23,42,0.97) !important;
  border-bottom: 1px solid rgba(191,161,95,0.15) !important;
}

.dark .rv-nav.scrolled .site-logo span {
  color: #fff !important;
}

.dark .rv-nav.scrolled a {
  color: rgba(255,255,255,0.7) !important;
}

.dark .rv-nav.scrolled a:hover {
  color: #BFA15F !important;
}

.dark .rv-nav.scrolled button {
  color: rgba(255,255,255,0.65) !important;
}

/* Logo scrolled noche: white visible, dark oculto */
.dark .rv-nav.scrolled .rv-monogram.block {
  display: none !important;
}

.dark .rv-nav.scrolled .rv-monogram.hidden {
  display: block !important;
}

/* CTA scrolled noche: sólido blanco */
.dark .rv-nav.scrolled a[href*="contacto"].rounded-full {
  background: #fff !important;
  color: #0f172a !important;
  border: none !important;
}

.dark .rv-nav.scrolled a[href*="contacto"].rounded-full:hover {
  background: #BFA15F !important;
  color: #fff !important;
}

/* ─── Hover backgrounds transparentes sobre hero ────── */
.rv-nav:not(.scrolled) button:hover {
  background: rgba(255,255,255,0.1) !important;
}

.rv-nav.scrolled button:hover {
  background: rgba(0,0,0,0.05) !important;
}

.dark .rv-nav.scrolled button:hover {
  background: rgba(255,255,255,0.1) !important;
}

/* ─── Accesibilidad: oculto visualmente pero legible por lectores de pantalla ─── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
