/* ========================
   Portfolio Detail Page
   ======================== */

/* Dark Mode Support */
body.dark-mode {
    background-color: #0a0e27;
    color: #e2e8f0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode - Header */
body.dark-mode .navbar {
    background: rgba(10, 14, 39, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .nav-link {
    color: #e2e8f0;
}

body.dark-mode .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

body.dark-mode .menu-toggle span {
    background: #e2e8f0;
}

/* Dark Mode - Portfolio Header */
body.dark-mode .portfolio-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
}

body.dark-mode .breadcrumb a {
    color: #a5b4fc;
}

body.dark-mode .breadcrumb .current {
    color: #e2e8f0;
}

body.dark-mode .page-title {
    color: #e2e8f0;
}

body.dark-mode .page-subtitle {
    color: #cbd5e1;
}

/* Dark Mode - Portfolio Section */
body.dark-mode .portfolio-section {
    background: linear-gradient(180deg, #0f1323 0%, #1a1f35 100%);
}

body.dark-mode .filter-tab {
    background: #1a1f35;
    color: #e2e8f0;
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .filter-tab:hover,
body.dark-mode .filter-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

body.dark-mode .filter-count {
    color: #a5b4fc;
}

/* Dark Mode - Portfolio Cards */
body.dark-mode .portfolio-card {
    background: #1a1f35;
    color: #e2e8f0;
}

body.dark-mode .portfolio-card:hover {
    box-shadow: 0 30px 60px rgba(102, 126, 234, 0.3);
}

body.dark-mode .portfolio-card-title {
    color: #e2e8f0;
}

body.dark-mode .portfolio-card-description {
    color: #cbd5e1;
}

body.dark-mode .portfolio-card-category {
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
}

body.dark-mode .card-rating .value {
    color: #e2e8f0;
}

/* Dark Mode - Modal */
body.dark-mode .detail-modal {
    background: rgba(10, 14, 39, 0.9);
}

body.dark-mode .detail-modal-content {
    background: #1a1f35;
    color: #e2e8f0;
}

body.dark-mode .detail-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

body.dark-mode .detail-modal-close:hover {
    background: var(--primary-gradient);
    color: white;
}

body.dark-mode .detail-modal-header h2 {
    color: #e2e8f0;
}

body.dark-mode .detail-modal-header p {
    color: #cbd5e1;
}

body.dark-mode .detail-section h3 {
    color: #e2e8f0;
}

body.dark-mode .detail-section p {
    color: #cbd5e1;
}

body.dark-mode .tech-list span {
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .tech-list span:hover {
    background: var(--primary-gradient);
    color: white;
}

body.dark-mode .features-list li {
    color: #cbd5e1;
}

body.dark-mode .features-list i {
    color: #a5b4fc;
}

body.dark-mode .stat-box {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .stat-box:hover {
    background: rgba(102, 126, 234, 0.15);
}

body.dark-mode .stat-icon {
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
}

body.dark-mode .stat-box:hover .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

body.dark-mode .stat-value {
    color: #e2e8f0;
}

body.dark-mode .stat-box:hover .stat-value {
    color: white;
}

body.dark-mode .stat-name {
    color: #cbd5e1;
}

body.dark-mode .stat-box:hover .stat-name {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .testimonial-box {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
    color: #cbd5e1;
}

/* Dark Mode - CTA Section */
body.dark-mode .portfolio-cta {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(245, 87, 108, 0.05) 100%);
}

body.dark-mode .portfolio-cta .cta-content h2 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .portfolio-cta .cta-content p {
    color: var(--primary-color);
}

/* Dark Mode - Footer */
body.dark-mode .footer {
    background: #050809;
}

/* Header Section */
.portfolio-header {
    margin-top: 70px;
    padding: 100px 0 80px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(245, 87, 108, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 600;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb .separator {
    color: var(--text-lighter);
}

.breadcrumb .current {
    color: var(--text-dark);
}

.page-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--text-dark);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 56px;
    }
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-light);
}

/* Portfolio Section */
.portfolio-section {
    padding: 100px 0;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 80px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    letter-spacing: 0.5px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.count {
    color: var(--text-light);
    font-size: 12px;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Portfolio Grid */
.portfolio-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    width: 100%;
}

@media (max-width: 767px) {
    .portfolio-detail-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (min-width: 768px) {
    .portfolio-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Portfolio Card */
.portfolio-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: var(--transition);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    user-select: none;
}

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

.portfolio-card-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.portfolio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    display: block;
    max-width: 100%;
}

.portfolio-card:hover .portfolio-card-image img {
    transform: scale(1.12);
}

.portfolio-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(245, 87, 108, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-card-overlay {
    opacity: 1;
}

.overlay-icon {
    font-size: 48px;
    color: white;
    transition: var(--transition);
    display: none;
}

.portfolio-card:hover .overlay-icon {
    transform: scale(1.2);
}

.portfolio-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    z-index: 5;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.3);
}

.portfolio-card-content {
    padding: 30px;
}

.portfolio-card-category {
    display: inline-block;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(245, 87, 108, 0.1));
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portfolio-card-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.portfolio-card-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-rating .stars {
    color: #fbbf24;
    font-size: 14px;
}

.card-rating .value {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 14px;
}

.view-details {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
    pointer-events: none;
}

.view-details:hover {
    gap: 10px;
    color: var(--secondary-color);
}

.card-footer:hover .view-details {
    gap: 10px;
    color: var(--secondary-color);
}

/* Detail Modal */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.detail-modal.active {
    display: flex;
}

.detail-modal-content {
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
    max-width: 1100px;
    width: calc(100% - 40px);
    position: relative;
    animation: slideInUp 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .detail-modal-content {
        width: calc(100% - 20px);
        border-radius: 16px;
        max-height: 95vh;
    }
}

.detail-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.detail-modal-close:hover {
    background: var(--primary-gradient);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.detail-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 50px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .detail-modal-body {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
}

/* Modal Left - Image */
.detail-modal-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.modal-image-container {
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2);
}

@media (max-width: 768px) {
    .modal-image-container {
        height: 300px;
    }
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100%;
}

/* Modal Quick Info */
.modal-quick-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(245, 87, 108, 0.08));
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.info-item i {
    font-size: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
}

/* Modal Right - Content */
.detail-modal-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.detail-modal-header h2 {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 12px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-modal-header p {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Detail Sections */
.detail-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-section h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-section h3 i {
    color: var(--primary-color);
    font-size: 18px;
}

.detail-section p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

/* Tech List */
.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-list span {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(245, 87, 108, 0.1));
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: var(--transition-fast);
}

.tech-list span:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Features List */
.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.features-list li:before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Stats Detailed */
.stats-detailed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .stats-detailed {
        grid-template-columns: 1fr;
    }
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(245, 87, 108, 0.08));
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: var(--transition);
}

.stat-box:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-box:hover .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-dark);
}

