/* Work Page Styles */
.work-page {
    background-color: var(--color-6);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.work-hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--color-1) 0%, var(--color-2) 100%);
    color: white;
}

.work-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.work-intro {
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Filters Section */
.work-filters {
    padding: 2rem 0;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
}

.filters-bar {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--color-4);
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    font-size: 1rem;
    min-width: 150px;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure consistent sizing */
    -webkit-appearance: none; /* Remove default styling on webkit browsers */
    -moz-appearance: none; /* Remove default styling on Firefox */
    appearance: none; /* Remove default styling */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem; /* Make room for the custom arrow */
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-1);
    box-shadow: 0 0 0 3px rgba(var(--color-1-rgb), 0.1);
}

/* Active Filters */
.active-filters {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.active-filters h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--color-4);
    font-weight: 600;
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--color-1) 0%, var(--color-2) 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Hover effects moved to conditional media query below */

.remove-filter {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Hover effects moved to conditional media query below */

/* Projects Grid */
.work-projects {
    padding: 3rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    justify-items: center;
}

.project-card {
    position: relative;
    width: 350px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Hover effects moved to conditional media query below */

.project-front,
.project-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
}

.project-front {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
}

.project-back {
    background: linear-gradient(135deg, var(--color-1) 0%, var(--color-2) 100%);
    transform: translateY(100%);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    color: white;
}

.project-name-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    width: 100%;
    padding: 1.5rem;
    color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 45%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.project-description {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.project-cta {
    background-color: white;
    color: var(--color-1);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid white;
}

/* Hover effects moved to conditional media query below */

.project-industry {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.industry-tag {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Footer CTA */
.work-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--color-3) 0%, var(--color-4) 100%);
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: var(--color-1);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid white;
}

/* Hover effects moved to conditional media query below */

/* Responsive Design */
@media (max-width: 768px) {
    .work-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem; /* Add more space below title */
        padding: 0 1rem; /* Add horizontal padding */
    }

    .work-intro {
        padding: 0 1rem; /* Add horizontal padding to intro text */
        margin-bottom: 1rem; /* Add space below intro */
    }

    .work-hero {
        padding: 3rem 0; /* Increase vertical padding */
    }

    .filters-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch; /* Ensure full width alignment */
    }

    .filter-group {
        width: 100%; /* Ensure filter groups take full width */
        align-items: center; /* Center the label and dropdown */
    }

    .filter-group label {
        align-self: flex-start; /* Align labels to the left */
        margin-bottom: 0.25rem; /* Add some space between label and dropdown */
    }

    .filter-select {
        min-width: 200px;
        width: 100%; /* Make dropdowns take full width of their container */
        max-width: 300px; /* Limit maximum width for better appearance */
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-cta {
        font-size: 0.9rem;
    }

    .project-card {
        width: 100%;
        max-width: 400px;
        height: 350px;
        /* Mobile: Always show some back content on front */
        position: relative;
    }

    /* Mobile: Show project name and description on front */
    .project-front .project-name-overlay {
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
        max-height: 60%;
        padding: 1.5rem;
    }

    .project-name {
        font-size: 1.5rem;
    }

    .project-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.2;
    }

    .project-industry {
        display: none;
    }

    /* Mobile tap indicator handled by body classes */

    /* Mobile: Show back content when flipped */
    .project-card.flipped .project-back {
        transform: translateY(0);
    }

    /* Mobile: Improve touch targets */
    .filter-select {
        min-height: 48px; /* Better touch target */
        font-size: 1rem;
        -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
        touch-action: manipulation; /* Optimize touch interactions */
    }

    .filter-tag {
        min-height: 44px; /* Better touch target */
        padding: 0.75rem 1rem;
    }

    .remove-filter {
        width: 24px;
        height: 24px; /* Larger touch target */
        font-size: 1.4rem;
    }

    /* Mobile: Ensure dropdown arrow is visible */
    .filter-select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
        background-size: 1.2rem; /* Slightly larger arrow for mobile */
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    /* Simplified mobile card layout (no flip) */
    .mobile-card {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        height: auto;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        background-color: var(--color-6);
    }

    .mobile-card .mobile-image {
        width: 100%;
        padding-top: 56.25%; /* 16:9 aspect ratio */
        background-size: cover;
        background-position: center;
    }

    .mobile-card .mobile-content {
        background: linear-gradient(135deg, var(--color-1) 0%, var(--color-2) 100%);
        color: white;
        padding: 1.5rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .mobile-card .project-name {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .mobile-card .project-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .mobile-card .project-cta {
        margin-top: 1rem;
    }

    /* Hide tap indicator for simplified cards */
    .mobile-card::after {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .work-hero {
        padding: 2.5rem 0; /* Slightly reduce padding but still maintain breathing room */
    }

    .work-title {
        font-size: 2rem;
        margin-bottom: 2rem; /* Even more space on smaller screens */
        padding: 0 0.5rem; /* Slightly reduce horizontal padding */
        line-height: 1.2; /* Improve line spacing */
    }

    .work-intro {
        padding: 0 0.5rem; /* Slightly reduce horizontal padding */
        margin-bottom: 1.5rem; /* More space below intro */
        line-height: 1.4; /* Improve readability */
    }

    .project-card {
        width: 100%;
        max-width: 350px;
        height: auto;
    }

    /* Mobile: Adjust tap indicator position for smaller screens */
    .hover-not-supported .project-card::after {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }

    /* Mobile: Improve filter layout */
    .filters-bar {
        gap: 0.75rem;
        align-items: stretch; /* Ensure consistent alignment */
    }

    .filter-group {
        width: 100%;
        align-items: center;
    }

    .filter-select {
        min-width: 100%;
        min-height: 44px;
        max-width: none; /* Remove max-width constraint on very small screens */
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Mobile: Stack filter tags better */
    .filter-tags {
        gap: 0.4rem;
    }

    .filter-tag {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .filters-bar {
        gap: 0.5rem;
    }
    
    .filter-group {
        margin-bottom: 0.5rem;
    }
    
    .filter-select {
        min-height: 40px;
        padding: 0.5rem 0.75rem;
        font-size: 14px;
    }
    
    .filter-group label {
        font-size: 0.8rem;
    }
}

/* Touch device specific styles */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .project-card:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .project-card:hover .project-back {
        transform: translateY(100%);
    }

    .filter-tag:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .remove-filter:hover {
        background-color: transparent;
        transform: none;
    }

    .project-cta:hover {
        background-color: white;
        color: var(--color-1);
    }

    .cta-button:hover {
        background-color: white;
        color: var(--color-1);
    }

    /* Add active states for touch feedback */
    .project-card:active {
        transform: scale(0.98);
    }

    .filter-tag:active {
        transform: scale(0.95);
    }

    .remove-filter:active {
        background-color: rgba(255, 255, 255, 0.3);
        transform: scale(0.9);
    }

    .project-cta:active {
        background-color: rgba(255, 255, 255, 0.9);
        transform: scale(0.98);
    }

    .cta-button:active {
        background-color: rgba(255, 255, 255, 0.9);
        transform: scale(0.98);
    }
}

/* Hover effects only for devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .project-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }

    .project-card:hover .project-back {
        transform: translateY(0);
    }

    .filter-tag:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .remove-filter:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

    .project-cta:hover {
        background-color: transparent;
        color: white;
    }

    .cta-button:hover {
        background-color: transparent;
        color: white;
        transform: translateY(-2px);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

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

.project-card.hidden {
    display: none;
}

/* Device capability classes */
.hover-supported .project-card {
    cursor: pointer;
}

.hover-not-supported .project-card {
    cursor: default;
}

/* Additional mobile optimizations when hover is not supported */
.hover-not-supported .project-card::after {
    content: "Tap to see more";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 10;
    opacity: 0.8;
}

/* Hide tap indicator on hover-supported devices */
.hover-supported .project-card::after {
    display: none;
} 