/* Hide the FW3 native article navigation */
.article__navigation {
    display: none !important;
}

.gac-top-pages {
    margin: 2em 0;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gac-top-pages-title {
    margin-bottom: 1em;
    font-size: 1.5em;
    font-weight: 600;
}

.gac-top-pages-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gac-top-page-item {
    margin-bottom: 1.2em;
    padding-bottom: 1.2em;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: flex-start;
    gap: 1em;
}

.gac-top-page-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.gac-page-image {
    flex: 0 0 auto;
    width: 100px;
}

.gac-page-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.gac-page-content {
    flex: 1;
}

/* When no image is shown */
.gac-top-page-item:not(:has(.gac-page-image)) {
    display: block;
}

.gac-page-title {
    display: block;
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 0.3em;
    text-decoration: none;
}

.gac-page-meta {
    font-size: 0.9em;
    color: #666;
}

.gac-page-views,
.gac-page-duration {
    display: inline-block;
}

.gac-page-date {
    color: #666;
}

.gac-page-tags {
    margin-top: 0.5em;
}

.gac-tag {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 4px 4px 0;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 0.85em;
    color: #666;
    text-decoration: none;
}

.gac-tag:hover {
    background: #e0e0e0;
    color: #333;
}

/* Grid Layout */
.gac-posts-list.layout-grid {
    display: grid;
    gap: 20px;
    padding: 1em;
    margin-top: 0;
}

.gac-posts-list.layout-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.gac-posts-list.layout-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.gac-posts-list.layout-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.gac-posts-list.layout-grid .gac-post {
    margin: 0;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
}

.gac-posts-list.layout-grid .gac-post-image {
    margin-bottom: 12px;
    flex: 0 0 auto;
    position: relative;
    padding-top: 56.25%;  /* 16:9 Aspect Ratio (9/16 = 0.5625 = 56.25%) */
    overflow: hidden;
}

.gac-posts-list.layout-grid .gac-post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.gac-posts-list.layout-grid .gac-post-content {
    flex: 1;
}

.gac-posts-list.layout-grid .gac-post-title {
    font-size: 0.85em;
    margin: 0 0 0.5em;
    line-height: 1.4;
}
.gac-posts-list.layout-grid .gac-post-title a {
    color: var(--fw3-link-default);
    text-decoration: none;
}
.gac-posts-list.layout-grid .gac-post-title a:hover {
    color: var(--fw3-link-default-hover);
}

.gac-posts-list.layout-grid .gac-post-meta {
    font-size: 0.65em;
    color: #666;
}

.gac-posts-list.layout-grid .gac-tags {
    margin-top: 0.5em;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
    .gac-posts-list.layout-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gac-posts-list.layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .gac-posts-list.layout-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Base styles */
.gac-title {
    font-size: 1.1em;
    margin: 0;
    padding: 1em;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

/* List Layout Container */
.gac-posts-list {
    list-style: none;
    padding: 1em;
    margin: 0;
}

.gac-posts-list.layout-list .gac-post {
    display: flex;
    gap: 1em;
    margin-bottom: 1em;
    padding-bottom: 1em;
    border-bottom: 1px solid #eee;
}

.gac-posts-list.layout-list .gac-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.gac-posts-list.layout-list .gac-post-image {
    flex: 0 0 80px;
}

.gac-posts-list.layout-list .gac-post-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
}

.gac-posts-list.layout-list .gac-post-content {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.gac-posts-list.layout-list .gac-post-title {
    font-size: 0.85em;
    margin: 0 0 0.3em;
    line-height: 1.3;
}

.gac-posts-list.layout-list .gac-post-title a {
    color: var(--fw3-link-default);
    text-decoration: none;
}

.gac-posts-list.layout-list .gac-post-title a:hover {
    color: var(--fw3-link-default-hover);
}

.gac-posts-list.layout-list .gac-post-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0.3em;
    display: flex;
    gap: 0.8em;
    align-items: center;
}

.gac-posts-list.layout-list .gac-post-views:before {
    content: "•";
    margin-right: 0.8em;
}

.gac-posts-list.layout-list .gac-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-top: 0.3em;
}

.gac-posts-list.layout-list .gac-tag {
    font-size: 0.75em;
    padding: 0.15em 0.6em;
    background: #f0f0f0;
    border-radius: 3px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gac-posts-list.layout-list .gac-tag:hover {
    background: #e0e0e0;
    color: #333;
}

/* Footer styling */
.gac-footer {
    margin: 0;
    padding: 1em;
    text-align: center;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
    border-radius: 0 0 4px 4px;
}

.gac-more-link {
    display: inline-block;
    padding: 0.5em 1.5em;
    background: var(--fw3-link-default);
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 0.85em;
}

.gac-more-link:hover {
    background: var(--fw3-link-default-hover);
    color: #fff;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .gac-posts-list.layout-list .gac-post {
        gap: 0.8em;
    }

    .gac-posts-list.layout-list .gac-post-image img {
        max-height: 160px;
    }
}

/* Bottom Navigation Bar */
.gac-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    z-index: 999;
    border-top: 1px solid rgba(0,0,0,0.08);
    height: 60px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

/* Show the nav when scrolled class is added */
.gac-bottom-nav.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.gac-nav-button {
    flex: 1;
    text-align: center;
}

.gac-nav-button a,
.gac-nav-button button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.gac-nav-button a:hover,
.gac-nav-button button:hover {
    color: #333;
    background: rgba(0,0,0,0.05);
}

.gac-nav-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Center button (Most read) styling */
.gac-nav-button.most-read-toggle {
    flex: 2;
    display: flex;
    justify-content: center;
}

.gac-nav-button.most-read-toggle button {
    background: #f5f5f5;
    padding: 8px 20px;
    border-radius: 20px;
    color: #333;
    font-weight: 500;
}

.gac-nav-button.most-read-toggle button:hover {
    background: #ebebeb;
}

.gac-nav-button.most-read-toggle svg {
    width: 16px;
    height: 16px;
}

/* Previous/Next article buttons */
.gac-nav-button.prev-article,
.gac-nav-button.next-article {
    flex: 1;
    min-width: 100px;
}

.gac-nav-button.prev-article a,
.gac-nav-button.next-article a {
    color: #666;
    font-size: 14px;
}

.gac-nav-button.prev-article svg,
.gac-nav-button.next-article svg {
    width: 18px;
    height: 18px;
}

/* Adjust bottom padding for the page to account for the fixed nav */
body.single {
    padding-bottom: 60px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .gac-nav-button.prev-article span,
    .gac-nav-button.next-article span {
        display: none; /* Hide text on mobile, show only icons */
    }
    
    .gac-nav-button.most-read-toggle button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Sticky Widget Panel */
.gac-sticky-widget {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.gac-sticky-widget.active {
    transform: translateY(0);
}

.gac-sticky-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.gac-sticky-header .gac-sticky-title {
    font-size: 18px;
    font-weight: bold;
}

.gac-sticky-header .gac-close-button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gac-sticky-header .gac-close-button svg {
    width: 24px;
    height: 24px;
    fill: #666;
}

.gac-sticky-header .gac-close-button:hover svg {
    fill: #333;
}

.gac-sticky-content {
    overflow-y: auto;
    padding: 15px 20px;
    flex-grow: 1;
}

.gac-sticky-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 800px; /* Limit width for better readability */
    margin: 0 auto; /* Center the list */
}

.gac-sticky-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.gac-sticky-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.gac-sticky-link {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
}

.gac-sticky-link:hover {
    color: var(--fw3-link-default);
}

.gac-sticky-number {
    font-size: 20px;
    font-weight: bold;
    color: #999;
    min-width: 24px;
    text-align: center;
}

.gac-sticky-text {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    flex: 1;
    padding-right: 20px; /* Add some space from the right edge */
}

/* Mobile adjustments for the top list */
@media (max-width: 480px) {
    .gac-sticky-content {
        padding: 12px 16px;
    }

    .gac-sticky-item {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .gac-sticky-link {
        gap: 15px;
    }

    .gac-sticky-number {
        font-size: 18px;
        min-width: 20px;
    }

    .gac-sticky-text {
        font-size: 14px;
        padding-right: 10px;
    }
}

/* Hide bottom nav on wider screens - maintain animation */
@media (min-width: 1180px) {
    .gac-bottom-nav {
        transform: translateY(100%);
        opacity: 0;
        visibility: hidden;
    }
} 