/* 
 * Shaheed Muntazari Library - Public Website Styles
 * Professional Red/Black Theme based on logo
 */

/* Base Reset & Variables */
:root {
    /* Primary colors from logo - Red/Black/White */
    --primary: #c41e3a;
    /* Deep red from logo */
    --primary-dark: #a01830;
    /* Darker red */
    --primary-light: #e85d5d;
    /* Lighter red */
    --secondary: #1a1a1a;
    /* Near black */
    --secondary-light: #333333;
    /* Dark gray */

    /* Neutral colors */
    --success: #22c55e;
    --danger: #dc2626;
    --warning: #f59e0b;
    --light: #fafafa;
    --dark: #1a1a1a;

    /* Gray scale */
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;

    /* Design tokens */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.rtl .book-card,
body.rtl .member-card {
    text-align: right;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--primary);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.logo-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.logo-text {
    display: block;
}

@media (max-width: 640px) {
    .logo-text {
        display: none;
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    background: var(--gray-200);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 50;
    min-width: 120px;
}

body.rtl .lang-dropdown {
    right: auto;
    left: 0;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: var(--transition);
}

.lang-option:hover {
    background: var(--gray-100);
}

.lang-option.active {
    background: var(--primary);
    color: white;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

.mobile-nav {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav.show {
    display: flex;
}

.mobile-nav .nav-link {
    display: block;
    text-align: center;
}

.mobile-lang {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 0.5rem;
}

.mobile-lang a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
}

.mobile-lang a.active {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.hero p {
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

@media (max-width: 640px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }
}

.search-hero {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

.search-hero h1 {
    color: var(--primary);
}

/* Filters */
.filters {
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

@media (max-width: 640px) {
    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }
}

.search-input,
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.15);
}

.search-input-lg {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-lg {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Book Grid */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--secondary);
}

.book-count {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Tablet breakpoint */
@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Mobile breakpoint */
@media (max-width: 640px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

.book-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Disable hover effects on touch devices */
@media (hover: none) {
    .book-card:hover {
        transform: none;
    }
}

.book-card-link {
    display: block;
}

.book-image {
    position: relative;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tablet */
@media (max-width: 768px) {
    .book-image {
        aspect-ratio: 2 / 3;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .book-image {
        aspect-ratio: 2 / 3;
    }
}

.book-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2px 4px 4px 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (hover: none) {
    .book-card:hover .book-image img {
        transform: none;
    }
}

.book-image .badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
}

@media (max-width: 640px) {
    .book-image .badge {
        top: 0.35rem;
        right: 0.35rem;
        font-size: 0.55rem;
        padding: 0.15rem 0.35rem;
    }
}

body.rtl .book-image .badge {
    right: auto;
    left: 0.5rem;
}

@media (max-width: 640px) {
    body.rtl .book-image .badge {
        left: 0.35rem;
    }
}

.book-info {
    padding: 0.875rem;
}

@media (max-width: 640px) {
    .book-info {
        padding: 0.625rem;
    }
}

@media (max-width: 380px) {
    .book-info {
        padding: 0.5rem;
    }
}

.book-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--gray-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.book-author,
.book-translator {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
}

.book-category,
.book-lang {
    background: var(--gray-100);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--gray-600);
}

.book-price {
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

/* Book Detail */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
}

.book-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .book-detail-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* Image Slider */
.book-gallery {
    position: relative;
}

.image-slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-100);
}

.slider-container {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-200) 100%);
}

/* Limit gallery size on responsive views so it doesn't take fill screen height */
@media (max-width: 768px) {
    .book-gallery {
        max-width: 320px;
        margin: 0 auto;
    }
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

/* RTL: Keep slider in LTR mode for proper sliding */
body.rtl .slider-track {
    direction: ltr;
}

.slider-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    flex-grow: 0;
}

.slider-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: auto;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: white;
    box-shadow: var(--shadow);
}

.slider-btn.prev {
    left: 0.5rem;
}

.slider-btn.next {
    right: 0.5rem;
}

body.rtl .slider-btn.prev {
    left: auto;
    right: 0.5rem;
}

body.rtl .slider-btn.next {
    right: auto;
    left: 0.5rem;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

.main-image {
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-200) 100%);
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2px 4px 4px 2px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.main-image.no-image {
    color: var(--gray-400);
}