.stat-box:hover .stat-value {
    color: white;
}

.stat-name {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 700;
}

.stat-box:hover .stat-name {
    color: rgba(255, 255, 255, 0.8);
}

/* Testimonial Box */
.testimonial-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(245, 87, 108, 0.08));
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    font-style: italic;
    color: var(--text-light);
    line-height: 1.8;
}

/* Detail Actions */
.detail-actions {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
}

.detail-actions .btn {
    flex: 1;
    justify-content: center;
}

/* CTA Section */
.portfolio-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(245, 87, 108, 0.05) 100%);
    text-align: center;
}

.cta-content h2 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 35px;
    opacity: 0.95;
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 36px;
    }

    .portfolio-section {
        padding: 60px 0;
    }

    .filter-bar {
        margin-bottom: 50px;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-content p {
        font-size: 16px;
    }

    .portfolio-header {
        padding: 60px 0 50px;
    }

    .breadcrumb {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .portfolio-detail-grid {
        gap: 25px;
    }

    .portfolio-card-content {
        padding: 20px;
    }

    .portfolio-card-title {
        font-size: 18px;
    }

    .portfolio-card-description {
        font-size: 13px;
    }

    .detail-modal-content {
        max-height: 95vh;
        margin: 10px;
    }

    .detail-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .detail-modal-header h2 {
        font-size: 24px;
    }

    .detail-modal-header p {
        font-size: 16px;
    }

    .portfolio-cta {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
        line-height: 1.3;
        word-wrap: break-word;
    }

    .page-subtitle {
        font-size: 14px;
        line-height: 1.5;
    }

    .portfolio-header {
        padding: 40px 0 30px;
        margin-top: 70px;
        width: 100%;
    }

    .breadcrumb {
        font-size: 12px;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }

    .filter-bar {
        gap: 8px;
        margin-bottom: 40px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-tab {
        padding: 10px 16px;
        font-size: 12px;
        min-height: 44px;
        white-space: nowrap;
    }

    .portfolio-section {
        padding: 40px 0;
        width: 100%;
    }

    .portfolio-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    .portfolio-card {
        width: 100%;
    }

    .portfolio-card-image {
        height: 200px;
        width: 100%;
    }

    .portfolio-card-content {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .portfolio-card-title {
        font-size: 16px;
        margin-bottom: 8px;
        word-wrap: break-word;
        line-height: 1.4;
    }

    .portfolio-card-description {
        font-size: 12px;
        margin-bottom: 15px;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .card-rating {
        font-size: 12px;
    }

    .detail-modal-body {
        padding: 20px;
        gap: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .detail-modal-header h2 {
        font-size: 20px;
        line-height: 1.3;
        word-wrap: break-word;
    }

    .detail-modal-header p {
        font-size: 14px;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .modal-image-container {
        height: 250px;
        width: 100%;
    }

    .detail-section h3 {
        font-size: 14px;
        margin-bottom: 12px;
        word-wrap: break-word;
    }

    .detail-section p {
        font-size: 13px;
        line-height: 1.6;
        word-wrap: break-word;
    }

    .tech-list {
        flex-wrap: wrap;
    }

    .tech-list span {
        font-size: 12px;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .features-list li {
        font-size: 13px;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .stats-detailed {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .stat-box {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 20px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-name {
        font-size: 11px;
    }

    .portfolio-cta {
        padding: 50px 0;
        width: 100%;
    }

    .cta-content {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .cta-content h2 {
        font-size: 24px;
        margin-bottom: 12px;
        line-height: 1.3;
        word-wrap: break-word;
    }

    .cta-content p {
        font-size: 14px;
        margin-bottom: 25px;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .detail-actions {
        width: 100%;
    }

    .detail-actions .btn {
        font-size: 14px;
        padding: 12px 24px;
        width: 100%;
        min-height: 48px;
    }
}

