/* ============================================
   VARIABLES - UNIFORM COLOR THEME
   ============================================ */
:root {
    /* Primary Brand Colors */
    --primary-orange: #F39200;
    --primary-green: #009640;
    --primary-blue: #1D2B59;
    
    /* Gradients */
    --gradient-orange: linear-gradient(135deg, #F39200, #FFB347);
    --gradient-green: linear-gradient(135deg, #009640, #00C853);
    --gradient-blue: linear-gradient(135deg, #1D2B59, #2A3F7E);
    --gradient-mixed: linear-gradient(135deg, #F39200, #009640, #1D2B59);
    
    /* Variations */
    --orange-light: #FFB347;
    --orange-dark: #D47800;
    --green-light: #00C853;
    --green-dark: #007A33;
    --blue-light: #2A3F7E;
    --blue-dark: #142045;
    
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(29, 43, 89, 0.15);
    --box-shadow-hover: 0 15px 40px rgba(243, 146, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   UNIFORM ICONS
   ============================================ */
.ph-si {
    width: 1.5em;
    height: 1.5em;
    margin: 0 0.25em;
    fill: currentColor;
    transition: var(--transition);
}

.ph-si:hover {
    transform: scale(1.1) translateY(-2px);
}

/* Uniform Icon Colors */
.ph-si-feed { 
    color: var(--primary-orange);
    filter: drop-shadow(0 2px 4px rgba(243, 146, 0, 0.3));
}

.ph-si-image { 
    color: var(--primary-blue);
    margin-bottom: 0.3em;
    filter: drop-shadow(0 2px 4px rgba(29, 43, 89, 0.3));
}

.ph-si-tab.ph-si-image { 
    color: var(--primary-blue);
}

.ph-si-category { 
    color: var(--primary-orange);
    margin-bottom: 0.3em;
    filter: drop-shadow(0 2px 4px rgba(243, 146, 0, 0.3));
}

.ph-si-star { 
    color: var(--primary-orange);
    filter: drop-shadow(0 2px 4px rgba(243, 146, 0, 0.3));
}

.ph-si-comment { 
    color: var(--primary-blue);
}

.ph-si-upload { 
    color: var(--primary-green);
}

.ph-si-upload-multiple { 
    color: var(--primary-blue);
}

.ph-si-earth { 
    color: var(--primary-green);
}

.ph-si-stats { 
    color: var(--primary-orange);
}

.ph-si-ytb { 
    color: #ff0000;
}

.ph-si-trash { 
    color: #ff0000;
}

.ph-si-enabled { 
    color: var(--primary-green);
}

.ph-si-disabled { 
    color: #ff0000;
}

/* ============================================
   UNIFORM GRID LAYOUT
   ============================================ */
.pg-categories-items-box,
.pg-category-items-box {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

@media only screen and (max-width: 768px) {
    .pg-categories-items-box,
    .pg-category-items-box {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }
}

/* ============================================
   ELEGANT CARDS
   ============================================ */
.pg-item-box,
.pg-category-box {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(243, 146, 0, 0.1);
}

.pg-item-box:hover,
.pg-category-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: rgba(243, 146, 0, 0.3);
}

/* Colorful Border Bottom */
.pg-item-box::after,
.pg-category-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-mixed);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.pg-item-box:hover::after,
.pg-category-box:hover::after {
    transform: scaleX(1);
}

/* Image Container */
.pg-category-box-image svg,
.pg-detail-item-image-box img,
.pg-item-box-image img,
.pg-item-box-image svg,
.pg-category-box-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.pg-item-box:hover .pg-item-box-image img,
.pg-category-box:hover .pg-category-box-image img {
    transform: scale(1.05);
}

/* Overlay Effect */
.pg-item-box-image {
    position: relative;
    overflow: hidden;
}

.pg-item-box-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(243, 146, 0, 0.2) 0%,
        rgba(0, 150, 64, 0.2) 50%,
        rgba(29, 43, 89, 0.2) 100%);
    opacity: 0;
    transition: var(--transition);
}

.pg-item-box:hover .pg-item-box-image::after {
    opacity: 1;
}

/* ============================================
   TITLE STYLING
   ============================================ */
.pg-item-box-title,
.pg-category-box-title {
    font-weight: bold;
    font-size: 1rem;
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pg-item-box-title a,
.pg-category-box-title a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
    position: relative;
}

.pg-item-box-title a:hover,
.pg-category-box-title a:hover {
    color: var(--primary-orange);
}

/* Underline Animation */
.pg-item-box-title a::after,
.pg-category-box-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-orange);
    transition: width 0.3s ease;
}

.pg-item-box-title a:hover::after,
.pg-category-box-title a:hover::after {
    width: 100%;
}

/* ============================================
   LABELS & BADGES
   ============================================ */
.pg-category-box-label-box {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    display: flex;
    gap: 0.5rem;
}

.pg-category-box-label-new,
.pg-category-box-label-hot {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
}

.pg-category-box-label-new {
    background: var(--gradient-green);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 150, 64, 0.3);
}

.pg-category-box-label-hot {
    background: var(--gradient-orange);
    color: white;
    box-shadow: 0 2px 8px rgba(243, 146, 0, 0.3);
}

