/* --- BASE & COLOR SCHEME (v68.0 - PAGINATION GOLD) --- */
@font-face {
    font-family: 'Bebas Neue';
    src: url('../fonts/bebas-neue.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --b17-gold: #f2a900;
    --b17-green: #2C5234;
    --b17-dark: #333333;
    --b17-white: #ffffff;
    --b17-bg-light: #eeeeee;
    --b17-sidebar-bg: #f9f9f9;
    --b17-gallery-bg: #777777;
    --b17-gallery-border: #666666;
    
    --font-primary: 'Bebas Neue', sans-serif;
    --font-secondary: 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body { 
    margin: 0; padding: 0; 
    font-family: var(--font-secondary); 
    background: var(--b17-bg-light); 
    overflow-x: hidden; 
}

/* UNIVERSAL IMAGE RULES */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Content Images */
#wrapper img:not([class*="hikashop"]), 
#news-sidebar img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 10px auto; 
    border-radius: 4px; 
}

/* --- HOMEPAGE STYLES --- */
.b17-home-container { width: 100%; max-width: 100%; }
.hero-title { color: var(--b17-green); font-family: var(--font-primary); font-size: 1.7rem; margin-bottom: 0.5rem; text-transform: uppercase; line-height: 1.1; }
.mission-statement { background: #ffffff; border-left: 5px solid var(--b17-green); padding: 15px 20px; font-size: 1.1rem; font-style: italic; color: #444; margin: 20px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.b17-divider { border: 0; border-top: 1px solid #ddd; margin: 40px 0; }

/* BUTTONS */
.btn-primary { display: inline-block; background-color: var(--b17-green); color: #fff !important; padding: 12px 24px; border-radius: 4px; text-decoration: none; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 10px; transition: all 0.2s; text-align: center; box-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.btn-primary:hover { background-color: var(--b17-dark); transform: translateY(-2px); box-shadow: 0 6px 8px rgba(0,0,0,0.25); text-decoration: none; }
.btn-text { color: var(--b17-dark); font-weight: bold; text-decoration: underline; }

/* CARDS */
.appeal-box, .video-card { background: #ffffff; border: 1px solid #e0e0e0; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.video-card { display: flex; align-items: center; gap: 10px; color: var(--b17-green) !important; font-weight: bold; margin-bottom: 10px; transition: transform 0.2s; }
.video-card:hover { transform: translateY(-2px); }

/* GALLERY GRID */
.gallery-grid figure { margin: 0; background: #fff; border: 1px solid #eee; padding: 5px; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); cursor: pointer; transition: transform 0.2s; }
.gallery-grid figure:hover { transform: scale(1.02); }
.gallery-grid img { width: 100%; height: 220px; object-fit: cover; display: block; border-radius: 3px; }
.gallery-grid figcaption { padding: 10px 5px; font-size: 0.9rem; text-align: center; color: #666; line-height: 1.4; }

/* --- FOOTER --- */
#footer-wrapper { background: var(--b17-dark) !important; color: var(--b17-white) !important; padding: 40px 0; margin-top: 40px; border-top: 4px solid var(--b17-green); }
#footer-wrapper .pagewidth { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; text-align: center !important; gap: 15px; }
#footer-wrapper p { margin: 0 auto !important; max-width: 100% !important; }
#footer-wrapper a { color: var(--b17-gold) !important; }
.footer-social-links { display: flex; justify-content: center; gap: 35px; margin-bottom: 10px; }
.footer-social-links a { color: var(--b17-green) !important; font-size: 32px !important; transition: all 0.2s ease-in-out; text-decoration: none; display: inline-block; }
.footer-social-links a:hover { color: var(--b17-gold) !important; transform: scale(1.1); }
a { text-decoration: none; }

/* --- BREADCRUMB --- */
#breadcrumb-container { 
    margin: 0 0 20px 0 !important;
    padding-bottom: 10px !important; 
    border-bottom: 1px solid #eeeeee !important; 
    display: block !important;
    width: 100% !important;
}
#breadcrumb-container ul, 
#breadcrumb-container ol { 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 0 !important; 
    display: flex !important; 
    flex-wrap: wrap !important; 
    align-items: center !important;
    gap: 8px !important; 
}
#breadcrumb-container li { 
    display: flex !important; 
    align-items: center !important; 
    font-size: 13px !important; 
    color: #777777 !important; 
}
#breadcrumb-container li:not(:last-child)::after { 
    content: ">" !important; 
    margin-left: 8px !important; 
    color: #cccccc !important; 
    font-weight: bold !important; 
}
#breadcrumb-container a { 
    color: var(--b17-green) !important; 
    font-weight: bold !important; 
    text-decoration: none !important; 
}

/* TABLES & TEXT */
table, tr, td { border: none !important; }
.item-page table, .mod-custom table { box-shadow: 0 4px 6px rgba(0,0,0,0.1); border-radius: 8px; background: #f9f9f9; margin-bottom: 20px; padding: 10px; }
.item-page p strong, .item-page p b { font-weight: 600; color: #333; }
p { line-height: 1.8; margin-bottom: 1.5rem; }
.well, .card { background: #ffffff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); padding: 20px; }
a { color: #0056b3; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- SIDEBAR --- */
.sidebar-header { background: transparent; color: var(--b17-green); font-family: var(--font-primary); font-size: 1.6rem; margin: 0 0 15px 0; padding-bottom: 5px; text-transform: uppercase; border-bottom: 3px solid var(--b17-green); text-align: center; box-shadow: none; border-radius: 0; }
.b17-sidebar-content { width: 100%; font-size: 0.95rem; }
.sidebar-card { background: #fff; border: 1px solid #ddd; padding: 15px; border-radius: 6px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.sidebar-block { margin-bottom: 20px; }
.center-text { text-align: center; }
.sidebar-divider { border: 0; border-top: 1px dashed #ccc; margin: 20px 0; }
.btn-full { display: block; width: 100%; text-align: center; }
.sidebar-badge { margin: 0 auto; background: #fff; padding: 10px; border: 1px solid #eee; display: inline-block; border-radius: 4px; }
.sidebar-badge img { max-width: 100px; height: auto; margin-bottom: 5px; }
ul.sidebar-checklist { list-style: none; padding: 0; margin: 0; }
ul.sidebar-checklist li { position: relative; padding-left: 20px; margin-bottom: 12px; line-height: 1.3; border-bottom: 1px solid #f0f0f0; padding-bottom: 8px; }
ul.sidebar-checklist li::before { content: '✔'; position: absolute; left: 0; top: 0; color: var(--b17-green); font-size: 1rem; font-weight: bold; }
ul.sidebar-checklist small { display: block; color: #777; font-size: 0.8rem; margin-top: 2px; }

/* --- BLOG STYLING --- */
.blog .item { border-bottom: 2px solid #e0e0e0; padding-bottom: 40px; margin-bottom: 40px; display: flex; flex-direction: row; gap: 30px; }
@media (max-width: 768px) { .blog .item { flex-direction: column; } }
.blog .item-image { flex: 0 0 300px; }
.blog .item-image img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; }
.blog .item-content { flex: 1; display: flex; flex-direction: column; }
.blog .article-info { color: #777; font-size: 0.9rem; margin-bottom: 15px; }
.blog .page-header h1 { font-family: var(--font-primary); font-size: 2.5rem; color: var(--b17-green); text-transform: uppercase; }

/* --- UNIVERSAL REMOVAL: Powered by iCagenda --- */

/* 1. Target the specific link by its web address */
a[href*="icagenda.com"],
a[href*="joomlic.com"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 2. Target the text container that might remain */
.ic-copyright, 
div[class*="copyright"] {
    display: none !important;
    font-size: 0 !important;
    color: transparent !important;
}

/* 3. Target any specific logo images/icons associated with it */
img[alt*="iCagenda"],
img[src*="icagenda"] {
    display: none !important;
}

/* --- THE "TEXT CRUSHER" FIX --- */

/* 1. Target the copyright container */
.ic-copyright, 
.ic_copyright,
#icagenda .copyright {
    font-size: 0 !important;       /* Shrinks "Powered by" to invisible dot */
    line-height: 0 !important;     /* Removes vertical space */
    color: transparent !important; /* Makes text invisible just in case */
    display: none !important;      /* Tries to remove it entirely */
}

/* 2. Modern Browser Fix (The "Parent Hunter") */
div:has(> a[href*="icagenda.com"]) {
    display: none !important;
}

/* --- PAGINATION COMPLETE SYSTEM (v68.0) --- */
/* Replaces all previous pagination rules */

.pagination {
    display: flex;
    flex-wrap: wrap;           
    justify-content: center;
    align-items: center;      
    gap: 6px;                  
    margin: 30px 0;
    padding-left: 0;
    list-style: none;
}

.pagination li {
    margin: 0;
    padding: 0;
}

/* The Button Container */
/* Uses Flexbox to perfectly center everything (numbers & icons) */
.pagination li a, 
.pagination li span {
    display: flex;             /* 1. Center the content box */
    align-items: center;       /* 2. Vertically center the inner span/text */
    justify-content: center;   /* 3. Horizontally center */
    min-width: 42px;           
    height: 42px;              /* Fixed height is crucial for alignment */
    padding: 0 10px;
    background: #fff;
    border: 1px solid #ddd;
    color: var(--b17-green);
    font-size: 16px;           
    line-height: 1;            /* Reset line height to prevent offset */
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* --- ACTIVE PAGE (GOLD) --- */
.pagination li.active span,
.pagination li.active .page-link {
    background-color: var(--b17-gold) !important; /* Gold Background */
    color: var(--b17-green) !important;        /* Green Text for contrast */
    border-color: var(--b17-gold) !important;
    font-weight: 900 !important;               /* Extra Bold */
    transform: scale(1.05);                    /* Make it slightly larger */
    z-index: 5;                                /* Ensure it sits on top */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);     /* subtle drop shadow */
    cursor: default;                           /* Shows it's not clickable */
}

/* --- HOVER STATE (GREEN) --- */
.pagination li:not(.active) a:hover,
.pagination li:not(.active) .page-link:hover {
    background-color: var(--b17-green);
    color: var(--b17-white) !important;
    border-color: var(--b17-green);
}

/* --- DISABLED STATE --- */
.pagination li.disabled span,
.pagination li.disabled .page-link {
    color: #ccc;
    background: #f9f9f9;
    border-color: #eee;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- ICON MAPPING & ALIGNMENT --- */

/* 1. TARGET THE ICON SPAN ITSELF (Double Flex Fix) */
/* This forces the icon glyph to center inside its own span */
.pagination [class^="icon-"],
.pagination [class*=" icon-"] {
    display: flex !important;       /* FORCE Flexbox on the icon wrapper */
    align-items: center !important; /* Force Vertical Center */
    justify-content: center !important;
    height: 100%;                   /* Fill the parent button height */
    width: auto;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal;
    font-size: 16px;       
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* 2. Map the Icon Content (The Arrows) */
.pagination .icon-angle-right::before, .pagination .icon-next::before { content: "\f105"; } 
.pagination .icon-angle-double-right::before, .pagination .icon-last::before { content: "\f101"; } 
.pagination .icon-angle-left::before, .pagination .icon-prev::before { content: "\f104"; } 
.pagination .icon-angle-double-left::before, .pagination .icon-first::before { content: "\f100"; } 

/* 3. Text Fallback Adjustments */
/* Adds spacing if the button has both text ("Start") and an icon */
.pagination .pagination-next a::after,
.pagination .pagination-end a::after {
    margin-left: 6px; 
}
.pagination .pagination-prev a::before,
.pagination .pagination-start a::before {
    margin-right: 6px; 
}

/* Mobile Cleanup */
@media (max-width: 900px) {
    .pagination .pagination-start, 
    .pagination .pagination-end {
        display: none;
    }
}
