/* public/assets/front/publishing.css */

/* ===================================
   Publishing System - Enhanced Design
   Colors: #79499c, #784e9a, #584b75, #898e97
   =================================== */

:root {
    --primary: #79499c;
    --primary-dark: #784e9a;
    --accent-gray: #898e97;
    --dark-purple: #584b75;
    --light-bg: #f8f7fa;
    --card-bg: rgba(255, 255, 255, 0.98);
    --shadow-sm: 0 4px 15px rgba(121, 73, 156, 0.08);
    --shadow-md: 0 12px 30px rgba(121, 73, 156, 0.15);
    --shadow-lg: 0 20px 50px rgba(121, 73, 156, 0.2);
    --shadow-hover: 0 16px 40px rgba(121, 73, 156, 0.18);
    --transition: all 0.3s ease;
    --border-radius: 16px;
}

/* ===== Main Section ===== */
.publishing-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--light-bg) 0%, #f2f0f5 100%);
    min-height: 80vh;
}

/* ===== Hero Section ===== */
.publishing-hero {
    background: linear-gradient(135deg, rgba(121, 73, 156, 0.05), rgba(120, 78, 154, 0.03));
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

.hero-content h1 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
}

.hero-stats {
    margin-top: 2rem;
}

.hero-stats .stat-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.hero-stats .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--accent-gray);
    font-size: 0.9rem;
}

.hero-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-wrapper img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.floating-books {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-book {
    position: absolute;
    color: var(--primary);
    font-size: 2.5rem;
    opacity: 0.3;
    animation: floatBook 6s ease-in-out infinite;
}

.floating-book.book-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-book.book-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-book.book-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes floatBook {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-purple);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Search and Filters Section - IMPROVED ===== */
.search-filters-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid rgba(121, 73, 156, 0.1);
}

.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-container i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gray);
    z-index: 1;
}

#publisherSearch {
    padding: 1rem 3rem 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid rgba(121, 73, 156, 0.2);
    background: white;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    width: 100%;
    direction: rtl;
}

#publisherSearch:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(121, 73, 156, 0.15);
    outline: none;
}

/* Sort and Filter Buttons */
.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 1px solid rgba(121, 73, 156, 0.1);
}

.sort-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sort-container .btn-group {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sort-container .btn {
    border-radius: 8px !important;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid rgba(121, 73, 156, 0.2);
}

.sort-container .btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
}

.sort-container .btn:not(.active):hover {
    background: rgba(121, 73, 156, 0.1);
    border-color: var(--primary);
}

.filter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-badge {
    padding: 0.4rem 1rem;
    background: rgba(121, 73, 156, 0.08);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--dark-purple);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-badge:hover {
    background: rgba(121, 73, 156, 0.15);
}

.filter-badge.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

/* Search Counter */
#searchCounter {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(121, 73, 156, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--dark-purple);
    margin-top: 0.5rem;
}

/* ===== Publisher Cards ===== */
.publisher-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    height: 100%;
    margin-bottom: 1.5rem;
}

.publisher-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b4513;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.publisher-logo-wrapper {
    padding: 2.5rem 1rem 1rem;
    background: linear-gradient(135deg, rgba(121, 73, 156, 0.1), rgba(120, 78, 154, 0.05));
    text-align: center;
}

.logo-container {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    border-radius: 50%;
    padding: 1rem;
    background: white;
    box-shadow: var(--shadow-md);
    border: 3px solid white;
    transition: var(--transition);
}

.publisher-card:hover .logo-container {
    transform: scale(1.05);
}

.publisher-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.publisher-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-purple);
    text-align: center;
    margin-bottom: 1rem;
}

.publisher-name a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.publisher-name a:hover {
    color: var(--primary);
}

.publisher-description {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 1.5rem;
    height: 80px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.publisher-info {
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--accent-gray);
    font-size: 0.9rem;
}

.info-item i {
    color: var(--primary);
    width: 20px;
}

.publisher-stats {
    margin-bottom: 1.5rem;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(121, 73, 156, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    color: var(--dark-purple);
    font-weight: 600;
}

.publisher-card .card-footer {
    background: transparent;
    border-top: 1px solid rgba(121, 73, 156, 0.1);
    padding: 1.5rem;
}

.publisher-card .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.publisher-card .btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.publisher-card .btn-outline-secondary {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: var(--accent-gray);
    color: var(--accent-gray);
    transition: var(--transition);
    flex-shrink: 0;
}

.publisher-card .btn-outline-secondary:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* ===== Call to Action ===== */
.publishing-cta {
    margin-top: 4rem;
}

.cta-card {
    background: linear-gradient(135deg, rgba(121, 73, 156, 0.1), rgba(120, 78, 154, 0.05));
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.cta-icon {
    color: var(--primary);
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-purple);
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    min-width: 200px;
}

.cta-buttons .btn-success:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.cta-buttons .btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    min-width: 200px;
}

