/*
 * Jobs Addaa Portal v2.4 - Updated Stylesheet
 * Version: 2.4.0
 * Description: Enhanced layout with category icons, floating grid animation, and 15 category sections
 */

/* ============================
   GENERAL STYLES
   ============================ */
.jobs-addaa-portal-container {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* ============================
   HEADER SECTION
   ============================ */
.jobs-addaa-header {
    background: #A91E63;
    color: white;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.jobs-addaa-header .site-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.jobs-addaa-header .site-tagline {
    font-size: 16px;
    color: #ff4444;
    margin: 10px 0 15px 0;
    font-weight: bold;
}

.jobs-addaa-header .social-links {
    font-size: 14px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.jobs-addaa-header .social-links a {
    color: white;
    text-decoration: none;
}

.jobs-addaa-header .social-links a:hover {
    text-decoration: underline;
}

/* ============================
   CATEGORY ICONS SECTION
   ============================ */
.category-icons-container {
    margin-bottom: 25px;
}

.category-icons-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    transition: transform 0.3s ease;
}

.category-icon-item:hover {
    transform: translateY(-3px);
}

.category-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.category-icon-link:hover {
    background-color: #f0f0f0;
}

.category-icon {
    font-size: 28px;
    margin-bottom: 5px;
    display: block;
}

.category-icon-label {
    font-size: 11px;
    color: #333;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.category-icon-link:hover .category-icon-label {
    color: #A91E63;
}

/* ============================
   FLOATING HIGHLIGHTS SECTION - NEW GRID ANIMATION
   ============================ */
.floating-highlights-container {
    margin-bottom: 30px;
}

.floating-highlights-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: visible;
}

.floating-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 240px;
}

.floating-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0;
    animation: floatInUp 1s ease forwards, floatUpDown 3s ease-in-out infinite;
}

/* Float in animation */
@keyframes floatInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Continuous floating animation */
@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.floating-highlight-item {
    display: inline-flex;
    max-width: 300px;
    opacity: 0;
    animation: fadeInScale 0.8s ease forwards;
}

