/* Top Arthur - Responsive Layout Styles */
/* h1{
    font-size: 2.5rem;
} */
/* Main Container */
.main_books.voting_books {
    width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 20px;
}

.jcarousel.main_books.gridview {
    padding: 10px 0;
}

.toparthur_container {
    display: flex;
    gap: 30px;
    width: 100%;
    flex-wrap: wrap;
}

/* Layout with voting enabled - 2 columns */
.toparthur_container.has_voting {
    display: flex;
    flex-direction: row;
}

.toparthur_container.has_voting .left_all_new {
    flex: 1 1 60%;
    min-width: 300px;
}

.toparthur_container.has_voting .right_top_new {
    flex: 1 1 35%;
    min-width: 300px;
}

/* Layout without voting - full width tops */
.toparthur_container.no_voting {
    display: block;
}

.toparthur_container.no_voting .left_all_new.hidden_voting {
    display: none;
}

.toparthur_container.no_voting .right_top_new.full_width_tops {
    width: 100%;
    max-width: 100%;
}

/* Left Section - Voting Books */
.left_all_new {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Ascunde complet când are clasa no_display */
.left_all_new.no_display {
    display: none !important;
}

.left_all_new .section_title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.voting_books_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    justify-items: center;
}

/* Right Section - Top Books */
.right_top_new {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.right_top_new h2 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 3px solid var(--header-contrast-color) !important;
    padding-bottom: 10px;
}

.right_top_new h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.right_top_new h2 a:hover {
    color: #e74c3c;
}

/* Full width when no voting */
.right_top_new.full_width_tops {
    max-width: 100%;
    background: transparent;
    padding: 0;
}

.right_top_new.full_width_tops > div {
    margin-bottom: 40px;
}

.right_top_new.full_width_tops h2 {
    font-size: 28px;
    margin-bottom: 25px;
}

