/* ============================================================
   RoozBook - Home Page Styles (Optimized)
   ============================================================ */

:root{
    --accent: #f1592a;
    --text: #1a1a1a;
    --muted: #777;
    --border: #e5e5e5;
    --bg: #fff;
    --radius: 16px;
}

/* Headline Ticker */
.headline-ticker {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 16px;
    overflow: hidden;
}
.headline-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}
.headline-list {
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
    flex: 1;
    overflow: hidden;
}
.headline-list li {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.headline-list li::before {
    content: "•";
    color: var(--accent);
}
.headline-list a { color: var(--text); }
.headline-list a:hover { color: var(--accent); }
.headline-list time { color: #999; font-size: 0.7rem; }
.headline-more {
    font-size: 0.75rem;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}
.headline-more:hover { text-decoration: underline; }

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
    align-items: stretch;
}

.hero-slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    height: 390px;
    direction: ltr;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    height: 100%;
    direction: ltr;
}

.slider-item {
    min-width: 100%;
    position: relative;
    height: 100%;
}

.slider-item-image {
    position: absolute;
    inset: 0;
}

.slider-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0) 100%);
}

.slider-item-content {
    padding: 18px;
    color: #fff;
    max-width: 95%;
    direction: rtl;
    text-align: right;
    margin-left: auto;
    margin-right: 0;
}

.slider-item-kicker{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:6px;
}

.badge-live{
    background: #fff;
    color:#111;
    font-size:0.68rem;
    padding:4px 8px;
    border-radius:6px;
    font-weight:700;
}

.slider-item-category {
    display: inline-block;
    font-size: 0.72rem;
    color: #fff;
    font-weight: bold;
}

.slider-item-title {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.5;
    margin-bottom: 8px;
}

.slider-item-title a { color: #fff; }
.slider-item-title a:hover { color: var(--accent); }

.slider-item-meta {
    font-size: 0.78rem;
    color: #eee;
    margin-bottom: 6px;
}

.slider-item-excerpt {
    font-size: 0.85rem;
    color: #f5f5f5;
    line-height: 1.7;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 0.8rem;
    color: #333;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-btn:hover { background: #fff; }
.slider-prev { right: 10px; left:auto; }
.slider-next { left: 10px; right:auto; }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 6px 0 8px;
    background: transparent;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #555;
    cursor: pointer;
    border: none;
}
.dot.active {
    background: var(--accent);
    width: 20px;
    border-radius: 4px;
}

/* Hero Sidebar */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 390px;
}

.hero-sidebar-list{
    display:flex;
    flex-direction: column;
    gap:0;
    height: 100%;
}

.hero-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.hero-sidebar-item:last-child {
    border-bottom: none;
}

.hero-sidebar-item:hover {
    background: rgba(0,0,0,0.02);
}

.hero-sidebar-thumb{
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f3f3;
}

.hero-sidebar-thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-sidebar-info h4{
    font-size: 0.86rem;
    font-weight: 600;
}
.hero-sidebar-meta{
    font-size: 0.7rem;
    color:#888;
}

/* Services Row */
.services-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    display: block;
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.service-card-icon {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.service-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.service-card p { font-size: 0.75rem; color: #999; }

/* Horizontal Banner Row */
.home-banner-row {
    margin-bottom: 28px;
}
.home-banner-row img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8f8f8;
    border-radius: 12px;
    display: block;
}

/* Books Row */
.books-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.book-card-mini {
    display: flex;
    gap: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: all 0.2s ease;
}

.book-card-mini:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.book-card-mini-cover {
    width: 60px;
    height: 85px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.book-card-mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card-mini-info h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; line-height: 1.4; color: var(--text); }
.book-card-mini-info .book-author { font-size: 0.75rem; color: var(--accent); margin-bottom: 2px; }
.book-card-mini-info .book-publisher { font-size: 0.72rem; color: #999; }
.book-card-mini-info .book-price { font-size: 0.78rem; font-weight: bold; color: var(--text); margin-top: 4px; }

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.news-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.news-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.news-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.news-card:hover .news-card-image img { transform: scale(1.03); }

.news-card-body { padding: 14px; }

.news-card-category {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 6px;
}

.news-card-title { font-size: 0.88rem; font-weight: 600; line-height: 1.5; margin-bottom: 6px; }
.news-card-title a { color: var(--text); }
.news-card-title a:hover { color: var(--accent); }

.news-card-excerpt { font-size: 0.78rem; color: #777; line-height: 1.6; margin-bottom: 8px; }
.news-card-meta { font-size: 0.72rem; color: #999; display: flex; align-items: center; gap: 4px; }

/* Review Cards */
.review-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.review-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: all 0.2s ease;
}

.review-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.review-card-rating { font-size: 0.8rem; color: var(--accent); margin-bottom: 6px; }
.review-card-title { font-size: 0.85rem; font-weight: 600; line-height: 1.5; margin-bottom: 6px; }
.review-card-title a { color: var(--text); }
.review-card-title a:hover { color: var(--accent); }
.review-card-meta { font-size: 0.72rem; color: #999; }

/* Double Grid */
.double-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.double-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.2s ease;
    display: block;
}

.double-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}

.double-card-img {
    height: 260px;
    overflow: hidden;
    position: relative;
}

.double-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.double-card-body {
    padding: 12px 16px;
}

.double-card-cat {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 6px;
}

.double-card-body h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.4;
}

.double-card-body p {
    display: none;
}
/* Gallery Row */
.gallery-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 28px;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

/* Figures Row */
.figures-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 8px 0;
    margin-bottom: 28px;
    scrollbar-width: thin;
}

