/**
 * Theme Name:     Divi Child
 * Author:         Elegant Themes
 * Template:       Divi
 * Text Domain:	   divi-child
 * Description:    Smart. Flexible. Beautiful. Divi is the most powerful theme in our collection.
 */

/* ========================================
   SIDEBAR OPTIMIZATION - LEGIBILIDAD
   ======================================== */

/* Sidebar general */
#sidebar {
    font-size: 15px;
    line-height: 1.6;
}

/* Títulos de widgets */
#sidebar h2,
#sidebar .widgettitle,
#sidebar .widget-title {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #6418c8;
}

/* Widgets - espaciado */
#sidebar .widget {
    margin-bottom: 35px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Listas del sidebar */
#sidebar ul {
    list-style: none;
    padding-left: 0;
}

#sidebar li {
    margin-bottom: 12px;
    padding-left: 15px;
    border-left: 3px solid #e5e5e5;
    transition: border-color 0.3s ease;
}

#sidebar li:hover {
    border-left-color: #6418c8;
}

/* Links del sidebar */
#sidebar a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

#sidebar a:hover {
    color: #6418c8;
}

/* Widget de Categorías - mostrar contador */
#sidebar .widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Newsletter widget - destacado */
#sidebar .newsletterwidgetminimal,
#sidebar .newsletterwidget {
    background: linear-gradient(135deg, #6418c8 0%, #8300e9 100%);
    color: #ffffff;
    padding: 25px 20px !important;
}

#sidebar .newsletterwidgetminimal h2,
#sidebar .newsletterwidget h2 {
    color: #ffffff !important;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

#sidebar .newsletterwidgetminimal input[type="email"],
#sidebar .newsletterwidget input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    margin-bottom: 10px;
}

#sidebar .newsletterwidgetminimal input[type="submit"],
#sidebar .newsletterwidget input[type="submit"] {
    width: 100%;
    padding: 12px 15px;
    background: #ffffff;
    color: #6418c8;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#sidebar .newsletterwidgetminimal input[type="submit"]:hover,
#sidebar .newsletterwidget input[type="submit"]:hover {
    transform: translateY(-2px);
}

/* Búsqueda del sidebar */
#sidebar .widget_search input[type="text"],
#sidebar .widget_search input[type="search"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
}

#sidebar .widget_search input[type="submit"] {
    margin-top: 10px;
    padding: 10px 20px;
    background: #6418c8;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

/* RESPONSIVE - MÓVILES */
@media (max-width: 768px) {
    #sidebar {
        font-size: 16px;
        line-height: 1.7;
    }
    
    #sidebar h2,
    #sidebar .widgettitle,
    #sidebar .widget-title {
        font-size: 20px;
    }
    
    #sidebar li {
        margin-bottom: 16px;
        padding: 12px 15px;
    }
    
    #sidebar a {
        padding: 8px 0;
        min-height: 44px; /* Área táctil Apple/Google */
        display: flex;
        align-items: center;
    }
    
    #sidebar .widget {
        padding: 15px;
        margin-bottom: 25px;
    }
}

/* Fix botón formulario BI */
.et_pb_contact_form_0 .et_pb_contact_submit {
    background-color: #e74c3c !important;
    color: #ffffff !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
    border: none !important;
    margin-top: 15px !important;
}

/* Fix GLOBAL para botones de formularios DIVI */
.et_pb_contact_form_container .et_pb_contact_submit.et_pb_button,
.et_pb_module .et_pb_contact_submit.et_pb_button,
button.et_pb_contact_submit.et_pb_button {
    background-color: #e74c3c !important;
    color: #ffffff !important;
    padding: 16px 30px !important;
    border-radius: 4px !important;
    border: none !important;
    margin-top: 20px !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
}

/* ========================================
   GLOBAL LINK COLORS - TURQUESA
   ======================================== */

/* Links en contenido general */
.et_pb_text_inner a,
.et_pb_blurb_description a,
.entry-content a,
.post-content a,
p a {
    color: #00d4aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.et_pb_text_inner a:hover,
.et_pb_blurb_description a:hover,
.entry-content a:hover,
.post-content a:hover,
p a:hover {
    color: #00b894;
    text-decoration: underline;
}

/* Links sobre fondo oscuro */
.et_pb_bg_layout_dark a,
.et_pb_text_inner.et_pb_bg_layout_dark a,
[class*="background_color_gradient"] a {
    color: #00d4aa;
}

.et_pb_bg_layout_dark a:hover,
.et_pb_text_inner.et_pb_bg_layout_dark a:hover {
    color: #5eead4;
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */

/* Variables de color */
:root {
    --whatsapp-green: #25d366;
    --whatsapp-hover: #128c7e;
}

/* Botón flotante principal */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background: var(--whatsapp-green);
    color: #ffffff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    background: var(--whatsapp-hover);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Tooltip al hacer hover */
.whatsapp-tooltip {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #ffffff;
    color: #333333;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.whatsapp-float:hover + .whatsapp-tooltip {
    opacity: 1;
}

/* Animación de pulso */
@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* RESPONSIVE - Móviles */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
    
    .whatsapp-tooltip {
        bottom: 85px;
        right: 20px;
        font-size: 0.85rem;
    }
}

/* Accesibilidad - Focus */
.whatsapp-float:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Print - Ocultar en impresión */
@media print {
    .whatsapp-float,
    .whatsapp-tooltip {
        display: none !important;
    }
}