.thumbnail-list {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    width: 60px;
    height: 75px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: none;
    padding: 0;
    transition: var(--transition);
    flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.book-header .book-title {
    font-size: 1.5rem;
    -webkit-line-clamp: unset;
}

@media (max-width: 640px) {
    .book-header .book-title {
        font-size: 1.25rem;
    }
}

.book-meta-details {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.meta-row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    min-width: 100px;
    font-weight: 600;
    color: var(--gray-600);
}

.meta-value {
    flex: 1;
}

.book-price-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.price-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.book-description {
    margin-bottom: 1.5rem;
}

.book-description h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.book-description p {
    color: var(--gray-600);
}

.contact-cta {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.contact-cta h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.contact-cta p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.visit-info {
    margin-top: 1rem;
    font-size: 0.875rem;
}

.back-btn {
    margin-top: 2rem;
}

/* Search Section */
.search-section {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-form {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .search-input-wrapper {
        flex-direction: column;
    }
}

.search-input-wrapper .search-input {
    flex: 1;
}

.search-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    text-align: center;
}

/* Member List */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.member-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    gap: 1rem;
}

.member-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
    border-left: 3px solid var(--primary);
}

body.rtl .member-card:hover {
    transform: translateX(-4px);
    border-left: none;
    border-right: 3px solid var(--primary);
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-sno {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.member-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.member-father {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Member Detail */
.member-detail-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (max-width: 640px) {
    .member-detail-card {
        padding: 1rem;
    }
}

.member-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
}

@media (max-width: 640px) {
    .member-header {
        flex-direction: column;
        text-align: center;
    }
}

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid var(--primary);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-size: 3rem;
}

.member-title h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--secondary);
}

.member-sno-lg {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.member-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

body.rtl .detail-item {
    border-left: none;
    border-right: 3px solid var(--primary);
}

.detail-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

/* History Timeline */
.history-section h3 {
    margin-bottom: 1rem;
    color: var(--secondary);
}

.history-timeline {
    position: relative;
    padding-left: 2rem;
}

body.rtl .history-timeline {
    padding-left: 0;
    padding-right: 2rem;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

body.rtl .history-timeline::before {
    left: auto;
    right: 0.75rem;
}

.history-item {
    position: relative;
    padding: 1rem;
    padding-left: 2rem;
    margin-bottom: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

body.rtl .history-item {
    padding-left: 1rem;
    padding-right: 2rem;
}

.history-icon {
    position: absolute;
    left: -1.5rem;
    top: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

body.rtl .history-icon {
    left: auto;
    right: -1.5rem;
}

.history-initial .history-icon {
    border-color: var(--primary);
}

.history-extension .history-icon {
    border-color: var(--warning);
}

.history-renewal .history-icon {
    border-color: var(--success);
}

.history-upcoming .history-icon {
    border-color: var(--primary);
    background: var(--primary);
}

.history-expired .history-icon {
    border-color: var(--danger);
    background: var(--danger);
}

.history-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-type {
    font-weight: 600;
}

.history-date {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.history-detail {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Renewal CTA */
.renewal-cta {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
}

.renewal-cta h3 {
    color: var(--danger);
    margin-bottom: 0.5rem;
}

.renewal-cta.warning {
    background: #fefce8;
    border-color: #fef08a;
}

.renewal-cta.warning h3 {
    color: var(--warning);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--radius);
}

.empty-state h2 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--primary);
}

.cta-content h2 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.cta-content p {
    color: var(--gray-600);
}

/* Info Cards */
.search-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.info-card h3 {
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-card li:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: white;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

@media (max-width: 640px) {
    .footer-content {
        text-align: center;
    }
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--primary-light);
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
    font-size: 0.875rem;
}

.footer-section a {
    color: var(--primary-light);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section li a {
    opacity: 0.8;
    color: white;
    transition: var(--transition);
}

.footer-section li a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--gray-700);
    opacity: 0.6;
    font-size: 0.875rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Image count badge */
.image-count {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

body.rtl .image-count {
    right: auto;
    left: 0.5rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: whatsapp-pulse 2s infinite;
}

/* RTL Support - Move to left side */
.whatsapp-float[data-rtl="true"] {
    right: auto;
    left: 24px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    color: white;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: var(--secondary);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* RTL tooltip position */
.whatsapp-float[data-rtl="true"] .whatsapp-tooltip {
    right: auto;
    left: 70px;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--secondary);
}

/* RTL tooltip arrow */
.whatsapp-float[data-rtl="true"] .whatsapp-tooltip::after {
    right: auto;
    left: -6px;
    border-left-color: transparent;
    border-right-color: var(--secondary);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }

    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .whatsapp-float[data-rtl="true"] {
        right: auto;
        left: 16px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

.payment-methods {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.payment-methods h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #555;
}

.payment-item {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #eaeaea;
}

.payment-item img {
    height: 24px;
    /* Adjust height as needed */
    width: auto;
    margin-right: 12px;
}

.payment-item span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}