/* ==========================================================================
   HOME VOUCHERS SECTION STYLES
   ========================================================================== */

.home-vouchers-section {
    background: linear-gradient(180deg, #f8f9fa 0%, var(--bg-body) 50%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

/* Transparent glassmorphic background orbs */
.home-vouchers-section::before,
.home-vouchers-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.home-vouchers-section::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.home-vouchers-section::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(10, 37, 64, 0.05) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
}

.home-vouchers-section .container {
    position: relative;
    z-index: 1;
}

/* 1. Section Header */
.voucher-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.voucher-title-group {
    flex: 1;
    min-width: 250px;
}

.voucher-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.9) 0%, rgba(26, 58, 92, 0.9) 100%);
    color: #d4af37;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(10px);
}

.voucher-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.voucher-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* 2. Control Buttons */
.btn-voucher-near-me {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a5c 100%);
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.7rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-voucher-near-me:hover {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.btn-voucher-merchant,
.btn-voucher-city {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-main);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    padding: 0.7rem 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-voucher-merchant:hover,
.btn-voucher-city:hover {
    border-color: #d4af37;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
}

/* 3. Voucher Card - Horizontal Layout */
.voucher-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1.5px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 8px 32px rgba(10, 37, 64, 0.06);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: row;
    min-height: 220px;
}

/* Dithering noise overlay */
.voucher-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    border-radius: 20px;
}

/* Gold accent line on left */
.voucher-card::after {
    content: "";
    position: absolute;
    top: 20%;
    left: 0;
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, transparent, #d4af37, transparent);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.voucher-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 20px 60px rgba(10, 37, 64, 0.12), 0 0 0 1px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.35);
}

.voucher-card:hover::after {
    opacity: 1;
}

/* 4. Left Side - Circular Image */
.voucher-image-section {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.voucher-image-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.4) 0%, rgba(212, 175, 55, 0.1) 50%, rgba(212, 175, 55, 0.4) 100%);
    position: relative;
    transition: all 0.4s ease;
}

/* Dithering transparent border effect */
.voucher-image-ring::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(212, 175, 55, 0.3),
        rgba(212, 175, 55, 0.05),
        rgba(212, 175, 55, 0.3),
        rgba(212, 175, 55, 0.05),
        rgba(212, 175, 55, 0.3)
    );
    z-index: -1;
    animation: voucher-ring-rotate 8s linear infinite;
}

@keyframes voucher-ring-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.voucher-card:hover .voucher-image-ring {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.25);
}

.voucher-image-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.voucher-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.voucher-card:hover .voucher-image-inner img {
    transform: scale(1.1);
}

/* 5. Right Side - Banner Content */
.voucher-content-section {
    flex: 1;
    padding: 1.75rem 2rem 1.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.voucher-title-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

/* Pricing Row */
.voucher-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.voucher-price-tag {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a5c 100%);
    padding: 0.5rem 1rem;
    border-radius: 12px;
}

.voucher-price-currency {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: #d4af37;
}

.voucher-price-amount {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.75rem;
    color: #ffffff;
    line-height: 1;
}

.voucher-coupons-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(212, 175, 55, 0.1);
    color: #b8941f;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.voucher-coupons-count i {
    font-size: 1rem;
}

.voucher-qty-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(40, 167, 69, 0.1);
    color: #198754;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
}

/* Merchant Link */
.voucher-merchant-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.voucher-merchant-link:hover {
    color: var(--secondary-color);
}

.voucher-merchant-link i {
    color: #d4af37;
}

/* Description */
.voucher-description {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action Buttons */
.voucher-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-voucher-buy {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: var(--primary-color);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
    cursor: pointer;
}

.btn-voucher-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
    color: var(--primary-color);
}

.btn-voucher-buy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-voucher-detail {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-voucher-detail:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* 6. Pagination */
.voucher-pagination-nav {
    margin-top: 2.5rem;
}

.voucher-pagination-nav .page-link {
    border: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    margin: 0 3px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
}

.voucher-pagination-nav .page-link:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary-color);
}

.voucher-pagination-nav .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a5c 100%);
    color: #d4af37;
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.2);
}

.voucher-pagination-nav .page-item.disabled .page-link {
    opacity: 0.4;
}

/* 7. Modals */
.voucher-modal .modal-content {
    border-radius: 20px;
    overflow: hidden;
}

.voucher-modal-header {
    padding: 1.75rem;
    text-align: center;
    border: none;
}

.voucher-modal-header.login-required {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a5c 100%);
    color: #ffffff;
}

.voucher-modal-header.confirmation {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 50%, #d4af37 100%);
    color: var(--primary-color);
}

.voucher-modal-header.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
}

.voucher-modal-header.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
}

.voucher-modal-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
}

.voucher-modal-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

.voucher-modal-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.voucher-purchase-summary {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.voucher-purchase-info {
    text-align: left;
}

.voucher-purchase-info h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
}

.voucher-purchase-coupons-count {
    display: inline-flex;
    align-items: center;
    background: rgba(212, 175, 55, 0.1);
    color: #b8941f;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
}

.voucher-purchase-price {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}

.voucher-purchase-currency {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: #d4af37;
}

.voucher-purchase-amount {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--primary-color);
    line-height: 1;
}

.voucher-modal-footer {
    padding: 0 1.5rem 1.75rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    border: none;
}

.btn-voucher-modal-primary {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: var(--primary-color);
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-voucher-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
    color: var(--primary-color);
}

.btn-voucher-modal-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-voucher-modal-secondary:hover {
    background: #e2e8f0;
}

/* 8. Skeleton Loading */
.voucher-card-skeleton {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    min-height: 200px;
}

.voucher-skeleton-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    flex-shrink: 0;
}

.voucher-skeleton-content {
    flex: 1;
    padding-top: 0.5rem;
}

.skeleton-bg {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 9. Fade-in Animation */
@keyframes voucherFadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

.voucher-animate-in {
    animation: voucherFadeInUp 0.5s ease forwards;
    opacity: 0;
}

.voucher-animate-in:nth-child(1) { animation-delay: 0.05s; }
.voucher-animate-in:nth-child(2) { animation-delay: 0.12s; }
.voucher-animate-in:nth-child(3) { animation-delay: 0.19s; }
.voucher-animate-in:nth-child(4) { animation-delay: 0.26s; }
.voucher-animate-in:nth-child(5) { animation-delay: 0.33s; }
.voucher-animate-in:nth-child(6) { animation-delay: 0.40s; }

/* 10. Mobile Responsiveness */
@media (max-width: 768px) {
    .voucher-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .voucher-controls {
        width: 100%;
    }
    
    .voucher-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .voucher-image-section {
        width: 100%;
        padding: 1.5rem 1.5rem 0;
    }
    
    .voucher-image-ring {
        width: 110px;
        height: 110px;
    }
    
    .voucher-content-section {
        padding: 1.25rem 1.5rem 1.5rem;
        text-align: center;
    }
    
    .voucher-meta-row {
        justify-content: center;
    }
    
    .voucher-merchant-link {
        justify-content: center;
    }
    
    .voucher-actions {
        justify-content: center;
    }
    
    .voucher-purchase-summary {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .voucher-purchase-info {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .btn-voucher-near-me,
    .btn-voucher-merchant,
    .btn-voucher-city {
        padding: 0.55rem 0.85rem;
        font-size: 0.8rem;
    }
    
    .voucher-image-ring {
        width: 90px;
        height: 90px;
    }
    
    .voucher-price-amount {
        font-size: 1.5rem;
    }
}