/* Article Management System - Clean Styles */
/* Version: 2.0.0 Clean */
/* NOTE: All upload-related styles have been moved to articles-uploads.css */

/* ============================================================================
   FORM ELEMENTS ENHANCEMENTS
   ============================================================================ */

@media (max-width: 576px) {
    .container.article-show-container { padding-left:5px !important; padding-right:5px !important; }
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-header h5,
.card-header h6 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Form Controls */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* ============================================================================
   ALERTS AND NOTIFICATIONS
   ============================================================================ */

.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-info {
    background: linear-gradient(145deg, #e3f2fd 0%, #f8f9fa 100%);
    border-left-color: #0dcaf0;
    color: #055160;
}

.alert-success {
    background: linear-gradient(145deg, #d4edda 0%, #f8f9fa 100%);
    border-left-color: #28a745;
    color: #0a3622;
}

.alert-danger {
    background: linear-gradient(145deg, #f8d7da 0%, #f8f9fa 100%);
    border-left-color: #dc3545;
    color: #58151c;
}

/* ============================================================================
   BUTTONS ENHANCEMENTS
   ============================================================================ */

.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(145deg, #0d6efd 0%, #0b5ed7 100%);
    border-color: #0d6efd;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #0b5ed7 0%, #0a58ca 100%);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-outline-primary:hover {
    background: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-outline-info {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

.btn-outline-info:hover {
    background: #0dcaf0;
    border-color: #0dcaf0;
    color: #000;
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.4);
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================================
   DANGER ZONE STYLING
   ============================================================================ */

.card.border-danger {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.card.border-danger .card-header.bg-danger {
    background: linear-gradient(145deg, #dc3545 0%, #b02a37 100%) !important;
    color: white;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-soft {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.shadow-soft-hover:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS - NON-UPLOAD ELEMENTS ONLY
   ============================================================================ */

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-body {
        padding: 0.75rem;
    }
}

/* ============================================================================
   DARK MODE SUPPORT - NON-UPLOAD ELEMENTS ONLY
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    .card {
        background: #2d3748;
        color: #e2e8f0;
    }

    .card-header {
        background: linear-gradient(145deg, #4a5568 0%, #2d3748 100%);
        border-bottom-color: #4a5568;
    }
}

/* ============================================================================
   ARTICLE DETAILS COMPONENT STYLES
   ============================================================================ */

/* Article Details Container */
.article-details {
    margin-bottom: 2rem;
}

.article-details .article-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.article-details .article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-details .article-category-rating {
    margin-bottom: 1rem;
}

.article-details .article-category-rating .category-badge {
    position: static !important;
    top: auto !important;
    left: auto !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
}

.article-details .category-badge .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.article-details .rating-display {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.article-details .rating-display:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* Main Image Styling */
.article-details .main-image-container {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-details .main-image {
    transition: transform 0.3s ease;
}

.article-details .main-image:hover {
    transform: scale(1.02);
}

.article-details .zoom-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.article-details .zoom-icon:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.article-details .gallery-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================================================
   THUMBNAIL CAROUSEL STYLES
   ============================================================================ */

.thumbnail-carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0 -0.15rem;
}

.thumbnail-carousel {
    position: relative;
    overflow: hidden;
}

.thumbnail-item {
    width: 100%;
    position: relative;
}

.thumbnail-image {
    width: 100% !important;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    display: block !important;
    box-sizing: border-box !important;
}

.thumbnail-image:hover {
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.thumbnail-image.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.thumbnail-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.thumbnail-image:hover::before {
    opacity: 1;
}

/* Thumbnail Carousel Navigation */
.thumbnail-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    color: #666;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
}

.thumbnail-carousel-nav:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0,123,255,0.3);
}

.thumbnail-carousel-prev {
    left: 8px;
}

.thumbnail-carousel-next {
    right: 8px;
}

.thumbnail-carousel-nav i {
    font-size: 14px;
    font-weight: bold;
}

/* Article Details Specific Thumbnail Sizing */
.article-details .thumbnail-carousel .thumbnail-item {
    width: 120px;
    margin-right: 12px;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.article-details .thumbnail-carousel .thumbnail-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.article-details .thumbnail-carousel .thumbnail-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.article-details .thumbnail-carousel .thumbnail-image:hover {
    border-color: #0d6efd;
    opacity: 0.9;
    transform: scale(1.05);
}

.article-details .thumbnail-carousel .thumbnail-image.active {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* ============================================================================
   VIDEO GALLERY STYLES
   ============================================================================ */

.article-details .main-video-container {
    position: relative;
}

.article-details .video-thumbnails-carousel {
    min-height: 80px;
}

.article-details .video-thumb-horizontal {
    flex: 0 0 auto;
    width: 120px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.article-details .video-thumb-horizontal:hover {
    border-color: #0d6efd;
    transform: scale(1.02);
}

.article-details .video-thumb-horizontal.active {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.article-details .video-thumb-horizontal .video-thumb-inner {
    position: relative;
    border-radius: 0.25rem;
    overflow: hidden;
}

.article-details .video-thumb-horizontal .video-thumb-video {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
    filter: contrast(1.05) saturate(1.1);
    -webkit-filter: contrast(1.05) saturate(1.1);
    backface-visibility: hidden;
    transform: translateZ(0);
}

.article-details .video-thumb-horizontal .video-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.5rem;
}

.article-details .video-thumb-horizontal:hover .video-thumb-overlay {
    opacity: 1;
}

/* ============================================================================
   LIGHTBOX MODAL STYLES
   ============================================================================ */

.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    z-index: 10001;
    user-select: none;
}

.lightbox-controls button:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-controls button:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0,0,0,0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Article Details Specific Lightbox Sizing */
.article-details .lightbox-modal .lightbox-content {
    width: 95%;
    max-width: 1400px;
    height: 92%;
}

.article-details #lightboxImage {
    max-width: 95%;
    max-height: 85%;
}

/* ============================================================================
   VIDEO MODAL STYLES
   ============================================================================ */

.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

.video-modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 1000px;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.video-modal-close:hover {
    color: #ccc;
}

.video-modal-info {
    background: #333;
    color: white;
    padding: 15px;
}

/* ============================================================================
   MORE INFO COLLAPSIBLE STYLES
   ============================================================================ */

.more-info-collapsible {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    position: relative;
}

.more-info-collapsible.expanded {
    max-height: none;
}

.more-info-collapsible.has-overflow .more-info-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 1));
    pointer-events: none;
    z-index: 1;
}

/* Dark mode fade effect */
.dark .more-info-collapsible.has-overflow .more-info-fade {
    background: linear-gradient(to bottom, transparent, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 1));
}

.more-info-collapsible.expanded .more-info-fade {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Disable modal backdrop overlay on small screens for notifications modal */
@media (max-width: 768px) {
    .modal-backdrop.show {
        display: none !important;
    }
}

/* ============================================================================
   RESPONSIVE STYLES FOR ARTICLE DETAILS
   ============================================================================ */

@media (max-width: 768px) {
    .article-details .article-title {
        font-size: 1.75rem;
    }

    .thumbnail-carousel-nav {
        width: 32px;
        height: 32px;
    }

    .thumbnail-carousel-nav i {
        font-size: 12px;
    }

    .thumbnail-carousel-prev {
        left: 4px;
    }

    .thumbnail-carousel-next {
        right: 4px;
    }

    .article-details .video-thumb-horizontal {
        width: 100px;
    }

    .article-details .video-thumb-horizontal .video-thumb-video {
        height: 60px;
    }

    .article-details .thumbnail-carousel .thumbnail-item {
        width: 100px;
    }

    .article-details .thumbnail-carousel .thumbnail-image {
        height: 100px;
    }
}

@media (max-width: 576px) {
    .thumbnail-carousel-nav {
        display: none;
    }

    .article-details .video-thumb-horizontal {
        width: 80px;
    }

    .article-details .video-thumb-horizontal .video-thumb-video {
        height: 50px;
    }

    .article-details .thumbnail-carousel .thumbnail-item {
        width: 80px;
    }

    .article-details .thumbnail-carousel .thumbnail-image {
        height: 80px;
    }

    .lightbox-controls button {
        padding: 10px 15px;
        font-size: 18px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}


/* ==========================================================================
   Articles Component Card Styling (Based on articles-card)
   ========================================================================== */

.articles-component-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 0px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);*/
}

.articles-component-card:hover {
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);*/
    transform: translateY(-2px);
}

.articles-component-card-img-top {
    width: 100%;
    height: 160px; /* Mobile height */
    object-fit: cover;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

/* Desktop height for images */
@media (min-width: 992px) {
    .articles-component-card-img-top {
        height: 220px;
    }
}

.articles-component-card-body {
    flex: 1 1 auto;
    padding: 1rem;
}

.articles-component-card-title {
    margin-bottom: 0.5rem;
    color: #212529;
    font-weight: 600;
}

.articles-component-card-text {
    color: #6c757d;
    margin-bottom: 0;
}

.articles-component-card-text:last-child {
    margin-bottom: 0;
}

/* Points of Interest Component - Custom Styling */
.points-of-interest-container .articles-component-card-text {
    display: none !important; /* Hide description in POI cards */
}

/* Fixed height for all POI carousel cards */
.points-of-interest-container .articles-component-card {
    height: 100%;
    min-height: 280px; /* Mobile minimum height */
}

.points-of-interest-container .carousel-cell {
    height: auto;
}

.points-of-interest-container .articles-component-card-body {
    display: flex;
    flex-direction: column;
}

/* Reduce image height for desktop in POI cards */
@media (min-width: 992px) {
    .points-of-interest-container .articles-component-card-img-top {
        height: 150px !important;
    }

    .points-of-interest-container .articles-component-card {
        min-height: 320px; /* Desktop minimum height */
    }
}

/* ============================================================================
   ARTICLE CONTENT LISTS STYLING (UL, OL)
   ============================================================================ */

/* Lists in article content areas */
.article-content ul,
.article-content ol,
.tab-content ul,
.tab-content ol,
.tab-pane ul,
.tab-pane ol,
.more-info-content ul,
.more-info-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
    list-style-position: outside;
}

/* Unordered lists - bullet styles */
.article-content ul,
.tab-content ul,
.tab-pane ul,
.more-info-content ul {
    list-style-type: disc;
}

/* Ordered lists - number styles */
.article-content ol,
.tab-content ol,
.tab-pane ol,
.more-info-content ol {
    list-style-type: decimal;
}

/* List items styling */
.article-content li,
.tab-content li,
.tab-pane li,
.more-info-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
    padding-left: 0.25rem;
}

/* Nested unordered lists */
.article-content ul ul,
.tab-content ul ul,
.tab-pane ul ul,
.more-info-content ul ul {
    list-style-type: circle;
    margin: 0.5rem 0;
}

.article-content ul ul ul,
.tab-content ul ul ul,
.tab-pane ul ul ul,
.more-info-content ul ul ul {
    list-style-type: square;
}

/* Nested ordered lists */
.article-content ol ol,
.tab-content ol ol,
.tab-pane ol ol,
.more-info-content ol ol {
    list-style-type: lower-alpha;
    margin: 0.5rem 0;
}

.article-content ol ol ol,
.tab-content ol ol ol,
.tab-pane ol ol ol,
.more-info-content ol ol ol {
    list-style-type: lower-roman;
}

/* Mixed nested lists */
.article-content ul ol,
.article-content ol ul,
.tab-content ul ol,
.tab-content ol ul,
.tab-pane ul ol,
.tab-pane ol ul,
.more-info-content ul ol,
.more-info-content ol ul {
    margin: 0.5rem 0;
}
