/* ============================================================
 * WesProSites Theme Styles
 * Sistema Automatizado de Generación de Sitios Web
 * ============================================================ */

/* ===== VARIABLES GLOBALES ===== */
:root {
    --wps-primary: #2563eb;
    --wps-primary-rgb: 37, 99, 235;
    --wps-primary-dark: #1d4ed8;
    --wps-primary-light: #dbeafe;
    --wps-font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --wps-transition: all 0.3s ease;
}

/* ===== RESET BASE ===== */
body {
    font-family: var(--wps-font-family);
    overflow-x: hidden;
}

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

/* ===== FORMULARIO FRONTEND ===== */
.wps-form-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.wps-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.wps-section-title {
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wps-section-title i {
    color: var(--wps-primary);
}

.wps-form .form-control:focus,
.wps-form .form-select:focus {
    border-color: var(--wps-primary);
    box-shadow: 0 0 0 3px rgba(var(--wps-primary-rgb), 0.15);
}

.wps-form .form-control-lg,
.wps-form .form-select-lg {
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.wps-form .input-group-text {
    border-radius: 10px;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

/* Color picker input */
input[type="color"].form-control-color {
    height: 48px;
    padding: 4px;
    cursor: pointer;
}

.color-hex {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* ===== FORM MESSAGE ===== */
.wps-form-message {
    display: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.wps-form-message.success {
    display: block;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.wps-form-message.error {
    display: block;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HERO SECTIONS ===== */
.wps-hero {
    position: relative;
}

.wps-hero-card {
    transition: var(--wps-transition);
}

.wps-hero-card:hover {
    transform: translateY(-5px);
}

/* ===== WHATSAPP FLOTANTE ===== */
.wps-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: var(--wps-transition);
    text-decoration: none;
}

.wps-whatsapp-float:hover {
    background: #20bd5a;
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* Segundo botón flotante (agencia) */
.wps-whatsapp-float-agencia {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--wps-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 16px rgba(var(--wps-primary-rgb), 0.4);
    z-index: 9998;
    transition: var(--wps-transition);
    text-decoration: none;
}

.wps-whatsapp-float-agencia:hover {
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 6px 24px rgba(var(--wps-primary-rgb), 0.5);
}

@media (max-width: 768px) {
    .wps-whatsapp-float-agencia {
        width: 44px;
        height: 44px;
        font-size: 18px;
        bottom: 80px;
        right: 14px;
    }
}

/* ===== DEMO NOTICE BAR ===== */
.wps-demo-notice {
    position: sticky;
    top: 0;
    z-index: 9998;
    font-size: 0.85rem;
}

.wps-demo-notice .btn-sm {
    font-size: 0.8rem;
}

/* ===== CARDS ===== */
.card {
    border-radius: 12px;
    transition: var(--wps-transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wps-form {
        padding: 1.5rem;
    }

    .wps-hero {
        min-height: 70vh !important;
    }

    .wps-hero h1 {
        font-size: 2rem !important;
    }

    .wps-form .row > [class*="col-"] {
        margin-bottom: 0.5rem;
    }

    .wps-whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 16px;
        right: 16px;
    }
}

/* ===== LOADING SPINNER ===== */
.wps-spinner {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ACCESIBILIDAD ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== BOTONES PERSONALIZADOS ===== */
.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: var(--wps-transition);
}

.btn-lg {
    padding: 0.75rem 1.75rem;
}

.btn:hover {
    transform: translateY(-1px);
}

/* ===== TABLAS (horarios) ===== */
.table-borderless td {
    padding: 0.5rem 0;
}

/* ===== UTILIDADES ADICIONALES ===== */
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.shadow {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.shadow-lg {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ===== BACKDROP BLUR ===== */
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ===== PADDING UTILITIES (bs5 extend) ===== */
.py-6 {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.px-6 {
    padding-left: 4.5rem;
    padding-right: 4.5rem;
}

/* ===== MIN HEIGHT UTILITIES ===== */
.min-vh-80 {
    min-height: 80vh;
}

/* ===== TRANSICIONES ===== */
[data-aos] {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== CARDS ===== */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem !important;
    overflow: hidden;
}

.card:hover:not(:has(a:hover,button:hover)) {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15) !important;
}

.card .card-img-top {
    transition: transform 0.4s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card .badge.rounded-pill {
    font-weight: 500;
}

/* ===== SECCIÓN TESTIMONIOS ===== */
.bg-white.bg-opacity-10 {
    transition: background 0.3s ease;
}

.bg-white.bg-opacity-10:hover {
    background: rgba(255,255,255,0.18) !important;
}

/* ===== BADGES ===== */
.badge.rounded-pill {
    font-weight: 500;
}

/* ===== OPCACITY ===== */
.opacity-5 {
    opacity: 0.05;
}

.opacity-10 {
    opacity: 0.10;
}

.opacity-20 {
    opacity: 0.20;
}

/* ===== RESPONSIVE ===== */

/* Tablets (≤768px) */
@media (max-width: 768px) {
    .py-6 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .min-vh-80 {
        min-height: auto;
    }
    .wps-hero {
        min-height: auto !important;
        padding: 4rem 0;
    }
    .display-3 {
        font-size: 2.2rem;
    }
    .display-4 {
        font-size: 1.8rem;
    }
    .display-6 {
        font-size: 1.5rem;
    }
    .card-img-top {
        height: 160px !important;
    }
    .wps-hero .card-flotante {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 0;
    }
}

/* Móviles pequeños (≤576px) */
@media (max-width: 576px) {
    .py-6 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    .wps-hero {
        padding: 3rem 0;
        min-height: auto !important;
    }
    .display-3 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    .display-4 {
        font-size: 1.6rem;
    }
    .display-6 {
        font-size: 1.35rem;
    }
    .lead {
        font-size: 0.95rem !important;
    }
    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .badge.fs-6 {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.8rem !important;
    }
    .card-body {
        padding: 1.25rem !important;
    }
    .card-img-top {
        height: 140px !important;
    }
    .card .p-4 {
        padding: 1rem !important;
    }
    .card .p-5 {
        padding: 1.5rem !important;
    }
    /* Hero image floating card */
    .wps-hero .translate-middle-x {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        margin-top: -2rem;
    }
    /* Product cards ecommerce */
    .card .rounded-4 .position-relative[style*="height: 240px"] {
        height: 180px !important;
    }
    /* Sección de horarios */
    .card .row.g-0 .p-5 {
        padding: 1.5rem !important;
    }
    /* Galería */
    .col-6.col-md-4 img {
        height: 140px !important;
    }
    /* Testimonios */
    .bg-opacity-10.backdrop-blur {
        padding: 1.25rem !important;
    }
    /* Categorías visuales */
    .col-6.col-md-3 .rounded-4 {
        height: 120px !important;
    }
    /* WhatsApp flotante */
    .wps-whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    .wps-whatsapp-float-sec {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.2rem !important;
        bottom: 80px !important;
        right: 20px !important;
    }
    /* Página demos */
    .demos-archive .card-body {
        padding: 1rem !important;
    }
}

/* ===== NAVEGACION PRINCIPAL (Tu Presencia Web) ===== */
.wps-nav-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: #0F172A;
}
.wps-nav-brand span {
    color: #2F6FED;
}

/* ===== PIE DE PAGINA (Tu Presencia Web) ===== */
.wps-footer {
    background: #0F172A;
    color: rgba(255,255,255,.7);
    padding: 2rem 0;
    margin-top: 3rem;
}
.wps-footer a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
}
.wps-footer a:hover {
    color: #fff;
}

/* Móviles muy pequeños (≤400px) */
@media (max-width: 400px) {
    .wps-hero {
        padding: 2rem 0;
    }
    .display-3 {
        font-size: 1.5rem;
    }
    .d-flex.gap-3 {
        gap: 0.5rem !important;
    }
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    .row.g-4 {
        --bs-gutter-y: 1rem;
    }
}
