/* Estilos personalizados para CMS Webs Profesionales */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    --gradient-secondary: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* Tipografía */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

/* Utilidades */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-secondary {
    background: var(--gradient-secondary) !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-hover {
    transition: var(--transition);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-5px);
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Navegación */
.navbar {
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--warning-color) !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx=".5" cy=".5" r=".5"><stop offset="0%" stop-color="%23ffffff" stop-opacity=".1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
}

.hero-image {
    position: relative;
    z-index: 2;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Ajustes del botón "¿Te gusta la idea?" */
#cta-contact-chat {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* centrar el texto horizontalmente */
    text-align: center;      /* asegurar centrado del contenido */
    margin-top: 1.5rem; /* un poco más abajo */
    min-width: 280px;    /* más ancho */
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (max-width: 576px) {
    #cta-contact-chat {
        min-width: 100%; /* en móvil ocupa todo el ancho */
    }
    .cta-wrap { display: block; width: 100%; }
    #btn-miweb { width: 100%; display: block; }
}

/* Botón principal más ancho */
#btn-miweb {
    min-width: 320px;
}

/* Contenedor CTA (para otros usos) */
.cta-wrap { position: relative; display: inline-block; }

/* Botón WhatsApp fijo centro-derecha de la ventana */
.btn-whatsapp-fixed {
    position: fixed;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #128C48 0%, #0E7F39 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(18,140,72,.45);
    border: none;
    z-index: 1000;
    animation: whatsappFixedPulse 1.8s ease-in-out infinite;
}
.btn-whatsapp-fixed i { font-size: 1.7rem; }
.btn-whatsapp-fixed i { font-size: 2.1rem; }
.btn-whatsapp-fixed:hover {
    transform: translateY(-52%);
    box-shadow: 0 16px 34px rgba(18,140,72,.55);
}
@keyframes whatsappFixedPulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.08); }
    100% { transform: translateY(-50%) scale(1); }
}

@media (max-width: 768px) {
    .btn-whatsapp-fixed {
        top: auto; bottom: 64px; right: 16px;
        transform: none;
        width: 54px; height: 54px;
    }
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.feature-icon {
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Template Cards */
.template-card {
    overflow: hidden;
    transition: var(--transition);
}

.template-preview {
    position: relative;
    overflow: hidden;
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.template-card img {
    transition: var(--transition);
}

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

/* Profession Cards */
.profession-card {
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.profession-card:hover {
    border-color: var(--primary-color);
    background: var(--light-color);
}

.profession-icon {
    transition: var(--transition);
}

.profession-card:hover .profession-icon {
    transform: scale(1.2);
}

/* Botones */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: #000;
}

/* Formularios */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Admin Panel Styles */
.admin-sidebar {
    background: var(--gradient-primary);
    min-height: 100vh;
    box-shadow: var(--shadow-md);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    margin: 0.25rem 0;
    transition: var(--transition);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-header {
    background: white;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid #e9ecef;
}

.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.stats-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stats-card.success {
    border-left-color: var(--success-color);
}

.stats-card.warning {
    border-left-color: var(--warning-color);
}

.stats-card.info {
    border-left-color: var(--info-color);
}

/* Color Picker */
.color-picker-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: var(--dark-color);
}

.color-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

.color-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: var(--transition);
}

.color-option.selected::after {
    opacity: 1;
}

/* Template Preview */
.template-preview-container {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.template-preview-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc3545;
}

.preview-dot:nth-child(2) {
    background: #ffc107;
}

.preview-dot:nth-child(3) {
    background: #28a745;
}

.template-preview-content {
    height: 600px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 2rem;
    }
    
    .feature-card,
    .template-card,
    .profession-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Utilidades adicionales */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.bg-overlay {
    position: relative;
}

.bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.cta-wa-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .4s ease, transform .4s ease;
}
.cta-wa-inline.show {
    opacity: 1;
    transform: translateY(0);
}
.cta-wa-text {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}
.btn-whatsapp-fixed.in-cta {
    position: static;
    width: 44px;
    height: 44px;
    box-shadow: none;
    animation: none;
}

#waBannerHome { 
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .6s ease-out, transform .6s ease-out;
    width: 32%;
    margin: 0 auto;
    margin-top: 9rem;
    margin-bottom: 1rem;
    padding: .4rem .75rem;
}
#waBannerHome.show { 
    display: flex;
    opacity: 1;
    transform: translateY(0);
}
#waBannerHome .wa-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: .5rem .9rem; 
}
#waBannerHome .wa-btn i { 
    font-size: 1.3rem; 
    line-height: 1; 
    margin-right: .5rem; 
}

@media (max-width: 768px) {
    #waBannerHome {
        width: 90%;
    }
}

.bg-overlay > * {
    position: relative;
    z-index: 2;
}

.border-gradient {
    border: 2px solid;
    border-image: var(--gradient-primary) 1;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .admin-sidebar {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}
