/* ============================================
   RCAD MAIN CSS - Estilos adicionales
   ============================================ */

/* ============================================
   MODAL DE LOGIN - TABS FUNCIONALES + MENSAJES
   ============================================ */
/* Ocultar tab Recuperar (pero mantener funcionalidad) */
.rcad-login-modal-tab[data-tab="recover"] {
    display: none !important;
}

.rcad-login-modal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
}

.rcad-login-modal-tab {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.rcad-login-modal-tab .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.rcad-login-modal-tab:hover {
    color: #1976d2;
    background: #f8f9fa;
}

.rcad-login-modal-tab.active {
    color: #1976d2;
    background: transparent;
}

.rcad-login-modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1976d2 0%, #64b5f6 100%);
    border-radius: 3px 3px 0 0;
}

.rcad-login-modal-content-tab {
    display: none;
    animation: fadeIn 0.3s;
}

.rcad-login-modal-content-tab.active {
    display: block;
}

.rcad-login-modal-content-tab h3 {
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
}

/* Mensajes de error/éxito */
.rcad-modal-message {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

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

.rcad-modal-message .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.rcad-modal-message-error {
    background: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
}

.rcad-modal-message-error .dashicons {
    color: #ef5350;
}

.rcad-modal-message-success {
    background: #e8f5e9;
    border: 1px solid #66bb6a;
    color: #2e7d32;
}

.rcad-modal-message-success .dashicons {
    color: #66bb6a;
}

/* Form groups */
.rcad-form-group {
    margin-bottom: 18px;
}

.rcad-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.rcad-form-group label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #666;
}

.rcad-form-group input[type="text"],
.rcad-form-group input[type="email"],
.rcad-form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.rcad-form-group input:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.rcad-form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

/* Remember me */
.rcad-remember-me label {
    font-weight: 400;
    font-size: 13px;
    gap: 6px;
}

.rcad-remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Botones */
.rcad-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.rcad-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.rcad-btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(25, 118, 210, 0.3);
}

.rcad-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    box-shadow: 0 5px 12px rgba(25, 118, 210, 0.4);
    transform: translateY(-1px);
}

.rcad-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.rcad-btn-success {
    background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(67, 160, 71, 0.3);
}

.rcad-btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    box-shadow: 0 5px 12px rgba(67, 160, 71, 0.4);
    transform: translateY(-1px);
}

/* Footer links */
.rcad-form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

.rcad-form-footer a,
.rcad-switch-tab {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.rcad-form-footer a:hover,
.rcad-switch-tab:hover {
    color: #0d47a1;
    text-decoration: underline;
    cursor: pointer;
}

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

/* ============================================
   PANEL DE USUARIO PREMIUM (bbPress Profile)
   ============================================ */
   
/* Contenedor general del perfil */
#bbpress-forums .bbp-user-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}

/* Fieldsets con mejor diseño */
#bbpress-forums fieldset.bbp-form {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

#bbpress-forums fieldset legend {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding: 0 16px;
    background: #fff;
    border-radius: 4px;
}

/* Párrafos y campos */
#bbpress-forums fieldset.bbp-form p {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: center;
}

#bbpress-forums fieldset.bbp-form label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin: 0;
}

/* Inputs y textareas con diseño moderno */
#bbpress-forums fieldset.bbp-form input[type="text"],
#bbpress-forums fieldset.bbp-form input[type="email"],
#bbpress-forums fieldset.bbp-form input[type="url"],
#bbpress-forums fieldset.bbp-form input[type="password"],
#bbpress-forums fieldset.bbp-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fafafa;
}

#bbpress-forums fieldset.bbp-form input:focus,
#bbpress-forums fieldset.bbp-form textarea:focus {
    outline: none;
    border-color: #7ED321;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(126, 211, 33, 0.1);
}

/* Textareas más grandes */
#bbpress-forums fieldset.bbp-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Campos de redes sociales en línea y compactos */
#bbpress-forums fieldset.bbp-form p label[for*="url"] {
    font-size: 13px;
    color: #666;
}

#bbpress-forums fieldset.bbp-form p:has(label[for*="url"]) {
    grid-template-columns: 160px 1fr;
    gap: 12px;
    margin-bottom: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Sección "Web" más compacta */
#bbpress-forums fieldset legend:contains("Web"),
#bbpress-forums fieldset:has(legend:contains("Web")) p {
    margin-bottom: 12px;
}

/* Botones con mejor diseño */
#bbpress-forums fieldset.bbp-form button[type="submit"],
#bbpress-forums fieldset.bbp-form input[type="submit"] {
    background: linear-gradient(135deg, #7ED321 0%, #6bc91a 100%);
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(126, 211, 33, 0.3);
}