/* Sidebar mode (when voting is active) */
.right_top_new.sidebar_tops {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* When voting is closed and all_width is added */
.right_top_new.all_width,
.right_top_new.sidebar_tops.all_width {
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
    background: transparent;
    padding: 0;
}

.right_top_new.all_width > div,
.right_top_new.sidebar_tops.all_width > div {
    margin-bottom: 40px;
}

.right_top_new.all_width h2,
.right_top_new.sidebar_tops.all_width h2 {
    font-size: 28px;
    margin-bottom: 25px;
}

/* Grid responsive pentru all_width */
.right_top_new.all_width .products_wrapper > .gridview > div,
.right_top_new.sidebar_tops.all_width .products_wrapper > .gridview > div {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 20px !important;
}

/* Custom scrollbar for sidebar */
.right_top_new.sidebar_tops::-webkit-scrollbar {
    width: 8px;
}

.right_top_new.sidebar_tops::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.right_top_new.sidebar_tops::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.right_top_new.sidebar_tops::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* See more link */
.see_more_right {
    display: inline-block;
    padding: 10px 20px;
    background: #e74c3c;
    color: #fff !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin: 20px 0;
    transition: background 0.3s;
}

.see_more_right:hover {
    background: #c0392b;
}

/* Banner styles */
.top_banner {
    margin-bottom: 30px;
    text-align: center;
}

.top_banner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.banner_top_mobile {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.banner_top_mobile .link_element {
    flex: 1;
    min-width: 150px;
}

.banner_top_mobile .link_element a {
    display: block;
    padding: 12px 20px;
    background: var(--header-color);
    color: var(--header-color-text) !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s;
}

.banner_top_mobile .link_element a:hover {
    background: #2980b9;
}

/* Voted message */
.voted_top {
    text-align: center;
    font-weight: bold;
}

/* Doar când conține text, arată stilurile */
.voted_top:not(:empty) {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Products wrapper grid improvements */
.right_top_new .wrap_flex {
    margin-bottom: 40px;
}

/* Grid pentru produse în sidebar (mereu 2 coloane) */
.right_top_new.sidebar_tops .products_wrapper > .gridview > div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Grid pentru produse în full width mode (responsive) */
.right_top_new.full_width_tops .products_wrapper > .gridview > div {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Asigură-te că produsele nu sunt block în full width */
.right_top_new.full_width_tops .products_wrapper .gridview > div > * {
    display: block;
}

/* Variante alternative pentru selectori mai generali */
.toparthur_container.no_voting .products_wrapper > .gridview > div,
.toparthur_container.no_voting .products_wrapper .gridview > div {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Responsive Design */

/* Tablets - Portrait */
@media (max-width: 991px) {
    .toparthur_container.has_voting {
        flex-direction: column;
    }
    
    .toparthur_container.has_voting .left_all_new,
    .toparthur_container.has_voting .right_top_new {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    /* Asigură că left_all_new cu no_display rămâne ascuns */
    .left_all_new.no_display {
        display: none !important;
    }
    
    .right_top_new.sidebar_tops {
        position: static;
        max-height: none;
    }
    
    .banner_top_mobile {
        flex-direction: column;
    }
    
    .banner_top_mobile .link_element {
        min-width: 100%;
    }
}

/* Mobile - Landscape */
@media (max-width: 767px) {
    .main_books.voting_books {
        padding: 15px;
    }
    
    .toparthur_container {
        gap: 20px;
    }
    
    .left_all_new,
    .right_top_new {
        padding: 15px;
    }
    
    .left_all_new .section_title {
        font-size: 20px;
    }
    
    .voting_books_grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }
    
    .right_top_new h2 {
        font-size: 18px;
    }
    
    .right_top_new.full_width_tops h2 {
        font-size: 22px;
    }
    
    .right_top_new.sidebar_tops .products_wrapper > .gridview > div {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Grid responsive pentru all_width și full_width_tops */
    .right_top_new.full_width_tops .products_wrapper > .gridview > div,
    .right_top_new.all_width .products_wrapper > .gridview > div,
    .right_top_new.sidebar_tops.all_width .products_wrapper > .gridview > div,
    .toparthur_container.no_voting .products_wrapper > .gridview > div {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 15px;
    }
}

/* Mobile - Portrait */
@media (max-width: 480px) {
    .main_books.voting_books {
        padding: 10px;
    }
    
    .voting_books_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .right_top_new.sidebar_tops .products_wrapper > .gridview > div {
        grid-template-columns: 1fr;
    }
    
    .right_top_new.full_width_tops .products_wrapper > .gridview > div,
    .right_top_new.all_width .products_wrapper > .gridview > div,
    .right_top_new.sidebar_tops.all_width .products_wrapper > .gridview > div,
    .toparthur_container.no_voting .products_wrapper > .gridview > div {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .left_all_new .section_title {
        font-size: 18px;
    }
    
    .right_top_new h2 {
        font-size: 16px;
    }
    
    .see_more_right {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* Print styles */
@media print {
    .banner_top_mobile,
    .vote_button {
        display: none;
    }
    
    .toparthur_container {
        flex-direction: column;
    }
}

/* Accessibility improvements */
.vote_button:focus,
.see_more_right:focus,
.banner_top_mobile .link_element a:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Dark mode support (optional)
@media (prefers-color-scheme: dark) {
    .left_all_new {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .left_all_new .section_title,
    .right_top_new h2,
    .right_top_new h2 a {
        color: #ecf0f1;
    }
    
    .right_top_new {
        background: #34495e;
    }
    
    .voted_top {
        background: #27ae60;
        border-color: #229954;
        color: #ecf0f1;
    }
} */


/* ========================================
   Widget Top Carousel Styles
   ======================================== */

.widget_top {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.widget_top h2,
.widget_top h3,
.widget_top h4,
.widget_top h5,
.widget_top h6, .normalize_header {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.widget_text_description {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    color: #555;
    line-height: 1.6;
    border-radius: 4px;
}

/* Carousel Wrapper */
.widget_top_carousel_wrapper {
    position: relative;
    padding: 0 29px;
}

.widget_top_carousel_container {
    overflow: hidden;
    position: relative;
}

.widget_top_carousel {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
	display: flex;
}

.widget_top_carousel::after {
	content: "";
	display: table;
	clear: both;
}

img.edit_logo_top {
    width: 52px;
    position: relative;
}

.widget_product_item {
	float: left;
	padding: 10px;
	box-sizing: border-box;
	    border: 1px solid var(--light-blue-border-color) !important;
	border-radius: 8px;
	margin: 0;
	background: #fff;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	flex-shrink: 0;
    max-width: 229px;
}

.widget_product_item:hover {
	/* transform: translateY(-5px); */
	border: 1px solid var(--light-blue-border-color) !important;
    box-shadow: var(--light-blue-box-shadow);
}

.widget_product_item > * {
	width: 100%;
}

.product_img_wrapper {
    text-align: center;
    margin-bottom: 15px;
	width: 100%;
}

.product_img_wrapper img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product_info_wrapper {
	width: 100%;
}

.product_title {
	font-size: 16px;
	font-weight: 600;
	color: #2c3e50;
	text-decoration: none;
	margin-bottom: 10px;
	display: block;
	line-height: 1.4;
	transition: color 0.2s ease;
    min-height: 67px;
}


.product_title:hover {
    color: #3498db;
}
span.author_name {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: normal;
}
.rating_top_arthur {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.rating_top_arthur .fa-star {
    color: #f39c12;
    margin-right: 5px;
}

.rating_top_arthur span {
    color: #7f8c8d;
}

img.edit_logo_top_arthur {
    width: auto;
    display: block;
    margin: 0 auto;
    position: absolute;
}

.gen_top_arthur {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 8px;
    height: 39px;
    overflow: hidden;
}

.gen_top_arthur strong {
    color: #34495e;
}

/* Product Description Styles */
.product_info_wrapper > div:not(.rating_top_arthur):not(.gen_top_arthur):not(.collapsible_descr) {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
    margin-top: 5px;
}

/* Collapsible Description */
.collapsible_descr {
    position: relative;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 5px;
    margin-top: 5px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.collapsible_descr.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collapsible_descr.expanded {
    display: block;
    overflow: visible;
}

.collapsible_descr .descr_text {
    display: inline;
}

.toggle_descr {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    gap: 4px;
}

.toggle_descr i {
    font-size: 10px;
}

.toggle_descr:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.toggle_descr:active {
    transform: translateY(0);
}

.toggle_descr:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Carousel Navigation Buttons */
.widget_carousel_prev,
.widget_carousel_next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.widget_carousel_prev {
    left: 0;
}

.widget_carousel_next {
    right: 0;
}

.widget_carousel_prev:hover,
.widget_carousel_next:hover {
    background: #2980b9;
}

.widget_carousel_prev.inactive,
.widget_carousel_next.inactive {
    opacity: 0.3;
    cursor: not-allowed;
}

.widget_carousel_prev:focus,
.widget_carousel_next:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.extra_description_top{
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .widget_top_carousel_wrapper {
        padding: 0 4px;
    }
    
    .widget_carousel_prev,
    .widget_carousel_next {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .widget_product_item {
        margin: 0;
        padding: 8px;
    }
    
    .product_title {
        font-size: 14px;
        min-height: 56px;
    }
}

@media (max-width: 480px) {
    .widget_product_item{
        max-width: 160px;
    }
    .widget_top {
        padding: 15px;
        margin: 20px 0;
    }
    
    .widget_top_carousel_wrapper {
        padding: 0 4px;
    }
    
    .widget_carousel_prev,
    .widget_carousel_next {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

/* Target li elements in ul elements without widget_top_carousel class */
ul:not(.widget_top_carousel){
    margin-left: 20px;
}
