/* Skeleton Loading Styles */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes skeleton-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Skeleton specific elements */
.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

.skeleton-title {
    height: 1.5em;
    margin-bottom: 1em;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
}

.skeleton-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-button {
    height: 2.5em;
    width: 100px;
    border-radius: 4px;
}

/* Skeleton carousel items */
.skeleton-carousel-item {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-carousel-image {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Skeleton news items */
.skeleton-news-item {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-news-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Skeleton member items */
.skeleton-member-item {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

/* Skeleton menu cards */
.skeleton-menu-card {
    background: #097969;
    border-radius: 20px;
    padding: 30px;
    margin: 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.skeleton-menu-icon {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.skeleton-menu-title {
    height: 1.5em;
    width: 80px;
    margin-bottom: 0.5rem;
}

.skeleton-menu-description {
    height: 1em;
    width: 120px;
}

/* Skeleton container */
.skeleton-container {
    display: none;
}

.skeleton-container.show {
    display: block;
}

/* Hide content when skeleton is showing */
.content-hidden {
    display: none !important;
}

/* Smooth transitions */
.skeleton-container,
.content-hidden {
    transition: opacity 0.3s ease-in-out;
}

/* Better skeleton appearance */
.skeleton {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive skeleton adjustments */
@media (max-width: 576px) {
    .skeleton-menu-card {
        padding: 20px;
        margin: 10px;
    }
    
    .skeleton-menu-icon {
        width: 50px;
        height: 50px;
    }
    
    .skeleton-menu-title {
        width: 60px;
    }
    
    .skeleton-menu-description {
        width: 100px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skeleton-image {
        height: 150px;
    }
    
    .skeleton-news-image {
        height: 150px;
    }
    
    .skeleton-carousel-image {
        height: 120px;
    }
}

/* Dark theme adjustments for existing dark sections */
[style*="background-color: #222529"] .skeleton,
[style*="background-color: #191b1d"] .skeleton {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
}

[style*="background-color: #222529"] .skeleton::before,
[style*="background-color: #191b1d"] .skeleton::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Skeleton for trending news carousel */
.skeleton-trending-item {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-trending-image {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Skeleton for popular news section */
.skeleton-popular-news {
    background: #191b1d;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #333;
}

.skeleton-popular-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* Skeleton for latest news section */
.skeleton-latest-news {
    background: #222529;
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.skeleton-latest-image {
    width: 100%;
    height: 250px;
    border-radius: 20px;
    margin-bottom: 1rem;
}

/* Skeleton for visitor counter */
.skeleton-visitor-counter {
    background: #191b1d;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.skeleton-counter-number {
    height: 3em;
    width: 200px;
    margin: 0 auto 1rem;
}

.skeleton-counter-label {
    height: 1.5em;
    width: 150px;
    margin: 0 auto;
}

/* Calendar specific styles */
#calendar {
    min-height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

#calendar .fc-toolbar {
    margin-bottom: 1rem;
}

#calendar .fc-day-header {
    padding: 0.5rem;
}

#calendar .fc-day {
    min-height: 80px;
}

/* Calendar loading state */
#calendar.loading {
    opacity: 0.7;
    pointer-events: none;
}

#calendar.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #097969;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Gallery marquee styles */
.gallery-foto {
    overflow: hidden;
    white-space: nowrap;
}

.style-gallery-foto {
    display: inline-block;
    white-space: nowrap;
}

.style-gallery-foto img {
    display: inline-block;
    margin-right: 1rem;
    vertical-align: top;
}

.style-gallery-parlementaria {
    display: inline-block;
    white-space: nowrap;
}

.style-gallery-parlementaria a {
    display: inline-block;
    margin-right: 1rem;
    text-decoration: none;
    color: inherit;
}

/* Ensure marquee is always visible and functional */
marquee {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Skeleton for gallery parlementaria items */
.skeleton-gallery-parlementaria-item {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}


