/* detailed-news.css - Fixing title overflow and removing all shadows */

#detailed-news-component {
    padding: 20px;
    margin: 20px auto;
    max-width: 800px; /* Aligned with news-feed-container */
    width: 100%;
}

.detailed-news-section {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
}

.detailed-news-left {
    flex: 2;
    min-width: 300px;
    max-width: 400px;
    background-color: var(--grey-background); /* Light gray background */
    padding: 20px;
    border-radius: 20px; /* More rounded */
    box-shadow: none; /* Explicitly remove shadow */
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box; /* Ensure padding is included in width */
}

.detailed-news-right {
    flex: 1;
    /* Removed min-width to resolve conflict with max-width */
    max-width: 270px; /* Reverted to previous value */
    display: flex;
    flex-direction: column;
    align-items: center; /* Align share button to the center */
    gap: 20px;
}

/* Meta Information Styling - No background, no shadow */
.detailed-news-meta {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    /* background-color: var(--white); -- Removed background as per screenshot */
    border-radius: 20px;
    box-shadow: none; /* Explicitly remove shadow */
}


.meta-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color);
}

.meta-item img {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* Space out meta items */
.meta-item:nth-child(2) {
    margin-left: 20px; /* Space between comments and reposts */
}

.meta-item:last-child {
    margin-left: auto; /* Push views to the right */
}

/* Title Bar Styling - Darker gray background, white text, no shadow */
.detailed-news-title-bar {
    padding: 15px;
    background-color: #A9A9A9; /* Even a little bit darker gray */
    border-radius: 25px; /* More rounded */
    box-shadow: none; /* Explicitly remove shadow */
    width: 100%;
    box-sizing: border-box; /* Ensure padding is included in width */
}

.detailed-news-title-bar h3 {
    font-size: 1.8rem;
    color: white; /* White text */
    margin: 0;
    text-align: center;
    overflow-wrap: break-word; /* Fix title overflow */
    word-break: break-word; /* Fix title overflow for older browsers */
}

/* Text Content Styling - Overriding .text-top for this context */
.detailed-news-content .text-content p.text-top {
    background-color: transparent; /* No background */
    box-shadow: none; /* No shadow */
    padding: 0; /* No padding */
    border-radius: 0; /* No border-radius */
    text-align: left; /* Left align text */
    font-size: 1.1rem; /* Consistent font size */
    color: var(--text-color); /* Dark text color */
}

/* Carousel Styling */
.carousel-container {
    width: 100%;
    padding-bottom: 100%; /* Creates a square aspect ratio */
    position: relative; /* Ensure this is relative for absolute positioning of children */
    overflow: hidden;
    background-color: var(--lilac-pale); /* Pale lilac background */
    border-radius: 30px; /* More rounded */
    box-shadow: none; /* Explicitly remove shadow */
}

.carousel-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.carousel-progress {
    position: absolute;
    bottom: 10px; /* Position from the bottom of the carousel-container */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100; /* Ensure it's on top of carousel slides */
    width: 100%; /* Ensure it spans the width of the carousel for centering */
}

.progress-ball {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #999; /* Сероватый цвет для невыбранного */
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    border: none; /* Убираем обводку */
}

.progress-ball.active {
    background-color: #333; /* Темный для выбранного */
}

/* Share Button Styling - Redesigned */
.share-button {
    display: block;
    width: 100%; /* Full width */
    padding: 10px 20px;
    background-color: transparent; /* Transparent background */
    color: var(--text-color); /* Text color from root */
    border: 2px solid var(--text-color); /* Outlined button */
    border-radius: 20px; /* More rounded */
    cursor: pointer;
    font-size: 1rem;
    align-self: center; /* Center horizontally within flex container */
    box-shadow: none; /* Explicitly remove shadow */
    transition: all 0.3s ease; /* Smooth transition for hover */
}

.share-button:hover {
    background-color: var(--text-color); /* Fill on hover */
    color: var(--white); /* White text on hover */
}

/* Desktop/Mobile visibility */
.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Show mobile, hide desktop */
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    /* Mobile container */
    .detailed-news-section-mobile {
        background-color: var(--grey-background);
        padding: 15px;
        border-radius: 30px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Статистика с кнопкой-стрелкой */
    .detailed-news-meta-mobile {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px;
        background-color: transparent;
    }

    .expand-arrow-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        color: var(--text-color);
        transition: transform 0.3s ease;
    }

    .detailed-news-collapsible {
        overflow: hidden;
        transition: max-height 0.5s ease, opacity 0.5s ease;
    }

    .detailed-news-collapsible.collapsed {
        max-height: 0;
        opacity: 0;
    }

    /* Область с картинкой и кнопками */
    .carousel-and-buttons-mobile {
        display: flex;
        gap: 10px;
        align-items: stretch;
    }

    .carousel-container-mobile {
        width: 180px;
        height: 180px;
        position: relative;
        overflow: hidden;
        background-color: var(--lilac-pale);
        border-radius: 25px;
        flex-shrink: 0;
    }

    .carousel-container-mobile .carousel-slides {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        transition: transform 0.5s ease-in-out;
    }

    .carousel-container-mobile .carousel-slides .carousel-placeholder-image,
    .carousel-container-mobile .carousel-slides img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .carousel-container-mobile .carousel-progress {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        z-index: 100;
        display: flex;
        justify-content: center;
        gap: 5px;
    }

    .carousel-container-mobile .carousel-progress .progress-ball {
        width: 12px;
        height: 12px;
        background-color: #999;
        border-radius: 50%;
        cursor: pointer;
        border: none;
    }

    .carousel-container-mobile .carousel-progress .progress-ball.active {
        background-color: #333;
    }

    .right-buttons {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
    }

    .button-group-top {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .button-group-bottom {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: auto;
    }

    .share-button-mobile,
    .open-button,
    .close-button {
        padding: 8px 12px;
        font-size: 0.9rem;
        width: 100%;
        background-color: transparent;
        color: var(--text-color);
        border: 2px solid var(--text-color);
        border-radius: 20px;
        cursor: pointer;
        font-family: 'Lora', serif;
        font-weight: 700;
        transition: all 0.3s ease;
        text-align: center;
        box-shadow: none;
    }

    .share-button-mobile:hover,
    .open-button:hover,
    .close-button:hover {
        background-color: var(--text-color);
        color: var(--white);
    }

    .button-divider {
        width: 100%;
        height: 1px;
        background-color: var(--text-color);
        border: none;
        margin: 0;
    }

    .detailed-news-title-bar-mobile {
        width: 100%;
        padding: 12px;
        background-color: #A9A9A9;
        margin-top: 0;
        margin-bottom: 0;
        border-radius: 25px;
    }

    .detailed-news-title-bar-mobile h3 {
        font-size: 1.4rem;
        color: white;
        margin: 0;
        text-align: center;
    }

    .detailed-news-content-mobile {
        width: 100%;
        padding: 0;
        background-color: transparent;
    }

    .detailed-news-content-mobile .text-content p.text-top {
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
        text-align: left;
        font-size: 1rem;
        color: var(--text-color);
    }
}


