/* Projects Page Specific Styles */

/* Phase 4: Prevent horizontal scroll on all elements */
* {
    max-width: 100%;
}

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

.project-showcase {
    margin-bottom: 5rem;
    padding: 2rem 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Fix for iframe and image overflow */
.preview-iframe,
iframe {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.project-preview {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.project-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-category {
    background: var(--accent-indigo);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-year {
    color: var(--subtext-steel);
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.project-title {
    font-size: 2rem;
    color: var(--text-mist);
    margin-bottom: 1rem;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--subtext-steel);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-tag {
    background: var(--card-slate);
    border: 1px solid var(--border-subtle);
    color: var(--accent-indigo);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.tech-tag:hover {
    background: var(--accent-indigo);
    color: white;
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-preview {
    position: relative;
}

.preview-card {
    background: var(--card-slate);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-elevation);
    transition: var(--transition-smooth);
}

.preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px var(--shadow-soft);
}

.preview-header {
    background: var(--bg-charcoal);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-dots {
    display: flex;
    gap: 0.3rem;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--subtext-steel);
}

.preview-dots span:nth-child(1) { background: #ff5f56; }
.preview-dots span:nth-child(2) { background: #ffbd2e; }
.preview-dots span:nth-child(3) { background: #27ca3f; }

.preview-url {
    color: var(--subtext-steel);
    font-size: 0.85rem;
    background: var(--border-subtle);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.preview-content {
    padding: 1.5rem;
    min-height: 200px;
}

/* E-commerce Preview */
.preview-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.nav-item {
    padding: 0.5rem 1rem;
    background: var(--bg-charcoal);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--subtext-steel);
}

.nav-item.active {
    background: var(--accent-indigo);
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.product-card {
    height: 60px;
    background: var(--bg-charcoal);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

/* Kanban Preview */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.kanban-column {
    background: var(--bg-charcoal);
    border-radius: 8px;
    padding: 1rem;
}

.column-header {
    font-size: 0.75rem;
    color: var(--accent-indigo);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.task-card {
    height: 40px;
    background: var(--card-slate);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-subtle);
}

/* Dashboard Preview */
.dashboard-layout {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    height: 180px;
}

.dashboard-sidebar {
    background: var(--bg-charcoal);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item {
    height: 20px;
    background: var(--border-subtle);
    border-radius: 4px;
}

.sidebar-item.active {
    background: var(--accent-indigo);
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-container {
    flex: 1;
    background: var(--bg-charcoal);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.chart-line {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-indigo), var(--hover-cyan));
    border-radius: 1px;
}

.chart-line::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 20%;
    width: 8px;
    height: 8px;
    background: var(--hover-cyan);
    border-radius: 50%;
}

.weather-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.weather-card {
    height: 50px;
    background: var(--bg-charcoal);
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

/* Small Project Cards */
.project-card {
    text-align: center;
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.03);
}

.project-icon {
    margin-bottom: 1rem;
}

.mini-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.mini-tech-stack span {
    background: var(--bg-charcoal);
    color: var(--accent-indigo);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-indigo);
    font-weight: 500;
    transition: var(--transition-smooth);
}

.project-link:hover {
    color: var(--hover-cyan);
    transform: translateX(4px);
}

@media (max-width: 768px) {
    /* Fix horizontal scrolling on mobile */
    .project-preview {
        padding: 0 0.5rem;
        overflow-x: hidden;
    }
    
    .preview-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .preview-image {
        width: 100% !important;
        max-width: none !important;
        flex: none;
        height: 180px;
        order: -1; /* Image on top for mobile */
    }
    
    .preview-content {
        padding-left: 0;
        text-align: center;
    }
    
    .preview-iframe {
        width: 100% !important;
        max-width: none !important;
        min-width: auto !important;
    }
    
    /* Grid layouts that cause horizontal scroll */
    .product-grid,
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .chat-interface {
        flex-direction: column;
        height: auto;
        min-height: 200px;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 60px;
        overflow-x: auto;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .chat-room {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .project-showcase .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-links {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .project-tech {
        justify-content: center;
    }
    
    .project-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .project-description {
        font-size: 1rem;
        text-align: center;
    }
}

/* Chat Interface Preview Styles */
.chat-interface {
    display: flex;
    height: 250px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.chat-sidebar {
    width: 120px;
    background: #2a2a2a;
    padding: 0.75rem 0;
    border-right: 1px solid #3a3a3a;
}

.chat-room {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-room.active {
    background: var(--accent-indigo);
    color: white;
}

.chat-room:hover:not(.active) {
    background: #333;
    color: #ccc;
}

.chat-main {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.message-bubble.sent {
    background: var(--accent-indigo);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-bubble.received {
    background: #3a3a3a;
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
