/* Custom Styles for Publisher Website */

:root {
    --primary-color: #1c8d85;
    --secondary-color: #28C4B8;
    --accent-color: #FFB74D;
    --light-bg: #f8f9fa;
    --primary-hover: #28C4B8;
    --primary-dark: #25ADA2;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 500px;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Book Cards */
.book-card .card-img-top {
    transition: transform 0.3s ease;
}

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

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
}

/* Language Selector */
.dropdown-toggle::after {
    margin-left: 0.5em;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color) !important;
}

/* Responsive Images */
.img-fluid {
    border-radius: 10px;
}

/* Search Form */
.search-form .form-control {
    border-radius: 25px 0 0 25px;
}

.search-form .btn {
    border-radius: 0 25px 25px 0;
}

/* Pagination */
.pagination .page-link {
    border-radius: 50px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
}

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

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2em;
}

/* Alert Messages */
.alert {
    border-radius: 15px;
    border: none;
}

/* Form Controls */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

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

/* List Groups */
.list-group-item {
    border: none;
    border-radius: 10px !important;
    margin-bottom: 5px;
}

.list-group-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .card-columns {
        column-count: 1;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Book Detail Page */
.book-detail-image {
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Author Bio */
.author-bio {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

/* Category Pills */
.category-pill {
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    margin: 2px;
    transition: background 0.3s ease;
}

.category-pill:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
}

/* Price Display */
.price-display {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* Social Media Icons */
.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
    transition: transform 0.3s ease;
}

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

/* RTL (Right-to-Left) Support */
.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'UKIJ Tuz'
}

.rtl .navbar-nav {
    margin-left: 20px;
    margin-right: 20px;
    flex-direction: row;
}

.rtl .navbar-brand {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .dropdown-menu {
    left: auto;
    right: 0;
    text-align: right;
}

.rtl .dropdown-item {
    text-align: right;
    padding-right: 1rem;
    padding-left: 3rem;
}

.rtl .dropdown-toggle::after {
    margin-left: 0;
    margin-right: 0.255em;
    /* float: left; */
}

.rtl .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    float: left;
    padding-right: 0.5rem;
    padding-left: 0;
}

.rtl .card-body {
    text-align: right;
}

.rtl .btn {
    margin-left: 0.5rem;
    margin-right: 0;
}

.rtl .input-group .form-control {
    text-align: right;
}

.rtl .input-group .btn {
    margin-left: 0;
    margin-right: 0;
}

.rtl .pagination {
    flex-direction: row-reverse;
}

.rtl .form-control {
    text-align: right;
}

.rtl .search-form .form-control {
    border-radius: 0 25px 25px 0;
}

.rtl .search-form .btn {
    border-radius: 25px 0 0 25px;
}

.rtl .list-group-item {
    text-align: right;
}

.rtl .list-group-item.active {
    text-align: right;
}

.rtl .card-header {
    text-align: right;
}

.rtl .card-header h5 {
    text-align: right;
}

.rtl .alert {
    text-align: right;
}

.rtl .hero-section {
    text-align: right;
}

.rtl .hero-section h1,
.rtl .hero-section p {
    text-align: right;
}

/* RTL Navigation adjustments */
.rtl .navbar-nav .nav-link {
    padding-right: 0.5rem;
    padding-left: 1rem;
}

.rtl .navbar-toggler {
    margin-left: 0;
    margin-right: auto;
}

.rtl .navbar-nav {
    text-align: right;
}

.rtl .navbar-collapse {
    text-align: right;
}

/* RTL Dropdown adjustments */
.rtl .dropdown {
    text-align: right;
}

.rtl .dropdown-menu .dropdown-item.active {
    text-align: right;
}

/* RTL Footer adjustments */
.rtl footer .col-md-4 {
    text-align: right;
}

.rtl footer .list-unstyled {
    text-align: right;
}

/* RTL Book cards */
.rtl .book-card .card-title {
    text-align: right;
}

.rtl .book-card .card-text {
    text-align: right;
}

/* RTL Category pills */
.rtl .category-pill {
    margin-left: 2px;
    margin-right: 0;
}

/* RTL Price display */
.rtl .price-display {
    text-align: right;
}

/* RTL Author bio */
.rtl .author-bio {
    text-align: right;
}

/* RTL responsive adjustments */
@media (max-width: 768px) {
    .rtl .hero-section {
        text-align: right;
    }
}