#bbpress-forums fieldset.bbp-form button[type="submit"]:hover,
#bbpress-forums fieldset.bbp-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(126, 211, 33, 0.4);
    background: linear-gradient(135deg, #6bc91a 0%, #5ab010 100%);
}

/* Información adicional más sutil */
#bbpress-forums fieldset.bbp-form p em,
#bbpress-forums fieldset.bbp-form p small {
    font-size: 12px;
    color: #999;
    font-style: normal;
    display: block;
    margin-top: 6px;
    grid-column: 2;
}

/* Avatar section */
#bbpress-forums .bbp-user-avatar {
    text-align: center;
    margin-bottom: 24px;
}

#bbpress-forums .bbp-user-avatar img {
    border-radius: 50%;
    border: 4px solid #7ED321;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Responsive */
@media screen and (max-width: 782px) {
    #bbpress-forums fieldset.bbp-form p {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    #bbpress-forums fieldset.bbp-form p label {
        font-weight: 600;
    }
}
    display: block;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
    font-size: 14px;
}

#bbpress-forums fieldset.bbp-form input[type="text"],
#bbpress-forums fieldset.bbp-form input[type="email"],
#bbpress-forums fieldset.bbp-form input[type="url"],
#bbpress-forums fieldset.bbp-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

#bbpress-forums fieldset.bbp-form input[type="text"]:focus,
#bbpress-forums fieldset.bbp-form input[type="email"]:focus,
#bbpress-forums fieldset.bbp-form input[type="url"]:focus,
#bbpress-forums fieldset.bbp-form textarea:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* URLs de redes sociales en línea */
#bbpress-forums fieldset.bbp-form .user-contact-method {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

#bbpress-forums fieldset.bbp-form .user-contact-method p {
    margin-bottom: 0;
}

/* Botón actualizar perfil */
#bbpress-forums input[type="submit"],
#bbpress-forums button[type="submit"] {
    background: #0066cc !important;
    color: #fff !important;
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#bbpress-forums input[type="submit"]:hover,
#bbpress-forums button[type="submit"]:hover {
    background: #0052a3 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* Avatar en perfil */
#bbpress-forums .bbp-user-avatar {
    border: 3px solid #7ED321;
    border-radius: 50%;
    padding: 4px;
    background: #fff;
}

/* Header Mejorado - MÁS VISIBLE */
.site-header {
    position: sticky !important;
    top: 0;
    z-index: 999;
    background-color: #ffffff !important;
    border-bottom: 3px solid var(--rcad-primary, #0066cc) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
}

.site-header .primary-menu a {
    transition: color 0.3s ease;
    font-weight: 500;
}

.site-header .primary-menu a:hover {
    color: var(--rcad-primary, #0066cc) !important;
    text-decoration: underline;
}

/* Mobile Menu */
.mobile-menu {
    background-color: #ffffff;
}

.mobile-menu a {
    color: var(--rcad-text);
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--rcad-primary);
}

/* Botones Orbital mejorados */
.btn-primary,
.button-primary,
input[type="submit"],
button[type="submit"] {
    background-color: var(--rcad-button-bg) !important;
    color: var(--rcad-button-text) !important;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.button-primary:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Enlaces */
a {
    color: var(--rcad-link);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--rcad-link-hover);
}

/* Sidebar Mejorado */
.widget {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.widget-title {
    color: var(--rcad-secondary);
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rcad-primary);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--rcad-text);
    text-decoration: none;
}

.widget a:hover {
    color: var(--rcad-primary);
}

/* Contenedor de Anuncios (general) */
.advertisement-area {
    margin: 24px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
}

/* Mejoras para Posts */
.entry-content {
    line-height: 1.8;
    font-size: 17px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--rcad-secondary);
    margin-top: 30px;
    margin-bottom: 16px;
}

.entry-content h2 {
    font-size: 28px;
}

.entry-content h3 {
    font-size: 24px;
}

.entry-content h4 {
    font-size: 20px;
}

/* Breadcrumbs mejorados */
.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--rcad-link);
}

.breadcrumb a:hover {
    color: var(--rcad-link-hover);
}

/* Paginación mejorada */
.pagination a,
.pagination span {
    color: var(--rcad-text);
    border-color: var(--rcad-primary);
}

.pagination .current,
.pagination a:hover {
    background-color: var(--rcad-primary) !important;
    color: #ffffff !important;
}

