/*
FILE: app/static/css/components.css
DESCRIPTION: Component-specific styles for DevHub
DEVELOPER: DevHub.com
*/

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-logo {
    height: 32px;
    width: auto;
}

.brand-name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.nav-link.btn-login {
    color: var(--primary);
}

.nav-link.btn-login:hover {
    background: rgba(108, 99, 255, 0.1);
}

.nav-link.btn-register {
    background: var(--gradient-primary);
    color: #fff;
}

.nav-link.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 0;
    box-shadow: var(--shadow);
    margin-top: 8px;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.dropdown-menu a:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* ===== Hero Section ===== */
.hero-section {
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Projects Section ===== */
.projects-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===== Filters ===== */
.filters-container {
    margin-bottom: 40px;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-family: var(--font-family);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-family);
    font-size: 0.85rem;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filter-btn .count {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.filter-btn.active .count {
    color: rgba(255, 255, 255, 0.7);
}

.search-wrapper {
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-wrapper input {
    padding-left: 36px;
}

/* ===== Project Cards ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.project-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: var(--background-secondary);
    overflow: hidden;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-secondary);
    color: var(--text-muted);
    font-size: 3rem;
}

.placeholder-image.small {
    font-size: 1.5rem;
}

.project-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-badges .badge {
    font-size: 0.7rem;
    padding: 3px 10px;
}

.project-body {
    padding: 20px;
}

.project-body h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.project-body h4 a {
    color: var(--text-primary);
}

.project-body h4 a:hover {
    color: var(--primary);
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    background: var(--background-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.premium-price {
    color: var(--warning);
    font-weight: 600;
}

.project-card .btn-block {
    margin-top: 12px;
}

/* Featured Projects */
.featured-section {
    margin-bottom: 40px;
}

.featured-section h3 {
    margin-bottom: 20px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.featured-card {
    border-color: var(--primary);
}

.featured-card:hover {
    border-color: var(--primary-light);
}

/* Project Grid Header */
.project-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.project-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    justify-content: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-link.dots {
    border: none;
    cursor: default;
}

/* ===== Footer ===== */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 16px;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer-section ul li a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Responsive Components ===== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    
    .nav-links .nav-link {
        padding: 12px 16px;
    }
    
    .dropdown-menu {
        position: static;
        border: none;
        box-shadow: none;
        margin-top: 4px;
        padding-left: 20px;
        background: transparent;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .filter-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* ===== Auth Pages ===== */
.auth-section {
    padding: 120px 0 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.referral-banner {
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-top: 12px;
    color: var(--primary);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--primary);
}

.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
}

/* ===== About Page ===== */
.about-section {
    padding: 100px 0 60px;
}

.about-header {
    text-align: center;
    margin-bottom: 40px;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.about-content h2 {
    margin-bottom: 16px;
}

.about-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.features-list li i {
    color: var(--primary);
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.admin-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
}

.admin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-info h4 {
    margin-bottom: 4px;
}

.admin-role {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.admin-bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.admin-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.skill-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    background: var(--background-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* ===== Collaboration Section ===== */
.collaboration-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.collaboration-section h2 {
    text-align: center;
    margin-bottom: 8px;
}

.collaboration-section > p {
    text-align: center;
    margin-bottom: 30px;
}

.collaboration-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== Donate Page ===== */
.donate-section {
    padding: 100px 0 60px;
}

.donate-header {
    text-align: center;
    margin-bottom: 40px;
}

.donate-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.donate-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.donation-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.donation-amounts .btn {
    min-width: 60px;
}

.donation-amounts .btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group-text {
    padding: 12px 16px;
    background: var(--background);
    border: 2px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
}

.input-group .form-control {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.donate-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.donate-footer p {
    margin-bottom: 4px;
}

.donate-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.info-card h3 {
    margin-bottom: 12px;
}

.info-card ul {
    list-style: none;
}

.info-card ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--text-secondary);
}

.info-card ul li i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .donate-container {
        grid-template-columns: 1fr;
    }
    
    .collaboration-section {
        padding: 24px;
    }
    
    .collaboration-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 24px;
    }
}

/* END OF FILE - Signed DevHub.com */