.cta-buttons .btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* ===== Modals ===== */
#publisherDetailModal .modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

#publisherDetailModal .modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.5rem 2rem;
}

#publisherDetailModal .modal-title {
    font-weight: 700;
}

#publisherDetailModal .btn-close {
    filter: invert(1);
    margin: 0;
}

.detail-logo-container {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    padding: 1.5rem;
    background: white;
    box-shadow: var(--shadow-md);
    border: 5px solid white;
}

.detail-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.info-box {
    text-align: center;
    padding: 1rem;
    background: rgba(121, 73, 156, 0.05);
    border-radius: 12px;
    transition: var(--transition);
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.info-box h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-purple);
    margin: 0.5rem 0;
}

/* ===== Coming Soon Modal - IMPROVED ===== */
#comingSoonModal .modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

#comingSoonModal .modal-header {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.5rem;
    border-bottom: none;
}

#comingSoonModal .modal-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#comingSoonModal .modal-body {
    padding: 2rem;
}


@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* Features list */
.features-list {
    text-align: right;
    margin-top: 2rem;
}

.features-list h6 {
    color: var(--dark-purple);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(121, 73, 156, 0.1);
}

.features-list ul {
    padding-right: 1rem;
}

.features-list li {
    margin-bottom: 0.75rem;
    color: var(--accent-gray);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.features-list li i {
    font-size: 0.9rem;
}

.features-list li i.fa-check-circle {
    color: #28a745;
}

.features-list li i.fa-clock {
    color: #ffc107;
}

/* ===== Empty State ===== */
.empty-state {
    padding: 3rem;
    text-align: center;
}

.empty-state i {
    opacity: 0.5;
}

/* ===== Responsive Design - IMPROVED ===== */
@media (max-width: 1200px) {
    .publisher-card-col {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 992px) {
    .publishing-hero {
        padding: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .publisher-card-col {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .logo-container {
        width: 120px;
        height: 120px;
    }
    
    .publisher-description {
        height: 72px;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 768px) {
    .publishing-section {
        padding: 1rem 0;
    }
    
    .publishing-hero {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-stats .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .image-wrapper img {
        height: 250px;
    }
    
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-filters-container {
        padding: 1rem;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .sort-container {
        justify-content: center;
    }
    
    .filter-badges {
        justify-content: center;
    }
    
    .publisher-card-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .publisher-card {
        margin-bottom: 1rem;
    }
    
    .logo-container {
        width: 100px;
        height: 100px;
    }
    
    .publisher-name {
        font-size: 1.1rem;
    }
    
    .publisher-description {
        font-size: 0.9rem;
        height: 60px;
        -webkit-line-clamp: 2;
    }
    
    .publisher-card .card-footer {
        padding: 1rem;
    }
    
    .publisher-card .btn-primary {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .cta-card {
        padding: 1.5rem 1rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
        min-width: auto;
    }
    
    /* Modal Responsive */
    #publisherDetailModal .modal-dialog {
        margin: 0.5rem;
    }
    
    #publisherDetailModal .modal-body {
        padding: 1rem;
    }
    
    .detail-logo-container {
        width: 150px;
        height: 150px;
    }
    
    #comingSoonModal .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-stats .row {
        gap: 1rem;
    }
    
    .hero-stats .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .stat-card {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .floating-book {
        font-size: 1.5rem;
    }
    
    .search-container i {
        right: 15px;
    }
    
    #publisherSearch {
        padding: 0.75rem 2.5rem 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .sort-container .btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.75rem;
    }
    
    .filter-badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.75rem;
    }
    
    .info-box h5 {
        font-size: 1.2rem;
    }
    
    .features-list li {
        font-size: 0.9rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .publisher-card:hover {
        transform: none;
    }
    
    .publisher-card:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active,
    .btn-success:active,
    .btn-outline-primary:active {
        transform: scale(0.95);
    }
    
    .hero-stats .stat-card:hover {
        transform: none;
    }
    
    .info-box:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary: #5a2d7d;
        --primary-dark: #4a1d6d;
        --accent-gray: #666666;
        --dark-purple: #3a1d5a;
    }
    
    .publisher-card {
        border: 2px solid var(--primary);
    }
    
    .search-filters-container {
        border: 2px solid var(--primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-book {
        animation: none !important;
    }
}