/* ========================================
   STRONY I APLIKACJE - CUSTOM STYLES
   Version: 1.0
   Description: Styles for pages and mobile apps section
   ======================================== */

/* ========================================
   PORTFOLIO GRID - SHARED
   ======================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(26, 58, 82, 0.15);
}

.portfolio-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,.1) 10px,
        rgba(255,255,255,.1) 20px
    );
}

.portfolio-image i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.portfolio-content .project-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 0.85rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.portfolio-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   CAPABILITIES CARDS
   ======================================== */
.capability-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    height: 100%;
}

.capability-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26, 58, 82, 0.12);
}

.capability-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.5rem;
}

.capability-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.capability-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   PROCESS TIMELINE
   ======================================== */
.process-timeline {
    position: relative;
    padding: 2rem 0;
}

.process-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(45, 212, 163, 0.3);
}

.step-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   TECHNOLOGY STACK
   ======================================== */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.tech-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.tech-logo:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.tech-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    padding: 5rem 0;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(45, 212, 163, 0.1);
    border-radius: 50%;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    position: relative;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* ========================================
   PORTFOLIO PAGE - SPECIFIC STYLES
   ======================================== */

/* Hero for Portfolio Page */
.portfolio-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: white;
    padding: 140px 0 80px 0;
    text-align: center;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-light);
    background: white;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Portfolio Grid Override for Portfolio Page */
.portfolio-hero ~ * .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.portfolio-hero ~ * .portfolio-item {
    cursor: pointer;
}

.portfolio-hero ~ * .portfolio-image {
    height: 300px;
}

.portfolio-hero ~ * .portfolio-image i {
    font-size: 4rem;
}

.portfolio-hero ~ * .portfolio-content h3 {
    font-size: 1.4rem;
}

/* Project Meta Tags */
.project-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.project-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 0.85rem;
    border-radius: 20px;
}

.project-tag.tech {
    background: #e3f2fd;
    color: #1565c0;
}

.project-tag.industry {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* ========================================
   PORTFOLIO MODAL
   ======================================== */
.portfolio-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    overflow-y: auto;
}

.portfolio-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-wrapper {
    background: white;
    max-width: 900px;
    width: 90%;
    margin: 2rem;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: scale(1.1);
    background: var(--bg-light);
}

.modal-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-details {
    padding: 2rem;
}

