/* PORTFOLIO PAGE STYLES */
.portfolio-header {
    background: linear-gradient(135deg, var(--dark-purple) 0%, var(--primary-purple) 100%);
    padding: 80px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.portfolio-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.header-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 48px;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease;
}

.header-content p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.back-home-btn {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* NAVIGATION TABS */
.portfolio-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tab {
    background: transparent;
    border: 2px solid var(--primary-purple);
    color: var(--primary-purple);
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-tab.active, .nav-tab:hover {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    color: white;
    transform: translateY(-2px);
}

/* PORTFOLIO SECTIONS */
.portfolio-section {
    display: none;
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease;
}

.portfolio-section.active {
    display: block;
}

/* FILTER BAR */
.filter-bar {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: #F3F4F6;
    border: none;
    padding: 8px 20px;
    margin: 5px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-purple);
    color: white;
}

/* PROJECTS GRID */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(91, 58, 140, 0.2);
}

.project-header {
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    color: white;
    padding: 20px;
}

.project-header h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.project-category {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-info {
    padding: 20px;
}

.project-description {
    color: var(--text-medium);
    margin-bottom: 15px;
    line-height: 1.6;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.project-screenshots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 20px 20px;
}

.screenshot-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.screenshot-thumb:hover {
    border-color: var(--primary-purple);
    transform: scale(1.05);
}

/* VIDEOS GRID */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 40px;
}

.video-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.video-player {
    position: relative;
    width: 100%;
    background: #000;
}

.video-player video {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.video-info {
    padding: 25px;
}

.video-title {
    font-size: 22px;
    color: var(--dark-purple);
    margin-bottom: 10px;
    font-weight: 600;
}

.video-description {
    color: var(--text-medium);
    line-height: 1.6;
}

/* DASHBOARDS GRID */
.dashboards-grid {
    display: grid;
    gap: 40px;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 300px 1fr;
    align-items: center;
}

.dashboard-preview {
    padding: 20px;
    background: linear-gradient(135deg, #F7F8FA, #E5E7EB);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-preview img {
    width: 100%;
    height: 200px;
    object-fit: contain;  /* Changed from cover to contain */
    object-position: center;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;  /* Only animate transform, not all */
    background: #f5f5f5;  /* Add background for images with transparency */
}

.dashboard-preview img:hover {
    transform: scale(1.02);  /* Reduced from 1.05 to 1.02 for less movement */
}

.dashboard-info {
    padding: 30px;
}

.dashboard-title {
    font-size: 24px;
    color: var(--dark-purple);
    margin-bottom: 10px;
    font-weight: 600;
}

.dashboard-description {
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.6;
}

.dashboard-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.feature-tag {
    background: linear-gradient(135deg, #E8F5E9, #F0FDF4);
    color: var(--accent-green);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.view-dashboard-btn {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    color: white;
        border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-dashboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(91, 58, 140, 0.4);
}

/* IMAGE MODAL */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.image-modal img {
    max-width: 90%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

#modalCaption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 20px;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-green);
    transform: scale(1.2);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.modal-nav button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-nav button:hover {
    background: rgba(255,255,255,0.3);
}

/* DASHBOARD MODAL */
.dashboard-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.dashboard-modal-content {
    position: relative;
    background: white;
    margin: 2% auto;
    width: 90%;
    height: 90%;
    border-radius: 15px;
    overflow: hidden;
}

.close-dashboard {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
    color: var(--text-medium);
}

.close-dashboard:hover {
    color: var(--primary-purple);
}

#dashboardTitle {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    color: white;
    margin: 0;
}

#dashboardFrame {
    height: calc(100% - 80px);
    width: 100%;
}

#dashboardFrame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* FOOTER */
.portfolio-footer {
    background: var(--dark-purple);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 80px;
}

/* DISABLE RIGHT CLICK & SELECTION */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    -webkit-user-drag: none;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.screenshot-thumb, .dashboard-preview img {
    pointer-events: auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 32px;
    }
    
    .portfolio-nav {
        flex-wrap: wrap;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card {
        grid-template-columns: 1fr;
    }
    
    .dashboard-preview {
        height: 200px;
    }
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}
/* Prevent dashboard card layout shifts */
.dashboard-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 300px 1fr;
    align-items: center;
    min-height: 240px;  /* Add minimum height */
}

.dashboard-preview {
    padding: 20px;
    background: linear-gradient(135deg, #F7F8FA, #E5E7EB);
    height: 100%;
    min-height: 240px;  /* Add minimum height */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;  /* Add position relative */
}
/* Add this new rule to control the heading's spacing */
.chart-container + h2 {
    margin-top: 0;
    margin-bottom: 20px; /* This gives a nice space above the table */
}