/* SoftHub Theme Styles */

/* Custom Colors */
:root {
    --softhub-blue: #2563eb;
    --softhub-dark: #1e293b;
    --softhub-gray: #64748b;
}

/* Base Styles */
.bg-softhub-blue { background-color: var(--softhub-blue); }
.bg-softhub-dark { background-color: var(--softhub-dark); }
.text-softhub-blue { color: var(--softhub-blue); }
.text-softhub-dark { color: var(--softhub-dark); }
.text-softhub-gray { color: var(--softhub-gray); }

/* Header Styles */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

/* Logo Styles */
.logo-box {
    width: 40px;
    height: 40px;
    background-color: var(--softhub-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-box i {
    color: #fff;
    font-size: 20px;
}

/* Navigation Styles */
.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--softhub-gray);
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--softhub-blue);
}

/* Search Bar Styles */
.search-input {
    width: 192px;
    padding: 8px 36px 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
}

.search-input:focus {
    border-color: var(--softhub-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    background-color: var(--softhub-blue);
    color: #fff;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-icon:hover {
    background-color: #1d4ed8;
}

/* Hero Section */
.hero-section {
    background-image: url('../new_assets/baner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 64px 0;
    position: relative;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-floating-icon {
    position: absolute;
    animation: floatRandom 6s ease-in-out infinite;
    opacity: 0.4;
}

.hero-floating-icon:nth-child(1) { animation-delay: 0s; animation-duration: 8s; }
.hero-floating-icon:nth-child(2) { animation-delay: 1s; animation-duration: 6s; }
.hero-floating-icon:nth-child(3) { animation-delay: 2s; animation-duration: 7s; }
.hero-floating-icon:nth-child(4) { animation-delay: 3s; animation-duration: 9s; }
.hero-floating-icon:nth-child(5) { animation-delay: 4s; animation-duration: 5s; }
.hero-floating-icon:nth-child(6) { animation-delay: 5s; animation-duration: 10s; }
.hero-floating-icon:nth-child(7) { animation-delay: 6s; animation-duration: 6.5s; }
.hero-floating-icon:nth-child(8) { animation-delay: 7s; animation-duration: 8.5s; }

@keyframes floatRandom {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -20px) rotate(5deg); }
    50% { transform: translate(-20px, -30px) rotate(-3deg); }
    75% { transform: translate(-30px, 20px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Hero Stats Cards */
.hero-stat-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Category Card */
.category-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.category-card.sticky-shadow {
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset !important;
}

/* Software Card */
.software-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s;
}

.software-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.software-card-image {
    width: 100%;
    height: 192px;
    object-fit: cover;
    background-color: #e5e7eb;
}

.software-card-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.software-card-footer {
    background-color: #f9fafb;
    padding: 12px 16px;
    margin: -16px -16px -16px -16px;
    margin-top: auto;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 0.0625em 0.0625em, rgba(0, 0, 0, 0.25) 0px 0.125em 0.5em, rgba(255, 255, 255, 0.1) 0px 0px 0px 1px inset;
}

/* Software List Item */
.software-list-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 16px;
    transition: box-shadow 0.2s;
}

.software-list-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(to right, #a855f7, #9333ea);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.btn-primary:hover {
    background: linear-gradient(to right, #9333ea, #7e22ce);
}

.btn-success {
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.btn-success:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
}

/* View Toggle */
.view-toggle-btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.view-toggle-btn.active {
    background-color: #fff;
    color: var(--softhub-blue);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Popup Pill */
.search-popup {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background-color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 8px 32px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Sticky Download Button */
.sticky-download-btn {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 40;
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s;
}

.sticky-download-btn.show {
    transform: translateY(0);
}

/* Footer */
.footer-section {
    background-color: var(--softhub-dark);
    color: #fff;
    padding: 64px 0;
}

.footer-logo-box {
    width: 48px;
    height: 48px;
    background-color: var(--softhub-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social-btn {
    width: 40px;
    height: 40px;
    background-color: #374151;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.footer-social-btn:hover {
    background-color: var(--softhub-blue);
}

/* Utility Classes */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.w1200 {
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive Utility Classes */
@media (max-width: 768px) {
    .hidden-md { display: none !important; }
    .hidden-sm { display: none !important; }
    
    /* Hero section mobile */
    .hero-section h2 { font-size: 28px !important; }
    .hero-section p { font-size: 14px !important; }
    .hero-stat-card { padding: 8px !important; }
    .hero-stat-card h3 { font-size: 14px !important; }
    .hero-stat-card p { font-size: 10px !important; }
    
    /* Category grid mobile */
    #categoriesSection .grid { grid-template-columns: repeat(4, 1fr) !important; }
    .category-card h4 { font-size: 12px !important; }
    .category-card i { font-size: 16px !important; }
    
    /* Software grid mobile */
    #cardView { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .software-card-image { height: 120px !important; }
    .software-card-body h4 { font-size: 14px !important; }
    .software-card-body p { font-size: 11px !important; }
    .btn-primary, .btn-success { padding: 6px 10px !important; font-size: 12px !important; }
    
    /* Detail page mobile */
    .detail-grid { grid-template-columns: 1fr !important; }
    .detail-grid > div:first-child { grid-column: 1 !important; }
    .detail-image { max-width: 100% !important; height: 160px !important; }
    
    /* Footer mobile */
    .footer-section h4 { font-size: 18px !important; }
    .footer-section p { font-size: 12px !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hidden-md { display: block !important; }
    .hidden-lg { display: none !important; }
    
    /* Tablet grid */
    #cardView { grid-template-columns: repeat(3, 1fr) !important; }
    .detail-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (min-width: 1025px) {
    .hidden-md { display: block !important; }
    .hidden-lg { display: block !important; }
}

/* Responsive */
@media (max-width: 1024px) {
    .hidden-lg {
        display: none;
    }
}

@media (max-width: 768px) {
    .hidden-md {
        display: none;
    }
    
    .software-list-desktop {
        display: none;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 64px 0;
}

.loading-spinner .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-bottom-color: var(--softhub-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Line Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
