/*
Theme Name: OneClash GP Child
Theme URI: https://clashofclansbase.com
Description: Ultra-fast custom GeneratePress child theme for OneClash.
Author: Your Name
Template: generatepress
Version: 1.0.0
*/

/* =========================================
   1. VARIABLES & BASE
   ========================================= */
:root {
  --brand-green: #3b9b4a;
  --bg-light: #f8f9fa;
  --text-dark: #334155;
  --text-muted: #6c757d;
  --border-color: #e2e8f0;
}
body { font-family: 'Roboto', sans-serif; background-color: #f5f5f5; margin: 0; color: #333; }
a { text-decoration: none; color: inherit; }
img, svg { vertical-align: middle; max-width: 100%; height: auto; }

/* =========================================
   2. MICRO-UTILITIES (Replaces Bootstrap)
   ========================================= */
.w-100 { width: 100%; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 1rem; }
.m-0 { margin: 0 !important; } .mb-2 { margin-bottom: 0.5rem !important; } .mb-3 { margin-bottom: 1rem !important; } .mb-4 { margin-bottom: 1.5rem !important; } .mt-3 { margin-top: 1rem !important; } .mx-auto { margin: left auto; margin-right: auto; }
.p-0 { padding: 0 !important; } .p-2 { padding: 0.5rem !important; } .p-3 { padding: 1rem !important; }
.text-center { text-align: center !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--brand-green) !important; }
.text-secondary { color: #6c757d !important; }
.text-white { color: #fff !important; }
.fw-bold { font-weight: 700 !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }
.rounded-4 { border-radius: 12px !important; }
.rounded-pill { border-radius: 50rem !important; }
.shadow-sm { box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important; }
.border { border: 1px solid var(--border-color) !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-end { border-right: 1px solid var(--border-color) !important; }
.btn { cursor: pointer; border: none; background: transparent; transition: all 0.2s; }
.btn-light { background-color: #fff; color: var(--text-dark) !important; }

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    .flex-lg-row { flex-direction: row !important; }
    .text-lg-start { text-align: left !important; }
}

/* =========================================
   3. NATIVE CSS GRID (Layout)
   ========================================= */
.oc-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.oc-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    padding: 20px 0;
}
@media (min-width: 768px) { .oc-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 992px) { .oc-grid { grid-template-columns: repeat(4, 1fr); } }

.oc-card { 
    background: #fff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    transition: transform 0.2s; position: relative; display: flex; flex-direction: column; border: 1px solid #e2e8f0;
}
.oc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }

.oc-card-full {
    grid-column: 1 / -1; width: 100%;
}

/* =========================================
   4. NATIVE CSS SCROLL SNAP (Replaces Slick)
   ========================================= */
.oc-slider-wrapper { position: relative; border-radius: 12px 12px 0 0; overflow: hidden; }
.oc-image-slider {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -ms-overflow-style: none; background: #e2e8f0;
}
.oc-image-slider::-webkit-scrollbar { display: none; }
.oc-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
.oc-slide img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #e2e8f0; }

.slider-counter {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    background: rgba(0,0,0,0.6); color: #fff; font-size: 11px;
    padding: 3px 8px; border-radius: 20px; font-weight: bold; pointer-events: none;
}

/* =========================================
   5. COMPONENTS (Filters, Stars, Pagination)
   ========================================= */
.btn-filter-active { background-color: var(--brand-green) !important; color: #fff !important; border-color: var(--brand-green) !important; }
.filter-chip {
    font-size: 0.85rem; font-weight: 600; padding: 0.35rem 0.9rem; border-radius: 50px; 
    background-color: #fff; border: 1px solid #d1d5db; color: var(--text-dark); display: inline-flex; align-items: center;
}
.theme-toggle-switch { position: relative; display: inline-block; width: 52px; height: 28px; }
.theme-toggle-switch input { opacity: 0; width: 0; height: 0; }
.theme-toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1; transition: .3s; border-radius: 34px;
}
.theme-toggle-slider:before {
    position: absolute; content: ""; height: 22px; width: 22px; left: 3px; bottom: 3px;
    background-color: white; transition: .3s; border-radius: 50%;
}
.theme-toggle-switch input:checked + .theme-toggle-slider { background-color: var(--brand-green); }
.theme-toggle-switch input:checked + .theme-toggle-slider:before { transform: translateX(24px); }

/* Interactive Stars (Zero HTTP Requests) */
.star-rating {
    font-size: 0; white-space: nowrap; display: inline-block; width: 120px;
    overflow: hidden; position: relative; height: 24px;
    /* Empty Stars SVG */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e2e8f0'%3e%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3e%3C/svg%3e") repeat-x;
    background-size: 24px 24px;
}
.star-rating i {
    opacity: 0; position: absolute; left: 0; top: 0; height: 100%; width: 20%; z-index: 1;
    /* Filled Stars SVG */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffc107'%3e%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3e%3C/svg%3e") repeat-x;
    background-size: 24px 24px;
}
.star-rating input { -webkit-appearance: none; opacity: 0; display: inline-block; width: 20%; height: 100%; margin: 0; padding: 0; z-index: 2; position: relative; cursor: pointer; }
.star-rating input:checked+i, .star-rating input:hover+i { opacity: 1; }
.star-rating i~i { width: 40%; } .star-rating i~i~i { width: 60%; } .star-rating i~i~i~i { width: 80%; } .star-rating i~i~i~i~i { width: 100%; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 30px 0; }
.pagination .page-numbers {
    display: inline-flex; justify-content: center; align-items: center; min-width: 38px; height: 38px;
    background: #fff; color: var(--text-dark); font-weight: 500; border: 1px solid var(--border-color);
    border-radius: 50px; transition: all 0.2s;
}
.pagination .page-numbers.current { background: var(--brand-green); color: #fff; border-color: var(--brand-green); }

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.interlinks-section a {
    transition: all 0.2s ease;
    font-weight: 500;
}

.interlinks-section a:hover {
    background: var(--brand-green) !important;
    color: white !important;
    border-color: var(--brand-green) !important;
}

/* =========================================
   6. SINGLE BASE PAGE SPECIFICS (1:1 Replica)
   ========================================= */
.single-container { max-width: 970px; margin: 0 auto; padding: 0 15px; }

/* Header & Content */
.single-container h1 { font-size: 1.8rem; font-weight: 700; margin: 15px 0; }
.single-container .entry-content { font-size: 1rem; color: #495057; line-height: 1.6; margin-bottom: 20px; }

/* Image Gallery */
.single-gallery-wrapper { position: relative; margin-bottom: 20px; border-radius: 8px; overflow: hidden; background: #f8f9fa; border: 1px solid #e2e8f0; }
.oc-slide img { width: 100%; height: auto; display: block; } /* Removed forced aspect ratio to fix gray bars */
.zoom-icon { position: absolute; bottom: 15px; right: 15px; width: 36px; height: 36px; z-index: 2; pointer-events: none; background: rgba(0,0,0,0.5); border-radius: 50%; padding: 8px; }

/* Stats Bar */
.coc-stats-container { display: flex; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 20px; background: #fff; }
.coc-stat-box { flex: 1; text-align: center; padding: 12px 5px; border-right: 1px solid #e2e8f0; }
.coc-stat-box:last-child { border-right: none; }
.coc-stat-box svg { margin-bottom: 2px; }

/* Rating & Share Row */
.rating-share-row { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
@media (min-width: 768px) { 
    .rating-share-row { flex-direction: row; justify-content: space-between; align-items: center; } 
}
.social-share-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* Promos Grid */
.oc-promos-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin-bottom: 20px; }
@media (min-width: 768px) { 
    .oc-promos-grid { grid-template-columns: 1fr 1fr; } /* Forces side-by-side on desktop */
}
.promo-box { border-radius: 12px; border: 1px solid #e2e8f0; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; text-align: center; height: 100%; }

/* Big Green Download Button */
.coc-btn-main { 
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; 
    background-color: var(--brand-green) !important; /* Forces the green color */
    color: #ffffff !important; 
    padding: 14px 30px; border-radius: 8px; font-weight: 700; font-size: 1.1rem; 
    text-decoration: none; box-shadow: 0 4px 10px rgba(59, 155, 74, 0.3); 
    border: none; transition: transform 0.2s, box-shadow 0.2s; 
}
.coc-btn-main:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(59, 155, 74, 0.4); color: #ffffff !important; }

/* =========================================
   7. FORCE NO SIDEBAR & TAG STYLING
   ========================================= */
/* Override GeneratePress Default Sidebar */
body.single-base #right-sidebar, 
body.single-base .sidebar { 
    display: none !important; 
}
body.single-base #primary,
body.single-base .content-area { 
    width: 100% !important; 
    float: none !important; 
}

/* Level Specific Tags (Blue/Black) */
.level-tag { 
    color: #fff !important; 
    border-radius: 5px; 
    padding: 6px 12px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    text-decoration: none; 
    transition: opacity 0.2s; 
    white-space: nowrap; 
}
.level-tag:hover { opacity: 0.8; }
.blue-tag { background-color: #0d6efd; }
.dark-tag, .black-tag { background-color: #212529; }

/* Global Level Tags (Grey) */
.global-tag { 
    background-color: #f8f9fa; 
    border: 1px solid #dee2e6; 
    color: #495057 !important; 
    border-radius: 4px; 
    padding: 6px 14px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    text-decoration: none; 
    transition: background 0.2s; 
    white-space: nowrap; 
}
.global-tag:hover { background-color: #e9ecef; }