.floating-highlight-item a {
    background: linear-gradient(135deg, #FFEB3B, #FFC107);
    color: #333;
    padding: 10px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    border: 2px solid transparent;
}

.floating-highlight-item a:hover {
    background: linear-gradient(135deg, #FFC107, #FF9800);
    text-decoration: none;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    border-color: #FF9800;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered animation delays for floating items */
.floating-row:nth-child(1) { animation-delay: 0s; }
.floating-row:nth-child(2) { animation-delay: 0.3s; }
.floating-row:nth-child(3) { animation-delay: 0.6s; }
.floating-row:nth-child(4) { animation-delay: 0.9s; }

.floating-row:nth-child(1) .floating-highlight-item:nth-child(1) { animation-delay: 0.2s; }
.floating-row:nth-child(1) .floating-highlight-item:nth-child(2) { animation-delay: 0.4s; }
.floating-row:nth-child(1) .floating-highlight-item:nth-child(3) { animation-delay: 0.6s; }

.floating-row:nth-child(2) .floating-highlight-item:nth-child(1) { animation-delay: 0.5s; }
.floating-row:nth-child(2) .floating-highlight-item:nth-child(2) { animation-delay: 0.7s; }
.floating-row:nth-child(2) .floating-highlight-item:nth-child(3) { animation-delay: 0.9s; }

.floating-row:nth-child(3) .floating-highlight-item:nth-child(1) { animation-delay: 0.8s; }
.floating-row:nth-child(3) .floating-highlight-item:nth-child(2) { animation-delay: 1.0s; }
.floating-row:nth-child(3) .floating-highlight-item:nth-child(3) { animation-delay: 1.2s; }

.floating-row:nth-child(4) .floating-highlight-item:nth-child(1) { animation-delay: 1.1s; }
.floating-row:nth-child(4) .floating-highlight-item:nth-child(2) { animation-delay: 1.3s; }
.floating-row:nth-child(4) .floating-highlight-item:nth-child(3) { animation-delay: 1.5s; }

/* Social Action Buttons */
.social-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.whatsapp-btn {
    background: #25D366;
}

.whatsapp-btn:hover {
    background: #128C7E;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.telegram-btn {
    background: #0088cc;
}

.telegram-btn:hover {
    background: #006699;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.twitter-btn {
    background: #1DA1F2;
}

.twitter-btn:hover {
    background: #0d8bd9;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

/* ============================
   CATEGORY SECTIONS (3-COLUMN LAYOUT) - UPDATED FOR 15 SECTIONS
   ============================ */
.category-sections-container {
    margin-top: 30px;
}

.category-sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.category-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    height: fit-content;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid #A91E63;
}

.category-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-section-header {
    background-color: #A91E63;
    color: white;
    padding: 15px 20px;
    margin: 0;
    position: relative;
}

.category-section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8E1355, #A91E63, #8E1355);
}

.category-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    text-align: left;
}

.category-section-content {
    padding: 0;
}

.posts-list {
    padding: 0;
    margin: 0;
}

.category-posts-list {
    list-style: none;
    margin: 0;
    padding: 15px 20px;
    min-height: 200px;
}

.category-post-item {
    margin-bottom: 12px;
    position: relative;
    padding-left: 15px;
    transition: background-color 0.2s ease;
}

.category-post-item:hover {
    background-color: #f8f8f8;
    border-radius: 4px;
    padding: 5px 15px 5px 15px;
    margin-left: -5px;
    margin-right: -5px;
}

.category-post-item::before {
    content: "▶";
    color: #A91E63;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 12px;
}

.category-post-item a {
    color: #1976D2;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    display: block;
    transition: color 0.3s ease;
}

.category-post-item a:hover {
    color: #0D47A1;
    text-decoration: underline;
}

.last-date, .post-date {
    color: #D32F2F;
    font-size: 12px;
    font-weight: normal;
}

.no-posts-message {
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.category-post-item.no-posts::before {
    display: none;
}

.view-more-link {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    background: linear-gradient(135deg, #f9f9f9, #f0f0f0);
}

.view-more-btn {
    color: #A91E63;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    background: transparent;
}

.view-more-btn:hover {
    color: white;
    background: #A91E63;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(169, 30, 99, 0.3);
}

/* ============================
   RESPONSIVE DESIGN - UPDATED FOR 15 SECTIONS
   ============================ */
@media (max-width: 1200px) {
    .category-sections-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .category-icons-grid {
        gap: 12px;
    }

    .category-icon-item {
        min-width: 60px;
    }

    .category-icon {
        font-size: 24px;
    }

    .category-icon-label {
        font-size: 10px;
    }
}

@media (max-width: 992px) {
    .category-sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .social-action-buttons {
        gap: 10px;
    }

    .social-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .category-icons-grid {
        gap: 10px;
    }

    .floating-row {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .jobs-addaa-portal-container {
        padding: 15px;
    }

    .jobs-addaa-header {
        padding: 15px;
    }

    .jobs-addaa-header .site-title {
        font-size: 20px;
    }

    .category-sections-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .floating-highlights-wrapper {
        padding: 15px;
    }

    .floating-row {
        gap: 10px;
    }

    .floating-highlight-item {
        max-width: 250px;
    }

    .floating-highlight-item a {
        font-size: 12px;
        padding: 8px 12px;
    }

    .social-action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .social-btn {
        width: 200px;
        justify-content: center;
    }

    .category-icons-grid {
        gap: 8px;
        padding: 15px;
    }

    .category-icon-item {
        min-width: 50px;
    }

    .category-icon {
        font-size: 20px;
    }

    .category-icon-label {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .jobs-addaa-header .site-title {
        font-size: 18px;
        line-height: 1.4;
    }

    .jobs-addaa-header .site-tagline {
        font-size: 14px;
    }

    .category-section-header h3 {
        font-size: 16px;
    }

    .category-posts-list {
        padding: 12px 15px;
        min-height: 150px;
    }

    .category-post-item a {
        font-size: 13px;
    }

    .floating-highlight-item {
        max-width: 200px;
    }

    .floating-highlight-item a {
        font-size: 11px;
        padding: 6px 10px;
    }

    .social-btn {
        width: 100%;
        max-width: 250px;
    }

    .floating-grid {
        gap: 10px;
        min-height: 200px;
    }

    .category-icons-grid {
        flex-wrap: wrap;
        justify-content: space-around;
    }
}

/* ============================
   ANIMATIONS AND EFFECTS
   ============================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Stagger animation for all 15 sections */
.category-section:nth-child(1) { animation-delay: 0.1s; }
.category-section:nth-child(2) { animation-delay: 0.15s; }
.category-section:nth-child(3) { animation-delay: 0.2s; }
.category-section:nth-child(4) { animation-delay: 0.25s; }
.category-section:nth-child(5) { animation-delay: 0.3s; }
.category-section:nth-child(6) { animation-delay: 0.35s; }
.category-section:nth-child(7) { animation-delay: 0.4s; }
.category-section:nth-child(8) { animation-delay: 0.45s; }
.category-section:nth-child(9) { animation-delay: 0.5s; }
.category-section:nth-child(10) { animation-delay: 0.55s; }
.category-section:nth-child(11) { animation-delay: 0.6s; }
.category-section:nth-child(12) { animation-delay: 0.65s; }
.category-section:nth-child(13) { animation-delay: 0.7s; }
.category-section:nth-child(14) { animation-delay: 0.75s; }
.category-section:nth-child(15) { animation-delay: 0.8s; }

.category-icons-container {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.floating-highlights-wrapper {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .category-section,
    .floating-highlights-wrapper,
    .category-icons-container {
        animation: none;
        opacity: 1;
    }

    .floating-row {
        animation: none;
        opacity: 1;
    }

    .floating-highlight-item {
        animation: none;
        opacity: 1;
    }

    .category-section:hover {
        transform: none;
    }

    * {
        transition: none !important;
    }
}

/* ============================
   ADDITIONAL ENHANCEMENTS
   ============================ */

/* Loading animation for when posts are being fetched */
.category-posts-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #A91E63;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced hover effects */
.category-icon-item:hover .category-icon {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

/* Print styles */
@media print {
    .floating-highlights-container,
    .social-action-buttons,
    .category-icons-container {
        display: none;
    }

    .category-section {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}