/* Portfolio Page - Visual Storytelling Design */

/* Prevent horizontal scroll on mobile */
* {
    max-width: 100%;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

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

.container {
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
    max-width: 100%;
}

/* Hero Section - Simplified */
.portfolio-hero {
    background: #f9fbff;
    padding: 80px 0 40px;
    margin-top: 60px;
    text-align: center;
}

.portfolio-hero .page-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4a4a4a;
    margin-bottom: 12px;
}

.portfolio-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #333;
    max-width: 700px;
    margin: 0 auto;
}

/* Real Differentiators Section */
.differentiators {
    padding: 60px 0;
    background: white;
}

.differentiator-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.differentiator-card {
    text-align: center;
    padding: 32px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.differentiator-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #ED166C;
}

.diff-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f7ff, #e8f0ff);
    border-radius: 50%;
}

.diff-icon i {
    font-size: 2.5rem;
    color: #0052cc;
}

.differentiator-card h3 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-weight: 600;
}

.differentiator-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* Tooltip styles */
.differentiator-card {
    position: relative;
    cursor: pointer;
}

.differentiator-card::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 10px;
}

.differentiator-card::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-bottom: 4px;
}

.differentiator-card:hover::after,
.differentiator-card:hover::before {
    opacity: 1;
}

/* Featured Case Study - Full Width */
.case-cta-top {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.case-cta-top .view-case-study {
    margin: 0;
}

.case-cta-top .project-social {
    margin: 0;
}

.featured-case-study-full {
    background: white;
    padding: 0;
    overflow: hidden;
}

.featured-header {
    background: linear-gradient(135deg, #0052cc, #4633eb);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.featured-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.featured-header h2 {
    font-size: 2.5rem;
    margin: 0;
}

.featured-press {
    margin-top: 12px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.featured-press a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.3s ease;
}

.featured-press a:visited {
    color: #ffd700;
    text-decoration: underline;
}

.featured-press a:hover {
    color: #ffeb3b;
    text-decoration: none;
}

/* App Screenshots */
.app-screenshots {
    padding: 60px 0;
    background: #f9fbff;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

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

/* Character screenshot container - hide overflow */
.screenshot-item:first-child {
    overflow: hidden;
    border-radius: 16px;
}

.app-screenshot {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

/* Character screenshot - zoom and crop to focus on character */
.screenshot-item:first-child .app-screenshot {
    object-fit: cover;
    object-position: center center;
    width: 120%;
    margin-left: -10%;
}

/* Story screenshot - show all content */
.screenshot-item:last-child .app-screenshot {
    object-fit: contain;
    background: #f9fbff;
}

/* Hover effects */
.app-screenshot:hover {
    transform: scale(1.02);
}

.screenshot-caption {
    margin-top: 16px;
    color: #4a4a4a;
    font-size: 0.95rem;
    font-style: italic;
}

/* Solution Grid */
.solution-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 60px 0;
}

.solution-card {
    background: white;
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.solution-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f0f7ff, #e8f0ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.solution-icon i {
    font-size: 1.5rem;
    color: #0052cc;
}

.solution-card h4 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.solution-card p {
    color: #4a4a4a;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Results Statistics */
.results-statistics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 60px 0;
}

.stat-card {
    text-align: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, #f9fbff, #f0f7ff);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon i {
    font-size: 2rem;
    color: #ED166C;
}

.stat-card h3 {
    font-size: 1.5rem;
    color: #0052cc;
    margin-bottom: 8px;
}

.stat-card p {
    color: #4a4a4a;
}

/* Vibe Coding Quote */
.vibe-coding-quote {
    background: #f9fbff;
    padding: 60px 40px;
    border-radius: 16px;
    margin: 60px 0;
}

.quote-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.quote-illustration {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.vibe-coding-quote blockquote {
    font-size: 1.25rem;
    font-style: italic;
    color: #444;
    line-height: 1.8;
    margin: 0 0 20px 0;
}

.vibe-coding-quote cite {
    color: #4a4a4a;
    font-style: normal;
    font-weight: 600;
}

/* Cost Comparison */
.cost-comparison {
    text-align: center;
    margin: 60px 0;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cost-comparison.featured {
    padding: 60px 40px;
    background: linear-gradient(135deg, #f9fbff, #f0f7ff);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.cost-comparison h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #1a1a1a;
    font-weight: 700;
}

.cost-comparison h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.cost-comparison.featured .cost-chart {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin: 0 auto 20px;
}

.cost-chart {
    max-width: 600px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.cost-caption {
    color: #4a4a4a;
    font-size: 1.1rem;
}

/* Case CTA */
.case-cta {
    text-align: center;
    margin: 40px 0;
}

/* Project Social Links */
.project-social {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
}

.project-social span {
    color: rgba(255, 255, 255, 0.9); /* White text to match featured section */
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .project-social span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        white-space: nowrap;
        border: 0;
    }
}

.project-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Different style when in featured header */
.featured-header .project-social a {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.project-social a:hover {
    background: #ED166C;
    color: white;
    transform: translateY(-2px);
    border-color: #ED166C;
}

.featured-header .project-social a:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #0052cc;
    border-color: rgba(255, 255, 255, 0.9);
}

.project-social i {
    font-size: 1.2rem;
}

.view-case-study {
    display: inline-flex;
    align-items: center;
    background: #ED166C;
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-case-study:hover {
    background: #d91458;
    transform: translateY(-2px);
}

/* Other Portfolio Projects */
.portfolio-list {
    padding: 80px 0;
    background: white;
}

.portfolio-list h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 56px;
    color: #1a1a1a;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

.case-card {
    position: relative;
    background: #f9fbff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.case-card.with-background {
    min-height: 400px;
}

.case-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.case-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
}

/* Hebrew Today Card Background */
.case-card.hebrew-today {
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.05), rgba(237, 22, 108, 0.05));
    position: relative;
    overflow: hidden;
}

.case-card.hebrew-today::before {
    content: 'א ב ג ד ה ו ז ח ט';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 6rem;
    font-weight: bold;
    color: rgba(0, 82, 204, 0.08);
    transform: rotate(15deg);
    z-index: 1;
    line-height: 1;
}

.case-card.hebrew-today::after {
    content: 'ש ת';
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 4rem;
    font-weight: bold;
    color: rgba(237, 22, 108, 0.08);
    transform: rotate(-10deg);
    z-index: 1;
}

.case-content {
    position: relative;
    z-index: 2;
    padding: 40px;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.case-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.industry {
    color: #0052cc;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.coming-soon {
    background: #fff3e0;
    color: #ff8800;
}

.case-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.case-card p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 24px;
}

.case-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: white;
    color: #333;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
}

/* Placeholder Card */
.placeholder-card {
    background: linear-gradient(135deg, #f0f4ff, #e8f0ff);
    border: 2px dashed #0052cc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.placeholder-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 82, 204, 0.03) 10px,
        rgba(0, 82, 204, 0.03) 20px
    );
    animation: slidePattern 20s linear infinite;
    z-index: 1;
}

@keyframes slidePattern {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(28px, 28px);
    }
}

.placeholder-card::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10rem;
    font-weight: 300;
    color: rgba(0, 82, 204, 0.1);
    z-index: 1;
}

.placeholder-card:hover {
    background: linear-gradient(135deg, #e8f0ff, #d9e5ff);
    border-color: #ED166C;
}

.placeholder-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.placeholder-content h3 {
    color: #0052cc;
    margin-bottom: 12px;
}

.placeholder-content p {
    color: #4a4a4a;
}

.start-project {
    display: inline-block;
    color: #0052cc;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.start-project:hover {
    text-decoration: underline;
}

/* Why DevOpser - Updated Pillars */
.why-devopser {
    padding: 80px 0;
    background: #f9fbff;
}

.why-devopser h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 56px;
    color: #1a1a1a;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.pillars-grid.three-pillars {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1000px;
    margin: 0 auto;
}

.pillar-card {
    background: white;
    padding: 40px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ED166C, #0052cc);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.pillar-card:hover::before {
    transform: translateX(0);
}

.pillar-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.pillar-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #f9fbff, #f0f7ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pillar-icon i {
    font-size: 3rem;
    color: #0052cc;
}