.pg-category-box-count {
    background: var(--gradient-blue);
    color: white;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ============================================
   ICON BOXES
   ============================================ */
.pg-item-box-icons-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pg-item-box-icons-box svg.ph-si {
    background: rgba(29, 43, 89, 0.7);
    border-radius: 50%;
    padding: 0.3em;
    margin: 0;
    color: white;
    transition: var(--transition);
}

.pg-item-box-icons-box svg.ph-si:hover {
    background: var(--primary-orange);
    transform: scale(1.1);
}

.pg-item-box-stats-value {
    font-size: 0.8rem;
    color: var(--primary-green);
    font-weight: 600;
}

/* ============================================
   RATING STARS
   ============================================ */
.pg-categories-box-rating,
.pg-category-box-rating {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.ph-si-star {
    color: var(--primary-orange);
}

/* ============================================
   PAGINATION
   ============================================ */
.com_phocagallery .pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    margin: 2rem 0;
}

.com_phocagallery .pagination .page-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    color: var(--primary-blue);
    transition: var(--transition);
    background: white;
}

.com_phocagallery .pagination .page-link:hover {
    background: var(--primary-orange);
    color: white;
    transform: translateY(-2px);
    border-color: var(--primary-orange);
}

.com_phocagallery .pagination .active .page-link {
    background: var(--gradient-blue);
    color: white;
    border-color: var(--primary-blue);
}

.com_phocagallery .form-select {
    width: auto;
    margin: 0 0.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.5rem;
    color: var(--primary-blue);
}

/* ============================================
   MODAL STYLING
   ============================================ */
#pgCategoryModal .modal-dialog {
    height: 90%;
    max-width: 70%;
}

#pgCategoryModal .modal-content {
    height: 100%;
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

#pgCategoryModal .modal-header {
    background: var(--gradient-blue);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

#pgCategoryModalLabel {
    text-transform: capitalize;
    font-weight: 600;
}

#pgCategoryModal .btn-close {
    filter: brightness(0) invert(1);
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.ph-lds-ellipsis div {
    background: var(--primary-orange);
}

@keyframes ph-lds-ellipsis1 {
    0% { transform: scale(0); background: var(--primary-orange); }
    100% { transform: scale(1); background: var(--primary-green); }
}

@keyframes ph-lds-ellipsis3 {
    0% { transform: scale(1); background: var(--primary-green); }
    100% { transform: scale(0); background: var(--primary-orange); }
}

/* ============================================
   ADMIN TABLE
   ============================================ */
.ph-adminlist {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.ph-adminlist tr th {
    background: var(--gradient-blue);
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
}

.ph-adminlist tr td {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    transition: var(--transition);
}

.ph-adminlist tr:hover td {
    background: rgba(243, 146, 0, 0.05);
}

.ph-adminlist-select-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* ============================================
   BUTTONS & NAVIGATION
   ============================================ */
.ph-si-next-btn,
.ph-si-prev-btn {
    color: white;
    background: var(--gradient-orange);
    border-radius: 50%;
    transition: var(--transition);
}

.ph-si-next-btn:hover,
.ph-si-prev-btn:hover {
    background: var(--gradient-green);
    transform: scale(1.1);
}

.ph-si-category-top-category { 
    color: var(--primary-orange); 
    margin-bottom: 0.3em;
}

.ph-si-category-top-back { 
    color: var(--primary-orange); 
    margin-bottom: 0.3em;
}

.ph-si-detail-top-back {
    color: var(--primary-orange); 
    margin-bottom: 0.3em; 
    width: 3em;
    height: 3em;
}

/* ============================================
   CATEGORY ITEMS
   ============================================ */
.ph-si-category-medium { 
    color: var(--primary-orange); 
    background: #FFF3E0;
    border-radius: 8px;
    padding: 0.5rem;
}

.ph-si-back-medium { 
    color: var(--primary-blue); 
    background: #E8EEF5;
    border-radius: 8px;
    padding: 0.5rem;
}

.ph-si-lock-medium { 
    color: #999; 
    background: #f0f0f0;
    border-radius: 8px;
    padding: 0.5rem;
}

/* ============================================
   SVG CONTAINER
   ============================================ */
.pg-svg-box svg {
    padding: 2.5em;
    margin: 0;
    transition: var(--transition);
}

.pg-svg-box svg:hover {
    transform: scale(1.02);
}

.ph-si-tab {
    width: 1.1em;
    height: 1.1em;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media only screen and (max-width: 768px) {
    .com_phocagallery form > .pagination,
    .com-phocagallery form > .pagination {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    #pgCategoryModal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .pg-adminlist {
        font-size: 0.85rem;
    }
    
    .pg-adminlist tr th,
    .pg-adminlist tr td {
        padding: 0.5rem;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-orange);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-green);
}

/* ============================================
   EXTRA TOUCHES
   ============================================ */
#phocagallery {
    margin-bottom: 1em;
}

.pg-item-box-info,
.pg-category-box-info {
    padding: 0.75rem;
}

.pg-item-box-title:first-letter,
.pg-category-box-title:first-letter {
    text-transform: capitalize;
}