/**
 * Copyright © 2026 KCOH Software Inc. All Rights Reserved.
 *
 * This software and associated documentation files (the "Software")
 * are proprietary and confidential. Unauthorized copying, modification,
 * distribution, or use of this Software, via any medium, is strictly prohibited.
 *
 * For licensing inquiries, contact: inquiries@kcoh.ca
 */

/* ============================================
   QUICK WINS - Additional Features
   ============================================ */

/* ============================================
   FEATURED PROJECT BANNER - Clean Rewrite
   ============================================ */

.featured-project-banner {
    background: #0f172a;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    z-index: 2;
    isolation: isolate;
}

.featured-project-banner .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: center;
}

.featured-content {
    position: relative;
    z-index: 1;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.featured-badge svg {
    width: 20px;
    height: 20px;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.featured-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.featured-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.featured-stat svg {
    width: 16px;
    height: 16px;
    color: #6366f1;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.featured-link:hover {
    gap: 0.75rem;
    color: #8b5cf6;
}

.featured-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.featured-link:hover svg {
    transform: translateX(3px);
}

.featured-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-mockup {
    width: 250px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

.phone-frame {
    width: 200px;
    height: 400px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 20px;
    padding: 8px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.app-logo-display {
    width: 85%;
    height: auto;
    object-fit: contain;
    opacity: 0.95;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        opacity: 0.95;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .featured-project-banner {
        padding: 3rem 0;
    }

    .featured-project-banner .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .featured-description {
        font-size: 1rem;
    }

    .featured-stats {
        gap: 1rem;
    }

    .featured-mockup {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .featured-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@keyframes logoGlow {
    0%, 100% {
        opacity: 0.95;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Trust Badges Bar */
.trust-badges-bar {
    background: #0f172a;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    padding: 2rem 0;
}

.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.trust-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.trust-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.trust-text {
    display: flex;
    flex-direction: column;
}

.trust-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

.availability-badge .trust-icon {
    background: linear-gradient(135deg, #10b981, #06b6d4);
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50% !important; /* Ensure it's circular, not square */
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

/* Ensure status indicator doesn't appear in featured project section */
.featured-project-banner .status-indicator,
.featured-visual .status-indicator,
.featured-mockup .status-indicator,
.phone-frame .status-indicator,
.phone-screen .status-indicator {
    display: none !important;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .featured-project-banner {
        padding: 3rem 0;
    }

    .featured-project-banner .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .featured-description {
        font-size: 1rem;
    }

    .featured-stats {
        gap: 1rem;
    }

    .featured-mockup {
        width: 200px;
    }

    .trust-badges {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .trust-badge {
        padding: 0.875rem;
    }

    .trust-icon {
        width: 40px;
        height: 40px;
    }

    .trust-number {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .featured-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .trust-badges {
        gap: 0.75rem;
    }
}

/* Simple Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible; /* Ensure ::after pseudo-element is visible */
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.6);
}

.chat-button svg {
    width: 28px;
    height: 28px;
    color: white;
}

.chat-button::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border: 3px solid #0f172a;
    border-radius: 50% !important; /* Ensure it's always circular */
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

.chat-box {
    position: fixed;
    bottom: 100px; /* Positioned above chat button (60px + 30px bottom + 10px gap) */
    right: 30px;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 120px);
    min-height: 500px;
    background: var(--bg-white);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1002; /* Above chat widget and back-to-top button */
}

.chat-box.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

.chat-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.chat-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.chat-info p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.3s ease;
}

.chat-close:hover {
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    min-height: 200px;
    max-height: none;
    padding: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem; /* Increased bottom padding to ensure messages aren't cut off */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Ensure messages are fully visible when scrolled */
    scroll-padding-top: 1.5rem;
    scroll-padding-bottom: 1.5rem; /* Ensure bottom messages aren't cut off */
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
    min-width: 0;
    width: 100%;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.message-content {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    min-width: 0;
    gap: 0.25rem;
}

.message-bubble {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.6; /* Slightly increased for better readability */
    /* Ensure message bubbles aren't cut off */
    min-height: fit-content;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.message-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chat-message:hover .message-footer {
    opacity: 1;
}

.message-timestamp {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.copy-message-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    color: var(--text-secondary);
}

.copy-message-btn:hover {
    opacity: 1;
}

/* Clickable links in chat messages */
.chat-link {
    color: #60a5fa;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
}

.chat-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.chat-link:visited {
    color: #a78bfa;
}

/* Email links */
.chat-email {
    color: #34d399;
}

.chat-email:hover {
    color: #6ee7b7;
}

/* Phone links */
.chat-phone {
    color: #fbbf24;
}

.chat-phone:hover {
    color: #fcd34d;
}

/* URL links */
.chat-url {
    color: #60a5fa;
}

.chat-url:hover {
    color: #93c5fd;
}

/* Links in user messages (white background) */
.chat-message.user .chat-link {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

.chat-message.user .chat-link:hover {
    text-decoration-color: rgba(255, 255, 255, 1);
}

.chat-input-area {
    padding: 1rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input-form {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.char-counter {
    position: absolute;
    bottom: -1.25rem;
    right: 3.5rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: color 0.2s ease;
    pointer-events: none;
}

.chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chat-send:hover {
    transform: scale(1.1);
}

.chat-send svg {
    width: 20px;
    height: 20px;
}

/* Quick Reply Buttons - Hidden by default, shown when needed */
.quick-replies {
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-white);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    transition: max-height 0.3s ease, padding 0.3s ease;
}

/* Show quick replies when they have content and are active */
.quick-replies.has-replies {
    display: flex;
    padding: 1rem 1rem 0.5rem;
    max-height: 220px;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 220px;
        padding-top: 1rem;
        padding-bottom: 0.5rem;
    }
}

.quick-replies::-webkit-scrollbar {
    width: 6px;
}

.quick-replies::-webkit-scrollbar-track {
    background: transparent;
}

.quick-replies::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.quick-replies::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.quick-reply-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-reply-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateX(4px);
}

.quick-reply-btn svg {
    width: 16px;
    height: 16px;
    color: #6366f1;
    flex-shrink: 0;
}

.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Large Desktop - More vertical space */
@media (min-width: 1440px) {
    .chat-box {
        max-height: 700px;
    }

    .chat-messages {
        max-height: 400px;
    }
}

/* Tablet and smaller desktop */
@media (max-width: 1024px) and (min-width: 769px) {
    .chat-box {
        width: 380px;
        height: 580px;
        max-height: calc(100vh - 120px);
        min-height: 480px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 20px;
        right: 20px;
    }

    .chat-button {
        width: 56px;
        height: 56px;
    }

    .chat-box {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 80vh;
        max-height: 80vh;
        min-height: 60vh;
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        z-index: 1002; /* Ensure it's above everything on mobile */
    }

    .chat-messages {
        max-height: none;
        flex: 1;
        padding: 1rem;
        padding-bottom: 0.5rem;
    }

    .quick-replies {
        max-height: 200px;
        padding: 1rem;
    }

    .message-content {
        max-width: 80%;
    }

    .chat-input-area {
        padding-bottom: 1.75rem;
    }

    .char-counter {
        right: 3rem;
        bottom: -1.5rem;
    }
}

@media (max-width: 480px) {
    .chat-box {
        height: 85vh;
        max-height: 85vh;
        min-height: 70vh;
    }

    .quick-replies {
        max-height: 150px;
    }
}

/* ============================================
   SKELETON LOADING SCREENS
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(99, 102, 241, 0.05) 0%,
        rgba(99, 102, 241, 0.1) 50%,
        rgba(99, 102, 241, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Skeleton Card */
.skeleton-card {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-title {
    height: 24px;
    width: 200px;
    margin-bottom: 0.5rem;
}

.skeleton-subtitle {
    height: 16px;
    width: 150px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 0.75rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-image {
    height: 200px;
    width: 100%;
    margin-bottom: 1rem;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: 0.5rem;
}

/* Skeleton Grid */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Skeleton List */
.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.skeleton-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
}

.skeleton-list-content {
    flex: 1;
}

.skeleton-list-title {
    height: 20px;
    width: 70%;
    margin-bottom: 0.5rem;
}

.skeleton-list-text {
    height: 16px;
    width: 50%;
}

/* Loading Container */
.loading-container {
    position: relative;
    min-height: 400px;
}

.loading-container.loaded .skeleton-wrapper {
    display: none;
}

.skeleton-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    z-index: 10;
    padding: 2rem 0;
}

/* Content hidden while loading */
.loading-container:not(.loaded) > *:not(.skeleton-wrapper) {
    opacity: 0;
    pointer-events: none;
}

/* Fade in when loaded */
.loading-container.loaded > *:not(.skeleton-wrapper) {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Skeleton for specific sections */
.skeleton-service-card {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    height: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-portfolio-item {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    height: 400px;
}

.skeleton-portfolio-image {
    height: 250px;
    width: 100%;
}

.skeleton-portfolio-content {
    padding: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .skeleton-grid {
        grid-template-columns: 1fr;
    }

    .skeleton-card {
        padding: 1.5rem;
    }

    .skeleton-image {
        height: 150px;
    }

    .skeleton-portfolio-item {
        height: 350px;
    }

    .skeleton-portfolio-image {
        height: 200px;
    }
}

/* ============================================
   PREMIUM PORTFOLIO REDESIGN
   ============================================ */

/* Section Header - Stronger Framing */
.portfolio-page .section-header {
    margin-bottom: 3rem;
    padding-top: 0;
}

.portfolio-page .section-title {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.portfolio-page .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 2px;
}

.portfolio-page .section-subtitle {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Portfolio Grid - Better Spacing */
.portfolio-grid {
    margin-top: 2.5rem;
    gap: 2.5rem;
}

/* Base Portfolio Item */
.portfolio-item {
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(55, 65, 81, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Featured Card (Middle) - Visually Dominant */
.portfolio-item-featured {
    border-radius: 1.25rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.2);
    background: rgba(31, 41, 55, 0.7);
}

.portfolio-item-featured::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.25rem;
    padding: 2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.portfolio-item-featured:hover::before {
    opacity: 1;
}

/* Image Containers with Gradients and Glows */
.portfolio-image {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

/* MetalWorth - Gold toned radial glow */
.portfolio-image-metalworth {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.15), rgba(139, 69, 19, 0.1));
}

.portfolio-image-metalworth::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(184, 134, 11, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* iOS Card - Soft blue glow */
.portfolio-image-ios {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    height: 320px; /* Slightly taller for featured card */
}

.portfolio-image-ios::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Systems Card - Cool neutral glow */
.portfolio-image-systems {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(67, 56, 202, 0.1));
}

.portfolio-image-systems::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Portfolio Photo - Centered with glow on hover */
.portfolio-photo {
    width: auto;
    height: 70%;
    max-width: 80%;
    object-fit: contain;
    object-position: center;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
}

.portfolio-item:hover .portfolio-photo {
    transform: none;
    filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.4));
}

/* Portfolio Content - Better Hierarchy */
.portfolio-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

/* Title with Gradient Effect */
.portfolio-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    line-height: 1.2;
    transform: none !important;
    transition: none !important;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

/* Ensure portfolio titles never move on hover */
.portfolio-item:hover .portfolio-content h3,
.portfolio-item .portfolio-content h3:hover {
    transform: none !important;
    animation: none !important;
}

/* Primary Text - Enhanced with Accent */
.portfolio-primary {
    color: #e0e7ff;
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-weight: 500;
    transform: none !important;
    transition: none !important;
    position: relative;
    padding-left: 1rem;
    border-left: 3px solid rgba(99, 102, 241, 0.5);
}

.portfolio-item:hover .portfolio-primary {
    border-left-color: rgba(99, 102, 241, 0.8);
    color: #f3f4f6;
}

/* Status/Proof Line - Enhanced */
.portfolio-status {
    color: #a78bfa;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    width: fit-content;
}

.portfolio-status::before {
    content: '✓';
    color: #6366f1;
    font-weight: 700;
    font-size: 1rem;
}

.portfolio-item:hover .portfolio-status {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #c4b5fd;
}

/* Secondary Details - Enhanced Design */
.portfolio-details {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.4);
    border-radius: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.portfolio-item:hover .portfolio-details {
    background: rgba(31, 41, 55, 0.5);
    border-color: rgba(99, 102, 241, 0.3);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(55, 65, 81, 0.3);
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-size: 0.7rem;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-label::before {
    content: '→';
    color: #6366f1;
    font-weight: 700;
}

.detail-value {
    font-size: 0.9rem;
    color: #d1d5db;
    line-height: 1.6;
    padding-left: 1.25rem;
}

.portfolio-item:hover .detail-value {
    color: #e5e7eb;
}

/* Tags - Enhanced with Gradient Accents */
.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.portfolio-item:hover .portfolio-tags {
    border-top-color: rgba(99, 102, 241, 0.4);
}

.portfolio-tags .tag {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.1));
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #c4b5fd;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portfolio-tags .tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-tags .tag {
    color: #ddd6fe;
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.15));
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.portfolio-item:hover .portfolio-tags .tag::before {
    opacity: 1;
}

/* App Store Badge - Larger and Centered for Featured Card */
.app-store-link-wrapper {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.portfolio-item-featured .app-store-link-wrapper {
    margin: 2rem 0;
}

.app-store-badge {
    height: 46px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.portfolio-item:hover .app-store-badge {
    transform: none;
    filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.5));
}

/* Hover Effects - Purple Glow (No Movement) */
.portfolio-item:hover {
    transform: none;
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.4),
        0 0 40px rgba(99, 102, 241, 0.15),
        inset 0 0 20px rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(31, 41, 55, 0.85);
}

.portfolio-item-featured:hover {
    transform: none;
    box-shadow: 
        0 12px 32px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(168, 85, 247, 0.5),
        0 0 60px rgba(99, 102, 241, 0.2),
        inset 0 0 30px rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.7);
}

.portfolio-item:hover .portfolio-image::before {
    opacity: 1;
}

.portfolio-item:hover .portfolio-status {
    opacity: 1;
}

.portfolio-item:hover .detail-value {
    opacity: 0.9;
}

/* Trust Line */
.portfolio-trust-line {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    opacity: 0.6;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(55, 65, 81, 0.3);
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Overlay */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

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

.portfolio-link {
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.9);
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.portfolio-link:hover {
    background: rgba(99, 102, 241, 1);
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .portfolio-page .section-title {
        font-size: 2rem;
    }

    .portfolio-grid {
        gap: 2rem;
        margin-top: 2rem;
    }

    .portfolio-item-featured {
        border-radius: 1rem;
    }

    .portfolio-image {
        height: 240px;
    }

    .portfolio-image-ios {
        height: 240px;
    }

    .portfolio-content {
        padding: 1.5rem;
    }

    .portfolio-content h3 {
        font-size: 1.25rem;
    }

    .portfolio-primary {
        font-size: 1rem;
    }

    .portfolio-trust-line {
        font-size: 0.8125rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
}