.pillar-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.pillar-card p {
    color: #4a4a4a;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* CTA Section - Full Width Gradient */
.portfolio-cta-gradient {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, #ED166C, #0052cc);
    overflow: hidden;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
}

.cta-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-cta-gradient .cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.portfolio-cta-gradient h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.portfolio-cta-gradient p {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-primary {
    background: #ED166C;
    color: white;
    border: 2px solid #ED166C;
}

.btn-primary:hover {
    background: #d91458;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 22, 108, 0.3);
}

.btn-secondary {
    background: white;
    color: #0052cc;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: #f0f7ff;
    border-color: #0052cc;
    transform: translateY(-2px);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .differentiator-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .solution-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pillars-grid.three-pillars {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quote-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .quote-illustration {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 968px) {
    .results-statistics {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .portfolio-hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Hide overwhelming elements on mobile */
    .differentiators {
        display: none;
    }
    
    .results-statistics {
        display: none;
    }
    
    .vibe-coding-quote {
        display: none;
    }
    
    .cost-comparison {
        display: none;
    }
    
    .differentiator-grid {
        grid-template-columns: 1fr;
    }
    
    .solution-grid {
        grid-template-columns: 1fr;
    }
    
    .pillars-grid {
        grid-template-columns: 1fr;
    }
    
    .pillars-grid.three-pillars {
        grid-template-columns: 1fr;
    }
    
    .case-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Ensure mobile content fits viewport */
    .featured-case-study-full {
        overflow-x: hidden;
    }
    
    .app-screenshots {
        overflow-x: hidden;
        padding: 0;
    }
    
    .screenshots-grid {
        padding: 0 10px;
    }
    
    .app-screenshot {
        width: 100%;
        height: auto;
    }
    
    .case-cta-top {
        padding: 0 10px;
    }
    
    .view-case-study {
        font-size: 0.95rem;
        padding: 12px 24px;
    }
    
    /* Ensure all text content wraps properly */
    p, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix any absolute positioned elements */
    .portfolio-hero, .featured-header, .featured-content {
        position: relative;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .featured-header h2 {
        font-size: 2rem;
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .app-screenshot {
        height: 300px;
    }
    
    .case-card.hebrew-today::before {
        font-size: 4rem;
        top: 10px;
        right: 10px;
    }
    
    .case-card.hebrew-today::after {
        font-size: 3rem;
        bottom: 10px;
        left: 10px;
    }
    
    .placeholder-card::after {
        font-size: 6rem;
    }
}