/**
 * HPBC Quick Link Widget Styles
 * 
 * @package HPBC_Custom_Plugin
 * @since 1.0.0
 */

/* Widget Container */
.hpbc-quicklinks-widget {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Widget Title */
.hpbc-quicklinks-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 30px 0;
    color: #333333;
    text-align: left;
}

/* Grid Container */
.hpbc-quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

/* Quick Link Card */
.hpbc-quicklink-card {
    display: block;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.hpbc-quicklink-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.hpbc-quicklink-card:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Card Icon */
.hpbc-quicklink-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 24px;
    color: #3b82f6;
    margin-bottom: 15px;
    line-height: 1;
}

.hpbc-quicklink-icon i,
.hpbc-quicklink-icon svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.hpbc-quicklink-icon svg {
    fill: currentColor;
}

/* Card Title */
.hpbc-quicklink-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px 0;
    color: #333333;
    transition: color 0.3s ease;
}

.hpbc-quicklink-card:hover .hpbc-quicklink-card-title {
    color: #3b82f6;
}

/* Card Description */
.hpbc-quicklink-card-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #666666;
    margin: 0;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hpbc-quicklinks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .hpbc-quicklinks-title {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }
    
    .hpbc-quicklink-card {
        padding: 20px 16px;
    }
}

@media (max-width: 768px) {
    .hpbc-quicklinks-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hpbc-quicklinks-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .hpbc-quicklink-card {
        padding: 18px 16px;
    }
    
    .hpbc-quicklink-card-title {
        font-size: 1.125rem;
    }
    
    .hpbc-quicklink-icon {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .hpbc-quicklink-icon i,
    .hpbc-quicklink-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .hpbc-quicklinks-title {
        font-size: 1.375rem;
        margin-bottom: 16px;
    }
    
    .hpbc-quicklink-card {
        padding: 16px 14px;
    }
    
    .hpbc-quicklink-card-title {
        font-size: 1rem;
    }
    
    .hpbc-quicklink-card-description {
        font-size: 0.8125rem;
    }
}

/* Animation Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hpbc-quicklink-card {
    animation: fadeInUp 0.6s ease-out;
}

.hpbc-quicklink-card:nth-child(1) { animation-delay: 0.1s; }
.hpbc-quicklink-card:nth-child(2) { animation-delay: 0.2s; }
.hpbc-quicklink-card:nth-child(3) { animation-delay: 0.3s; }
.hpbc-quicklink-card:nth-child(4) { animation-delay: 0.4s; }
.hpbc-quicklink-card:nth-child(5) { animation-delay: 0.5s; }
.hpbc-quicklink-card:nth-child(6) { animation-delay: 0.6s; }

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hpbc-quicklink-card {
        border: 2px solid #000000;
    }
    
    .hpbc-quicklink-card:hover {
        border-color: #3b82f6;
    }
    
    .hpbc-quicklink-card-title {
        color: #000000;
    }
    
    .hpbc-quicklink-card-description {
        color: #333333;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .hpbc-quicklink-card {
        animation: none;
        transition: none;
    }
    
    .hpbc-quicklink-card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .hpbc-quicklinks-grid {
        display: block;
    }
    
    .hpbc-quicklink-card {
        display: block;
        page-break-inside: avoid;
        margin-bottom: 20px;
        border: 1px solid #000000;
        box-shadow: none;
    }
    
    .hpbc-quicklink-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .hpbc-quicklink-card::after {
        content: " (" attr(href) ")";
        font-size: 0.75rem;
        color: #666666;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .hpbc-quicklink-card {
        background-color: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .hpbc-quicklinks-title {
        color: #f9fafb;
    }
    
    .hpbc-quicklink-card-title {
        color: #f9fafb;
    }
    
    .hpbc-quicklink-card-description {
        color: #d1d5db;
    }
    
    .hpbc-quicklink-card:hover {
        background-color: #374151;
    }
}

/* Focus Visible Support */
.hpbc-quicklink-card:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom Grid Layouts */
.hpbc-quicklinks-grid.columns-1 {
    grid-template-columns: 1fr;
}

.hpbc-quicklinks-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.hpbc-quicklinks-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.hpbc-quicklinks-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.hpbc-quicklinks-grid.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Tablet adjustments for custom layouts */
@media (max-width: 1024px) {
    .hpbc-quicklinks-grid.columns-4,
    .hpbc-quicklinks-grid.columns-5,
    .hpbc-quicklinks-grid.columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile adjustments for custom layouts */
@media (max-width: 768px) {
    .hpbc-quicklinks-grid.columns-2,
    .hpbc-quicklinks-grid.columns-4,
    .hpbc-quicklinks-grid.columns-5,
    .hpbc-quicklinks-grid.columns-6 {
        grid-template-columns: 1fr;
    }
}