/* Comentarios mejorados */
.comment-list {
    margin-top: 30px;
}

.comment {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 20px;
}

.comment-reply-link {
    color: var(--rcad-link);
}

.comment-reply-link:hover {
    color: var(--rcad-link-hover);
}

/* Footer mejorado */
.site-footer {
    background-color: var(--rcad-secondary);
    color: #ffffff;
}

.site-footer a {
    color: #ffffff;
}

.site-footer a:hover {
    color: var(--rcad-primary);
}

/* Responsive mejoras */
@media (max-width: 768px) {
    .entry-content {
        font-size: 16px;
    }
    
    .entry-content h2 {
        font-size: 24px;
    }
    
    .entry-content h3 {
        font-size: 20px;
    }
    
    .entry-content h4 {
        font-size: 18px;
    }
}

/* Corrección CRÍTICA de lupa de búsqueda - MUY ESPECÍFICO */
.widget_search,
.sidebar .widget_search {
    margin-bottom: 30px;
}

.widget_search form,
.sidebar .widget_search form,
.widget_search .search-form,
.sidebar .search-form {
    display: flex !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    align-items: stretch !important;
    height: 45px !important;
    max-height: 45px !important;
}

.widget_search input[type="search"],
.widget_search input[type="text"],
.sidebar .widget_search input[type="search"],
.sidebar .search-form input[type="search"],
.sidebar .search-form input[type="text"] {
    flex: 1 !important;
    border: none !important;
    padding: 10px 15px !important;
    font-size: 14px !important;
    height: 43px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.widget_search button[type="submit"],
.widget_search .search-submit,
.sidebar .widget_search button[type="submit"],
.sidebar .search-form button[type="submit"],
.sidebar .search-form .search-submit,
form.search-form button[type="submit"] {
    width: 45px !important;
    height: 43px !important;
    min-width: 45px !important;
    max-width: 45px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    background-color: var(--rcad-primary, #0066cc) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

.widget_search button[type="submit"]:hover,
.sidebar .search-form button[type="submit"]:hover {
    opacity: 0.9 !important;
}

/* Ocultar iconos gigantes */
.widget_search .search-box-icon,
.sidebar .search-box-icon {
    font-size: 16px !important;
    width: auto !important;
    height: auto !important;
}

.widget_search .screen-reader-text {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ============================================
   TABLAS PROFESIONALES
   ============================================ */

/* Contenedor de tabla con sombra */
.entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-size: 15px;
}

/* Encabezados de tabla */
.entry-content table thead th,
.entry-content table th {
    background: linear-gradient(135deg, #5085a5 0%, #4a7a95 100%);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 18px 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

/* Primera columna del header */
.entry-content table thead th:first-child,
.entry-content table th:first-child {
    border-top-left-radius: 12px;
}

/* Última columna del header */
.entry-content table thead th:last-child,
.entry-content table th:last-child {
    border-top-right-radius: 12px;
}

/* Celdas del cuerpo */
.entry-content table tbody td,
.entry-content table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    color: #333333;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

/* Primera columna con estilo especial */
.entry-content table tbody td:first-child,
.entry-content table td:first-child {
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
}

/* Filas alternas */
.entry-content table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* Hover en filas */
.entry-content table tbody tr:hover {
    background: #f0f7ff;
}

.entry-content table tbody tr:hover td:first-child {
    background: #e8f4ff;
}

/* Última fila sin borde */
.entry-content table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive - Tablas en móvil */
@media (max-width: 768px) {
    .entry-content table {
        font-size: 13px;
        border-radius: 8px;
    }
    
    .entry-content table thead th,
    .entry-content table th {
        padding: 14px 12px;
        font-size: 12px;
    }
    
    .entry-content table tbody td,
    .entry-content table td {
        padding: 12px;
    }
}

/* Tablas responsivas - scroll horizontal en móvil */
@media (max-width: 600px) {
    .entry-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* Variante: Tabla con borde */
.entry-content table.bordered {
    border: 2px solid #e0e0e0;
}

.entry-content table.bordered td,
.entry-content table.bordered th {
    border-right: 1px solid #e8e8e8;
}

.entry-content table.bordered td:last-child,
.entry-content table.bordered th:last-child {
    border-right: none;
}

/* Variante: Tabla compacta */
.entry-content table.compact td,
.entry-content table.compact th {
    padding: 10px 14px;
}

/* Variante: Tabla con rayas (striped) */
.entry-content table.striped tbody tr:nth-child(odd) {
    background: #ffffff;
}

.entry-content table.striped tbody tr:nth-child(even) {
    background: #f8f9fa;
}
