/* ============================================
   ESTILOS PARA PÁGINAS PÚBLICAS
   Mejoras de diseño y UX
   ============================================ */

/* Page Header Mejorado */
.page-header {
    background: linear-gradient(135deg, #0010ef 0%, #3340f2 100%);
    color: white;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white !important;
    font-weight: 700;
    line-height: 1.2;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: white !important;
    background-clip: unset !important;
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    line-height: 1.6;
}

/* Secciones de Contenido */
.content-section {
    padding: 80px 0;
}

.content-section-alt {
    background: var(--light-bg);
    padding: 80px 0;
}

/* Cards Mejoradas */
.public-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.public-card:hover {
    box-shadow: 0 8px 24px rgba(0, 16, 239, 0.12);
    transform: translateY(-4px);
}

/* FAQ Mejorado */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 16, 239, 0.1);
}

.faq-question {
    padding: 24px;
    background: var(--light-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f0f0ff;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    flex: 1;
    font-weight: 600;
    line-height: 1.4;
}

.faq-question svg {
    flex-shrink: 0;
    margin-left: 15px;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
    padding: 24px;
}

.faq-item.active .faq-question {
    background: #f0f0ff;
}

.faq-answer-content {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1rem;
}

/* Sidebar de Categorías */
.category-sidebar {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 100px;
}

.category-sidebar h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 700;
}

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

.category-item {
    margin-bottom: 8px;
}

.category-link {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.category-link:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.category-link.active {
    background: #f0f0ff;
    color: var(--primary-color);
    font-weight: 600;
}

/* Blog Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    box-shadow: 0 8px 24px rgba(0, 16, 239, 0.12);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #0010ef 0%, #3340f2 100%);
}

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f0ff;
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Casos de Éxito */
.casos-grid {
    display: grid;
    gap: 40px;
}

.caso-exito-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.caso-exito-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 16, 239, 0.15);
    border-color: var(--primary-color);
}

.caso-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
}

.caso-empresa {
    font-size: 1.8rem;
    margin: 0 0 12px 0;
    color: var(--text-color);
    font-weight: 700;
}

.caso-sector {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f0ff;
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.caso-rating {
    font-size: 1.2rem;
    color: #f39c12;
    white-space: nowrap;
}

.caso-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.caso-detail h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
    font-weight: 600;
}

.caso-detail p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.caso-resultado {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

.caso-testimonio {
    padding: 25px;
    background: var(--light-bg);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.caso-testimonio-text {
    font-style: italic;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.caso-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.caso-author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0010ef 0%, #3340f2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.caso-author-info {
    flex: 1;
}

.caso-author-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.caso-author-role {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Valores Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.value-card {
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    text-align: left;
}

.value-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 16, 239, 0.1);
    transform: translateY(-4px);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.value-title {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-weight: 600;
}

.value-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Lista de Características */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    margin-bottom: 20px;
    padding-left: 40px;
    position: relative;
}

.feature-icon {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.feature-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Buscador Mejorado */
.search-box {
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 16, 239, 0.1);
}

.search-button {
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 16, 239, 0.3);
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination-link:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* CTA Section */
.cta-section {
    padding: 50px;
    background: linear-gradient(135deg, #0010ef 0%, #3340f2 100%);
    border-radius: 16px;
    text-align: center;
    color: white;
    margin-top: 60px;
}

.cta-title {
    font-size: 2rem;
    margin: 0 0 20px 0;
    color: white;
    font-weight: 700;
}

.cta-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.95;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button-primary {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.cta-button-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .content-section,
    .content-section-alt {
        padding: 40px 0;
    }
    
    .public-card {
        padding: 24px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .caso-details {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-button {
        width: 100%;
    }
    
    .cta-section {
        padding: 30px 20px;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-button-primary,
    .cta-button-secondary {
        width: 100%;
    }
}

