/**
 * Categories Viewer Styles
 * Because even chaos needs to look good
 * 
 * @author Your CSS Magician
 * @copyright (c) 2024 Baby in Brazil - Making the web prettier, one pixel at a time
 * @version 1.0.0
 * @license MIT - Use it, break it, fix it, but don't blame us
 */

:root {
    /* Colors - because life is not just black and white */
    --color-white-90: rgba(255, 255, 255, 0.9);
    --color-white-95: rgba(255, 255, 255, 0.95);
    --color-shadow-10: rgba(0, 0, 0, 0.1);
    --color-shadow-15: rgba(0, 0, 0, 0.15);
    --color-gradient-start: #f5f7fa;
    --color-gradient-end: #e4e8eb;
    
    /* Component specific - making things look fancy */
    --footer-bg: var(--color-white-90);
    --footer-border: var(--bs-border-color);
    --footer-text: var(--bs-gray-600);
    --social-hover: var(--bs-primary);
    --modal-bg: var(--color-white-95);
    
    /* Sizes - because size matters (that's what she said) */
    --category-icon-size: 80px;
    --subcategory-icon-size: 80px;
    --modal-image-max-height: 80vh;
    --modal-preview-max-height: 70vh;
    --modal-preview-min-height: 256px;
    
    /* Transitions - smooth like butter */
    --transition-base: 0.3s ease-in-out;
}

/* Base styles - keeping it grounded */
body {
    background: linear-gradient(135deg, var(--color-gradient-start) 0%, var(--color-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Icons - the tiny heroes of our UI */
.category-icon,
.subcategory-icon {
    width: var(--category-icon-size);
    height: var(--category-icon-size);
    margin-right: 10px;
    padding: 4px;
    border-radius: 8px;
    background-color: var(--bs-gray-100);
    cursor: pointer;
    transition: var(--bs-transition);
}

/* Hover effects - because static is boring */
.category-icon:hover,
.subcategory-icon:hover {
    transform: scale(1.2);
    background-color: var(--bs-gray-200);
}

/* Subcategory specifics - the rebellious children */
.subcategory-icon {
    width: var(--subcategory-icon-size) !important;
    height: var(--subcategory-icon-size) !important;
    padding: 8px !important;
}

/* Icon container - keeping the family together */
.subcategory-icons-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Category blocks - where the magic happens */
.category-header {
    background-color: var(--bs-primary-bg-subtle);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.category-block {
    background: var(--bs-light);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--bs-transition);
}

/* Hover animations - making things pop */
.category-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--bs-box-shadow);
}

/* List items - keeping things organized */
.list-group-item {
    --bs-list-group-border-width: 0;
    --bs-list-group-border-radius: 0.5rem;
    --bs-list-group-item-padding-x: 1rem;
    --bs-list-group-item-padding-y: 0.75rem;
    margin-bottom: 0.5rem;
    transition: var(--bs-transition);
}

.list-group-item:hover {
    background-color: var(--bs-gray-100);
    transform: translateX(5px);
}

/* Subcategory items - the cool kids on the block */
.subcategory-item {
    transition: all 0.3s ease;
    border: 1px solid var(--bs-border-color);
    min-width: 200px;
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    gap: 0.75rem;
}

.subcategory-item:hover {
    background-color: var(--bs-gray-200) !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px var(--color-shadow-10);
}

.subcategory-item span {
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--bs-gray-700);
}

/* Language switcher - for the polyglots among us */
#languageSwitcher {
    --bs-border-radius: 20px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid var(--bs-border-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Page structure - the backbone of our design */
.page-header {
    border-bottom: 2px solid var(--bs-border-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Footer - where dreams come to rest */
.footer {
    margin-top: auto;
    padding: 2rem 0;
    background: var(--footer-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--footer-border);
    transition: background var(--transition-base);
}

.footer:hover {
    background: var(--color-white-95);
}

.footer-content {
    font-size: 0.9rem;
    color: var(--footer-text);
    line-height: 1.6;
}

/* Social links - spreading the love */
.social-links {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.social-links a {
    position: relative;
    padding: 0.5rem;
    color: var(--footer-text);
    transition: all var(--transition-base);
}

/* Social hover effects - the party tricks */
.social-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 15%;
    background: currentColor;
    opacity: 0.1;
    transform: scale(0);
    transition: transform var(--transition-base);
}

.social-links a:hover {
    color: var(--social-hover);
    transform: translateY(-2px);
}

.social-links a:hover::after {
    transform: scale(1);
}

/* Modal - our premium viewing experience */
.modal-content {
    background: var(--modal-bg);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem var(--color-shadow-15);
}

.modal-header {
    padding: 1rem 1.5rem;
    background-color: var(--bs-gray-100);
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: calc(1rem - 1px) calc(1rem - 1px) 0 0;
}

.modal-title {
    font-size: 1.25rem;
    color: var(--bs-gray-800);
    font-weight: 500;
}

.modal-body {
    padding: 1.5rem;
    background-color: var(--bs-white);
    border-radius: 0 0 1rem 1rem;
}

/* Modal images - making them look good */
#modalImage,
.modal-preview-image {
    max-height: var(--modal-image-max-height);
    object-fit: contain;
    padding: 1rem;
    display: block;
    margin: 1rem auto;
}

.modal-preview-image {
    max-width: 100%;
    min-height: var(--modal-preview-min-height);
    max-height: var(--modal-preview-max-height);
}

/* Close button - saying goodbye with style */
.btn-close {
    background-color: var(--bs-gray-200);
    opacity: 1;
    padding: 0.5rem;
    margin: 0.5rem;
    border-radius: 50%;
}

.btn-close:hover {
    background-color: var(--bs-gray-300);
}
