/**
 * Job Dates Manager Pro - Complete Stylesheet
 * Save as: /wp-content/plugins/job-dates-manager/assets/style.css
 */

/* ===================================
   Container and Layout
   =================================== */
.jdm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===================================
   Filter Tabs - Modern Gradient Design
   =================================== */
.jdm-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    align-items: center;
    position: relative;
    overflow: hidden;
}

.jdm-filter-tabs::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-50%) translateY(-50%); }
    50% { transform: translateX(-30%) translateY(-30%); }
}

.jdm-filter-label {
    color: white;
    font-weight: 600;
    margin-right: 15px;
    display: flex;
    align-items: center;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.jdm-filter-tabs a {
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.jdm-filter-tabs a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.jdm-filter-tabs a:hover::before {
    width: 100px;
    height: 100px;
}

.jdm-filter-tabs a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.jdm-filter-tabs a.active {
    background: white;
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: activeTab 0.3s ease;
}

@keyframes activeTab {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===================================
   Posts Grid Layout
   =================================== */
.jdm-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Individual Post Card
   =================================== */
.jdm-post-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.jdm-post-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.jdm-post-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.jdm-post-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
}

.jdm-post-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

.jdm-post-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.jdm-post-title a:hover {
    color: #667eea;
}

/* ===================================
   Date Badges with Icons
   =================================== */
.jdm-date-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    position: relative;
    z-index: 2;
}

.jdm-date-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.jdm-date-badge::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;
}

.jdm-date-badge:hover::before {
    left: 100%;
}

.jdm-date-badge.last-date {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.jdm-date-badge.admit-card {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.jdm-date-badge.result {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.jdm-date-badge svg {
    width: 14px;
    height: 14px;
    margin-right: 5px;
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===================================
   Apply/View Details Button
   =================================== */
.jdm-apply-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.jdm-apply-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.jdm-apply-btn:hover::before {
    left: 100%;
}

.jdm-apply-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

/* ===================================
   List View Alternative
   =================================== */
.jdm-posts-list {
    margin-top: 30px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.jdm-list-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid;
    border-image: linear-gradient(180deg, #667eea 0%, #764ba2 100%) 1;
    transition: all 0.3s ease;
    position: relative;
}

.jdm-list-item::after {
    content: "→";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #667eea;
    opacity: 0;
    transition: all 0.3s ease;
}

.jdm-list-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateX(10px);
    background: linear-gradient(to right, white 0%, #f9fafb 100%);
}

.jdm-list-item:hover::after {
    opacity: 1;
    right: 30px;
}

/* ===================================
   View Toggle Buttons
   =================================== */
.jdm-view-toggle {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.jdm-view-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #6b7280;
}

.jdm-view-btn:hover {
    background: #f9fafb;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.jdm-view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===================================
   Loading States
   =================================== */
.jdm-loading {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.3s ease;
}

.jdm-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.jdm-loading p {
    color: #6b7280;
    font-size: 16px;
    margin-top: 10px;
}

/* ===================================
   No Results Message
   =================================== */
.jdm-no-results {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    color: #6b7280;
    animation: fadeIn 0.6s ease;
}

.jdm-no-results svg {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.jdm-no-results h3 {
    font-size: 24px;
    color: #4b5563;
    margin-bottom: 10px;
}

.jdm-no-results p {
    font-size: 16px;
    color: #9ca3af;
}

/* ===================================
   Widget Styles
   =================================== */
.widget .jdm-widget-container {
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.widget .jdm-filter-tabs {
    padding: 10px;
    margin-bottom: 15px;
}

.widget .jdm-filter-tabs a {
    padding: 6px 12px;
    font-size: 12px;
}

.widget .jdm-posts-list li {
    padding: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

/* ===================================
   Mobile Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .jdm-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .jdm-container {
        padding: 15px;
    }
    
    .jdm-filter-tabs {
        padding: 12px;
        justify-content: center;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .jdm-filter-label {
        width: 100%;
        margin-bottom: 10px;
        justify-content: center;
        font-size: 14px;
    }
    
    .jdm-filter-tabs a {
        padding: 8px 16px;
        font-size: 13px;
        flex: 1;
        text-align: center;
        min-width: auto;
    }
    
    .jdm-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .jdm-post-card {
        padding: 20px;
    }
    
    .jdm-post-title {
        font-size: 16px;
    }
    
    .jdm-date-badges {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .jdm-date-badge {
        width: 100%;
        justify-content: center;
    }
    
    .jdm-view-toggle {
        justify-content: center;
        width: 100%;
    }
    
    .jdm-view-btn {
        flex: 1;
    }
    
    .jdm-apply-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .jdm-filter-tabs {
        padding: 10px 8px;
    }
    
    .jdm-filter-tabs a {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 15px;
    }
    
    .jdm-post-card {
        padding: 15px;
        border-radius: 8px;
    }
    
    .jdm-post-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .jdm-date-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .jdm-list-item {
        padding: 15px;
    }
    
    .jdm-no-results {
        padding: 40px 15px;
    }
    
    .jdm-no-results svg {
        width: 60px;
        height: 60px;
    }
    
    .jdm-no-results h3 {
        font-size: 20px;
    }
    
    .jdm-no-results p {
        font-size: 14px;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .jdm-filter-tabs,
    .jdm-view-toggle,
    .jdm-apply-btn,
    #jdm-back-to-top {
        display: none !important;
    }
    
    .jdm-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .jdm-post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        margin-bottom: 10px;
    }
}

/* ===================================
   Accessibility
   =================================== */
.jdm-filter-tabs a:focus,
.jdm-apply-btn:focus,
.jdm-view-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   Back to Top Button
   =================================== */
#jdm-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#jdm-back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* ===================================
   Custom Scrollbar (Webkit browsers)
   =================================== */
.jdm-container::-webkit-scrollbar {
    width: 10px;
}

.jdm-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.jdm-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.jdm-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a67d8 0%, #6b46b3 100%);
}