/**
 * dynamic.css - Enhanced styling for a more dynamic interface
 * Football-themed design with green gradients and modern styling
 */

/* Global football theme */
body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f1f3f4 100%);
    font-family: 'Roboto', 'Arial', sans-serif;
}

.container {
    position: relative;
}

.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(40, 167, 69, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(32, 201, 151, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Base animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Animation classes */
.animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

.fadeIn { animation-name: fadeIn; }
.slideInUp { animation-name: slideInUp; }
.slideInLeft { animation-name: slideInLeft; }
.slideInRight { animation-name: slideInRight; }
.pulse { animation-name: pulse; }

/* Animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Enhanced navbar */
.navbar-bootsnipp.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-bootsnipp .nav > li > a {
    position: relative;
    overflow: hidden;
}

.navbar-bootsnipp .nav > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.navbar-bootsnipp .nav > li > a:hover::after,
.navbar-bootsnipp .nav > li.active > a::after {
    width: 100%;
}

/* Card enhancements */
.card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    border: 1px solid rgba(40, 167, 69, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.card-hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.15);
}

.card-img-top {
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Button enhancements */
.btn {
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::after {
    width: 300%;
    height: 300%;
}

.btn-hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Tab system */
.tab-container {
    margin: 20px 0;
}

.tab-links {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab-link {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.tab-link.active {
    border-bottom-color: #28a745;
    color: #28a745;
    font-weight: bold;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* Custom Category Buttons */
.category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.custom-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #28a745;
    border: 2px solid #28a745;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
    position: relative;
    overflow: hidden;
}

.custom-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(40, 167, 69, 0.1), transparent);
    transition: left 0.5s;
}

.custom-btn:hover::before {
    left: 100%;
}

.custom-btn:hover {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
}

.custom-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.custom-btn.active {
    background-color: #00547E;
    color: white;
}

/* WordPress-style Post Cards */
.post-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.post-image {
    overflow: hidden;
    max-height: 200px;
}

.post-image img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-card .card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card .card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00547E;
    margin-bottom: 0.5rem;
}

.post-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.post-meta i {
    margin-right: 5px;
}

.post-card .card-text {
    color: #495057;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.post-read-more {
    align-self: flex-start;
    background-color: #00547E;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.post-read-more:hover {
    background-color: #003d5c;
    transform: translateX(5px);
}

.post-read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.post-read-more:hover i {
    transform: translateX(3px);
}

/* Modal styles for posts */
.modal-content {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    background-color: #00547E;
    color: white;
    border-bottom: none;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body img {
    max-height: 400px;
    object-fit: contain;
    border-radius: 5px;
}

.modal-footer {
    border-top: none;
}

/* Pagination styles */
.pagination-container {
    margin: 40px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.page-item {
    margin: 0;
}

.page-link {
    color: #28a745;
    border-radius: 12px;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #28a745;
    transition: all 0.3s ease;
    font-weight: 600;
    background: white;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.page-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.page-link:hover::before {
    left: 100%;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.page-link:hover {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    border-color: #28a745;
}

.page-item.active .page-link:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #17a2b8 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.5);
}

.page-item.disabled .page-link {
    color: #6c757d;
    border-color: #dee2e6;
    background: #f8f9fa;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    color: #6c757d;
    background: #f8f9fa;
    transform: none;
    box-shadow: none;
}

/* Sidebar Styles */
.sidebar {
    margin-top: 20px;
}

.sidebar-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(40, 167, 69, 0.1);
}

.sidebar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.3);
}

.sidebar-card .card-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: 600;
    padding: 15px 20px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.sidebar-card .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.sidebar-card:hover .card-header::before {
    left: 100%;
}

.sidebar-card .card-body {
    padding: 15px;
}

.sidebar-card .list-unstyled li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-card .list-unstyled li:last-child {
    border-bottom: none;
}

.sidebar-card .list-unstyled li a {
    color: #444;
    transition: color 0.3s ease, transform 0.3s ease;
    display: block;
    padding: 3px 0;
}

.sidebar-card .list-unstyled li a:hover {
    color: #00547E;
    transform: translateX(5px);
    text-decoration: none;
}

/* Recent Posts in Sidebar */
.recent-post {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.recent-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}

.recent-post-info {
    flex: 1;
}

.recent-post-info h6 {
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.3;
}

.recent-post-info h6 a {
    color: #333;
    transition: color 0.3s ease;
}

.recent-post-info h6 a:hover {
    color: #00547E;
    text-decoration: none;
}

.recent-post-info small {
    color: #777;
    font-size: 12px;
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #00547E;
}

/* Page loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #00547E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }
    
    .tab-links {
        flex-wrap: wrap;
    }
    
    .tab-link {
        flex: 1 0 auto;
        text-align: center;
        font-size: 14px;
        padding: 8px 10px;
    }
}