/* ================================
   Portfolio Page Styles
   ================================ */

/* ================================
   Portfolio Hero
   ================================ */
.portfolio-hero {
    position: relative;
    padding: 160px 0 80px;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
}

.portfolio-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--com-primary) 0%, var(--com-primary-dark) 100%);
    background-size: cover;
    background-position: center;
}

.portfolio-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(92, 26, 36, 0.3) 0%,
        rgba(92, 26, 36, 0.6) 100%
    );
}

.portfolio-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    text-align: left;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.back-btn:hover svg {
    transform: translateX(-4px);
}

.back-btn svg {
    transition: transform 0.3s ease;
}

.portfolio-label {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

.portfolio-hero-title {
    font-size: clamp(40px, 8vw, 64px);
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    line-height: 1.1;
    text-align: left;
}

.portfolio-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    text-align: left;
}

/* ================================
   Projects Listing - Accordions
   ================================ */
.projects-listing {
    padding: 80px 0 0 0;
    background: var(--bg-cream);
}

.projects-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-accordion {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion:hover {
    box-shadow: 0 8px 24px rgba(139, 38, 53, 0.1);
    border-color: rgba(139, 38, 53, 0.15);
}

.project-accordion.active {
    box-shadow: 0 8px 32px rgba(139, 38, 53, 0.12);
    border-color: var(--com-primary);
}

.project-accordion-header {
    display: flex;
    align-items: center;
    padding: 20px 28px;
    cursor: pointer;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 20px;
}

.project-accordion:hover .project-accordion-header {
    background: rgba(139, 38, 53, 0.02);
}

.project-accordion.active .project-accordion-header {
    background: var(--com-primary);
}

/* Logo Spot */
.project-logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion.active .project-logo {
    background: rgba(255, 255, 255, 0.15);
}

.project-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.logo-placeholder {
    width: 32px;
    height: 32px;
    border: 2px dashed rgba(139, 38, 53, 0.2);
    border-radius: 6px;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion.active .logo-placeholder {
    border-color: rgba(255, 255, 255, 0.3);
}

.project-header-content {
    flex: 1;
    min-width: 0;
}

.project-accordion .project-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.3;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion:hover .project-title {
    color: var(--com-primary);
}

.project-accordion.active .project-title {
    color: white;
}

.project-accordion .project-location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion .project-location svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion.active .project-location {
    color: rgba(255, 255, 255, 0.75);
}

.project-accordion.active .project-location svg {
    opacity: 0.75;
}

/* Accordion Icon */
.project-accordion-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    background: var(--bg-cream);
    border-radius: 50%;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion:hover .project-accordion-icon {
    background: rgba(139, 38, 53, 0.1);
}

.project-accordion.active .project-accordion-icon {
    background: rgba(255, 255, 255, 0.2);
}

.project-accordion-icon span {
    position: absolute;
    width: 14px;
    height: 2px;
    background: var(--com-primary);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion.active .project-accordion-icon span {
    background: white;
}

.project-accordion-icon span:last-child {
    transform: rotate(90deg);
}

.project-accordion.active .project-accordion-icon span:last-child {
    transform: rotate(0deg);
    opacity: 0;
}

/* Accordion Body */
.project-accordion-body {
    max-height: 0;
    overflow: hidden;
    background: var(--com-primary);
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-accordion.active .project-accordion-body {
    max-height: 800px;
}

.project-details {
    padding: 20px 28px 28px;
    padding-left: 104px; /* Align with title text (logo width + gaps) */
}

/* Bullet Points */
.project-scope {
    list-style: none !important;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 40px;
    padding-top: 4px;
}

.project-scope li {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    list-style: none !important;
    margin: 0;
    padding: 0 0 0 18px;
    text-indent: -18px;
}

.project-scope li::before {
    content: '•';
    color: var(--com-accent-light);
    font-size: 14px;
    margin-right: 10px;
    text-indent: 0;
}

/* ================================
   Full Gallery CTA
   ================================ */
.full-gallery-cta {
    padding: 80px 0;
    background: var(--bg-cream);
}

.gallery-cta-box {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    min-height: 450px;
}

@keyframes subtleGradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.gallery-cta-content {
    position: relative;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(135deg, #ffffff 0%, #f8f6f3 50%, #ffffff 100%);
    background-size: 200% 200%;
    animation: subtleGradientMove 8s ease-in-out infinite;
}

/* Swoosh background effect */
.gallery-cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 30%, rgba(139, 38, 53, 0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 10% 80%, rgba(139, 38, 53, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.cta-label {
    position: relative;
    z-index: 1;
    display: inline-block;
    width: fit-content;
    padding: 8px 20px;
    background: rgba(139, 38, 53, 0.1);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--com-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

.full-gallery-cta .cta-title {
    position: relative;
    z-index: 1;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
    text-align: left;
}

.full-gallery-cta .cta-subtitle {
    position: relative;
    z-index: 1;
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
    text-align: left;
}

/* Gallery Preview Image */
.gallery-cta-image {
    position: relative;
    min-height: 350px;
    overflow: hidden;
}

.gallery-cta-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px);
    transform: scale(1.05);
}

.gallery-cta-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 38, 53, 0.15) 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

/* Button over image - centered */
.gallery-cta-image .cta-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: var(--com-primary);
    padding: 18px 36px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.gallery-cta-image .cta-btn:hover {
    background: var(--com-primary);
    color: white;
    transform: translate(-50%, -50%) translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.gallery-cta-image .cta-btn svg {
    transition: transform 0.3s ease;
}

.gallery-cta-image .cta-btn:hover svg {
    transform: translateX(4px);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 900px) {
    .project-accordion-header {
        padding: 18px 24px;
        gap: 16px;
    }
    
    .project-logo {
        width: 48px;
        height: 48px;
    }
    
    .project-accordion .project-title {
        font-size: 18px;
    }
    
    .project-details {
        padding: 20px 24px 24px;
        padding-left: 88px;
    }
    
    .project-scope {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .gallery-cta-box {
        grid-template-columns: 1fr;
    }
    
    .gallery-cta-content {
        padding: 48px;
    }
    
    .gallery-cta-image {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 140px 0 60px;
        min-height: auto;
    }
    
    .portfolio-hero-title {
        font-size: clamp(32px, 8vw, 48px);
    }
    
    .projects-listing {
        padding: 60px 0;
    }
    
    .full-gallery-cta {
        padding: 60px 0;
    }
    
    .gallery-cta-content {
        padding: 36px;
    }
}

@media (max-width: 600px) {
    .portfolio-hero-subtitle {
        font-size: 16px;
    }
    
    .back-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .project-accordion-header {
        padding: 16px 20px;
        gap: 14px;
    }
    
    .project-logo {
        width: 44px;
        height: 44px;
    }
    
    .logo-placeholder {
        width: 24px;
        height: 24px;
    }
    
    .project-accordion .project-title {
        font-size: 16px;
    }
    
    .project-accordion .project-location {
        font-size: 13px;
    }
    
    .project-accordion-icon {
        width: 32px;
        height: 32px;
    }
    
    .project-accordion-icon span {
        width: 12px;
    }
    
    .project-details {
        padding: 16px 20px 20px;
        padding-left: 20px;
    }
    
    .project-scope li {
        font-size: 14px;
    }
    
    .gallery-cta-content {
        padding: 28px;
    }
    
    .gallery-cta-image {
        min-height: 240px;
    }
    
    .gallery-cta-image .cta-btn {
        padding: 14px 28px;
        font-size: 14px;
    }
    
    .full-gallery-cta .cta-title {
        font-size: 26px;
    }
    
    .full-gallery-cta .cta-subtitle {
        font-size: 15px;
    }
}