.modal-details h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */
@media (max-width: 768px) {
    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Process Timeline */
    .process-step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    /* CTA Section */
    .cta-section h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Filter Tabs */
    .filter-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        text-align: center;
    }
    
    /* Portfolio Hero */
    .portfolio-hero {
        padding: 120px 0 60px 0;
    }
    
    .portfolio-hero h1 {
        font-size: 2rem;
    }
    
    /* Modal */
    .modal-content-wrapper {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-image {
        height: 250px;
    }
    
    .modal-details {
        padding: 1.5rem;
    }
    
    .modal-details h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .capability-card {
        padding: 1.5rem;
    }
    
    .capability-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .tech-logo {
        width: 60px;
        height: 60px;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .portfolio-image {
        height: 200px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .portfolio-modal,
    .filter-tabs,
    .cta-section {
        display: none;
    }
    
    .portfolio-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* === HERO EYEBROW === */
.hero-section .hero-eyebrow {
    display: inline-block;
    color: var(--accent-color, #2dd4a3);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    padding: 0.4rem 1rem;
    background: rgba(45, 212, 163, 0.15);
    border-radius: 20px;
    border: 1px solid rgba(45, 212, 163, 0.4);
}
 
@media (max-width: 768px) {
    .hero-section .hero-eyebrow {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
}
 
 
/* === HERO BUTTON OUTLINE-LIGHT (ciemne tło hero) === */
.hero-section .btn-outline-light {
    color: white;
    border-color: rgba(255, 255, 255, 0.7);
    background: transparent;
    font-weight: 600;
}
 
.hero-section .btn-outline-light:hover {
    background: white;
    color: var(--primary-color, #1a3a52);
    border-color: white;
}
 
 
/* === BREADCRUMBS - ZAGADNIENIE PROBLEMU NAWIGACJI ZRZUTKOWEJ === */
/* Style główne breadcrumbs są w style.css. Tu drobne fix-y, jeśli się rozjedzie. */
 
.breadcrumb-wrapper {
    background: white;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    padding: 0.75rem 0;
}
 
 
/* === FAQ ACCORDION (Bootstrap) - dostosowanie do brand === */
#faq .accordion-item {
    background: white;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 12px !important;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(26, 58, 82, 0.04);
}
 
#faq .accordion-item:hover {
    box-shadow: 0 4px 16px rgba(26, 58, 82, 0.08);
}
 
#faq .accordion-button {
    background: transparent;
    color: var(--text-dark, #1a3a52);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border: none;
    box-shadow: none;
    line-height: 1.4;
}
 
#faq .accordion-button:not(.collapsed) {
    background: rgba(45, 212, 163, 0.05);
    color: var(--text-dark, #1a3a52);
    box-shadow: none;
}
 
#faq .accordion-button:focus {
    box-shadow: none;
    border: none;
}
 
#faq .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232dd4a3'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
 
#faq .accordion-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted, #5a6c7d);
    font-size: 1rem;
    line-height: 1.7;
}
 
#faq .accordion-body a {
    color: var(--accent-color, #2dd4a3);
    font-weight: 600;
}
 
@media (max-width: 768px) {
    #faq .accordion-button {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }
    
    #faq .accordion-body {
        padding: 0 1.25rem 1.25rem 1.25rem;
        font-size: 0.95rem;
    }
}
 
 
/* === SECTIONS - mocne tezy z ikonami === */
.bg-light h3.h5 {
    color: var(--text-dark, #1a3a52);
    font-weight: 600;
}
 
.bg-light .text-muted a {
    color: var(--accent-color, #2dd4a3);
    font-weight: 600;
    text-decoration: none;
}
 
.bg-light .text-muted a:hover {
    text-decoration: underline;
}
/* === FIX: Ukryj dekoracyjne paski gdy w portfolio-image jest realny obrazek === */
.portfolio-image:has(img)::before {
    display: none !important;
}

.portfolio-image:has(img) {
    background: none !important;
    padding: 0 !important;
}


/* === KARTY PORTFOLIO JAKO LINK === */

/* Reset stylów dla <a> które zachowuje się jak karta */
a.portfolio-item.portfolio-link {
    text-decoration: none;
    color: inherit;
    display: block; /* żeby <a> zachowywało się jak div */
    cursor: pointer;
}

/* Hover - mocniejszy niż dla zwykłych portfolio-item */
a.portfolio-item.portfolio-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(45, 212, 163, 0.25); /* turkusowy cień - sygnał akcji */
    border-color: var(--accent-color, #2dd4a3);
}

/* Hover na tekstach wewnątrz karty */
a.portfolio-item.portfolio-link:hover .portfolio-content h3 {
    color: var(--accent-color, #2dd4a3);
    transition: color 0.3s ease;
}

a.portfolio-item.portfolio-link:hover .portfolio-link-icon {
    transform: translate(2px, -2px);
    transition: transform 0.3s ease;
}

/* Ikonka external-link obok nazwy projektu */
.portfolio-link-icon {
    font-size: 0.7em;
    color: var(--accent-color, #2dd4a3);
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: all 0.3s ease;
    vertical-align: middle;
}

a.portfolio-item.portfolio-link:hover .portfolio-link-icon {
    opacity: 1;
}

/* Focus state dla accessibility (klawiatura) */
a.portfolio-item.portfolio-link:focus,
a.portfolio-item.portfolio-link:focus-visible {
    outline: 3px solid var(--accent-color, #2dd4a3);
    outline-offset: 2px;
}


/* === KAFELKI APLIKACJI MOBILNYCH - WIĘKSZA WYSOKOŚĆ === */

#aplikacje .portfolio-image {
    height: 480px;
    /* Tło jakby "scena" pod telefonem - delikatny gradient */
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 1.5rem;
    /* Ze względu na pionowy mockup - centrowanie */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mockup telefonu - object-fit: contain żeby nie kadrował */
#aplikacje .portfolio-image img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    /* Delikatny shadow pod telefonem dla głębi */
    filter: drop-shadow(0 8px 16px rgba(26, 58, 82, 0.15));
}


/* === RESPONSYWNOŚĆ === */

/* Tablet - lekkie zmniejszenie */
@media (max-width: 991px) {
    #aplikacje .portfolio-image {
        height: 420px;
    }
}

/* Mobile - mniejsze, ale nadal pionowe */
@media (max-width: 768px) {
    #aplikacje .portfolio-image {
        height: 380px;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    #aplikacje .portfolio-image {
        height: 340px;
    }
}