.figure-card {
    flex: 0 0 100px;
    text-align: center;
    transition: all 0.2s ease;
    display: block;
    text-decoration: none;
}

.figure-card:hover { transform: translateY(-3px); }

.figure-card-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    border: 2px solid var(--border);
    background: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.figure-card:hover .figure-card-avatar { border-color: var(--accent); }

.figure-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.figure-card-name { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.figure-card-role { font-size: 0.7rem; color: #999; }

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--text);
    font-size: 1.1rem;
    font-weight: bold;
}

.section-title span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
    margin-left: 8px;
}

.section-more {
    font-size: 0.78rem;
    color: #999;
    font-weight: normal;
    text-decoration: none;
}

.section-more:hover { color: var(--accent); }

/* --------------------------------------------------------------
   Responsive - Updated
   -------------------------------------------------------------- */
@media (max-width: 992px) {
    .hero-section { grid-template-columns: 1fr; }
    .hero-slider { height: 320px; }
    .hero-sidebar { 
        height: auto; 
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
    }
    .hero-sidebar-list {
        display: flex;
        flex-direction: row;
        gap: 10px;
        min-width: max-content;
    }
    .hero-sidebar-item {
        flex: 0 0 200px;
        flex-direction: column;
        text-align: center;
        padding: 12px;
        border-bottom: none;
        border: 1px solid var(--border);
        border-radius: 12px;
    }
    .hero-sidebar-thumb { width: 100%; height: 100px; }
    .news-grid, .review-grid, .books-row { grid-template-columns: repeat(3, 1fr); }
    .services-row { grid-template-columns: repeat(2, 1fr); }
    .gallery-row { grid-template-columns: repeat(4, 1fr); }
    .service-card img { max-height: 160px; height: auto; width: 100%; object-fit: contain; background: #f8f8f8; }
    
    .header-top { flex-wrap: wrap; gap: 8px; }
    .main-nav { width: 100%; order: 3; }
    .nav-list { flex-wrap: wrap; justify-content: center; }
    .nav-link { padding: 6px 10px; font-size: 0.75rem; }
    .header-left { order: 2; }
    .header-date { font-size: 0.7rem; }
}

@media (max-width: 768px) {
    .news-grid, .review-grid, .books-row { grid-template-columns: repeat(2, 1fr); }
    .services-row { grid-template-columns: repeat(2, 1fr); }
    .gallery-row { grid-template-columns: repeat(3, 1fr); }
    .double-grid { grid-template-columns: 1fr; }
    .slider-item-title { font-size: 1rem; }
    .slider-item-excerpt { display: none; }
    .figures-row { gap: 10px; }
    .figure-card { flex: 0 0 85px; }
    .figure-card-avatar { width: 60px; height: 60px; }
    .home-banner-row img { max-height: 150px; height: auto; object-fit: contain; background: #f8f8f8; }
    .books-row {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .book-card-mini { flex: 0 0 250px; scroll-snap-align: start; }
    .hero-sidebar-item { flex: 0 0 160px; }
    .hero-sidebar-thumb { height: 80px; }
    .service-card img { max-height: 130px; height: auto; width: 100%; object-fit: contain; background: #f8f8f8; }
}

@media (max-width: 480px) {
    .news-grid, .review-grid, .services-row { grid-template-columns: repeat(2, 1fr); }
    .gallery-row { grid-template-columns: repeat(2, 1fr); }
    .slider-item-content { padding: 12px; }
    .slider-item-title { font-size: 0.9rem; }
    .hero-slider { height: 280px; }
    .figures-row { gap: 8px; }
    .figure-card { flex: 0 0 75px; }
    .figure-card-avatar { width: 55px; height: 55px; }
    .headline-ticker { flex-wrap: wrap; }
    .home-banner-row img { max-height: 120px; height: auto; object-fit: contain; background: #f8f8f8; }
    .service-card img { max-height: 110px; height: auto; width: 100%; object-fit: contain; background: #f8f8f8; }
}

@media (max-width: 360px) {
    .gallery-row { grid-template-columns: repeat(2, 1fr); }
    .hero-sidebar-item { flex: 0 0 140px; }
    .hero-sidebar-thumb { height: 70px; }
    .service-card img { max-height: 95px; height: auto; width: 100%; object-fit: contain; background: #f8f8f8; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
