/* ===================================
   Campaign Flow - Redesigned
   =================================== */

.campaign-flow-section {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    position: relative;
    overflow: hidden;
}

.campaign-flow-section::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(157, 78, 221, 0.1) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 30px) rotate(5deg); }
}

.section-header {
    position: relative;
    z-index: 2;
}

.campaign-flow-section .section-title {
    color: var(--white);
    font-size: 3rem;
}

.campaign-flow-section .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
}

.campaign-flow-intro {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.campaign-flow-intro .large-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
}

/* Flow Diagram Container */
.flow-diagram {
    position: relative;
    max-width: 1300px;
    margin: 0 auto 80px;
    padding: 80px 20px;
    z-index: 2;
}

/* Central Hub */
.flow-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3) 0%, rgba(247, 147, 30, 0.3) 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 35px;
    backdrop-filter: blur(35px);
    border: 4px solid rgba(255, 107, 53, 0.6);
    box-shadow: 
        0 0 100px rgba(255, 107, 53, 0.6),
        inset 0 0 60px rgba(255, 107, 53, 0.2);
    animation: centralPulse 4s ease-in-out infinite;
    z-index: 3;
}

@keyframes centralPulse {
    0%, 100% {
        box-shadow: 0 0 100px rgba(255, 107, 53, 0.6),
                    inset 0 0 60px rgba(255, 107, 53, 0.2);
        transform: translate(-50%, -50%) scale(1);
        border-color: rgba(255, 107, 53, 0.6);
    }
    50% {
        box-shadow: 0 0 150px rgba(255, 107, 53, 0.9),
                    inset 0 0 90px rgba(255, 107, 53, 0.35);
        transform: translate(-50%, -50%) scale(1.08);
        border-color: rgba(255, 107, 53, 0.9);
    }
}

.flow-center-icon {
    font-size: 4rem;
    color: #FF6B35;
    margin-bottom: 15px;
    animation: rotateCenter 4s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.8));
}

@keyframes rotateCenter {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.flow-center h3 {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 8px;
    font-family: var(--font-heading);
    letter-spacing: 1.5px;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.7);
}

.flow-center p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Orbital Ring - ENHANCED */
.flow-diagram::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 750px;
    height: 750px;
    transform: translate(-50%, -50%);
    border: 3px dashed rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    animation: rotateRing 80s linear infinite;
    pointer-events: none;
    box-shadow: inset 0 0 50px rgba(255, 107, 53, 0.15),
                0 0 50px rgba(255, 107, 53, 0.15);
}

@keyframes rotateRing {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Flow Steps Wrapper */
.flow-steps-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 950px;
    margin: 0 auto;
}

/* Individual Step Cards */
.flow-step {
    position: absolute;
    width: 200px;
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(30px);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.flow-step:hover {
    background: rgba(255, 255, 255, 0.16);
    border-width: 4px;
    border-color: var(--step-color);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                0 0 40px var(--step-color);
    z-index: 100;
}

/* Positioning - Pentagon/Star Layout - FIXED POSITIONS - NO OVERLAP */
.flow-step:nth-child(1) {
    /* 頂部中央 (12點鐘) */
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    --step-color: #FF6B35;
}

.flow-step:nth-child(2) {
    /* 右上 (2點鐘) */
    top: 180px;
    right: 50px;
    --step-color: #667eea;
}

.flow-step:nth-child(3) {
    /* 右下 (5點鐘) */
    bottom: 100px;
    right: 150px;
    --step-color: #9D4EDD;
}

.flow-step:nth-child(4) {
    /* 左下 (7點鐘) */
    bottom: 100px;
    left: 150px;
    --step-color: #f093fb;
}

.flow-step:nth-child(5) {
    /* 左上 (10點鐘) */
    top: 180px;
    left: 50px;
    --step-color: #4facfe;
}

/* Size Variations for Visual Interest - COMPACT */
.flow-step:nth-child(1) {
    width: 230px !important;
    padding: 24px 20px !important;
}

.flow-step:nth-child(2) {
    width: 210px !important;
    padding: 22px 18px !important;
}

.flow-step:nth-child(3) {
    width: 240px !important;
    padding: 26px 22px !important;
}

.flow-step:nth-child(4) {
    width: 210px !important;
    padding: 22px 18px !important;
}

.flow-step:nth-child(5) {
    width: 220px !important;
    padding: 24px 20px !important;
}

/* Hover Effects - Different for Each - ENHANCED WITH MORE MOVEMENT */
.flow-step:nth-child(1):hover {
    transform: translate(-50%, -20px) scale(1.12);
}

.flow-step:nth-child(2):hover {
    transform: translate(20px, -15px) scale(1.12) rotate(2deg);
}

.flow-step:nth-child(3):hover {
    transform: translate(20px, 15px) scale(1.12) rotate(-2deg);
}

.flow-step:nth-child(4):hover {
    transform: translate(-20px, 15px) scale(1.12) rotate(2deg);
}

.flow-step:nth-child(5):hover {
    transform: translate(-20px, -15px) scale(1.12) rotate(-2deg);
}

/* Step Number Badge - ENHANCED */
.flow-number {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--step-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
                0 0 20px var(--step-color);
    border: none;
    transition: all 0.4s ease;
}

.flow-step:hover .flow-number {
    transform: translateX(-50%) scale(1.2) rotate(360deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7),
                0 0 30px var(--step-color);
}

/* Step Icon - ENHANCED */
.flow-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    background: var(--step-color);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--white);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: all 0.4s ease;
}

.flow-step:hover .flow-icon {
    transform: scale(1.15) rotate(10deg);
}

.flow-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 25px;
    background: var(--step-color);
    opacity: 0.5;
    filter: blur(18px);
    z-index: -1;
}

/* Content Typography - IMPROVED VISIBILITY */
.flow-content h3 {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 4px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.flow-content h4 {
    font-size: 1rem;
    color: var(--step-color);
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.flow-content p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Deliverables List */
.flow-deliverables {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    text-align: left;
}

.flow-deliverables li {
    padding: 3px 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    padding-left: 16px;
    line-height: 1.3;
}

.flow-deliverables li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--step-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Time Badge */
.flow-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.flow-time i {
    font-size: 0.75rem;
}

/* Connecting Lines */
.flow-step::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, var(--step-color), transparent);
    opacity: 0.25;
    pointer-events: none;
}

.flow-step:nth-child(1)::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%) rotate(36deg);
    transform-origin: top;
}

.flow-step:nth-child(2)::before {
    bottom: 100%;
    left: 20%;
    transform: rotate(-54deg);
    transform-origin: bottom;
}

.flow-step:nth-child(3)::before {
    top: 50%;
    left: -50px;
    width: 100px;
    height: 2px;
    background: linear-gradient(to left, var(--step-color), transparent);
}

.flow-step:nth-child(4)::before {
    top: 50%;
    right: -50px;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, var(--step-color), transparent);
}

.flow-step:nth-child(5)::before {
    bottom: 100%;
    right: 20%;
    transform: rotate(54deg);
    transform-origin: bottom;
}

/* Flow Note */
.flow-note {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    border-left: 5px solid var(--primary-color);
    border-radius: 20px;
    padding: 35px 40px;
    display: flex;
    gap: 25px;
    align-items: flex-start;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.note-icon {
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.5);
}

.note-content h4 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 15px;
    font-weight: 800;
}

.note-content p {
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.note-content .btn {
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.5);
    font-size: 1.05rem;
}

/* ===================================
   Portfolio Masonry Grid Styles
   =================================== */

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--light-gray);
    color: var(--dark-gray);
    padding: 10px 25px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.portfolio-grid-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.portfolio-item {
    opacity: 1;
    transform: scale(1);
    transition: all var(--transition-normal);
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.portfolio-image-only {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 350px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.portfolio-image-only:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.placeholder-text {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.5;
}

.portfolio-overlay-minimal {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 30px 25px;
    color: white;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-image-only:hover .portfolio-overlay-minimal {
    opacity: 1;
}

.portfolio-cat {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.portfolio-overlay-minimal h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.portfolio-overlay-minimal p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.portfolio-note {
    background: rgba(255, 107, 53, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.portfolio-note p {
    margin: 0;
    color: var(--dark-gray);
    line-height: 1.7;
}

.portfolio-note i {
    color: var(--primary-color);
    margin-right: 8px;
}

.portfolio-note a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.portfolio-note a:hover {
    color: var(--secondary-color);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1200px) {
    .flow-steps-wrapper {
        height: auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        padding: 50px 20px;
    }
    
    .flow-step {
        position: static !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 30px 25px !important;
    }
    
    .flow-step:hover {
        transform: translateY(-10px) scale(1.05) !important;
    }
    
    .flow-step::before {
        display: none;
    }
    
    .flow-center {
        position: static;
        transform: none;
        margin: 0 auto 50px;
        grid-column: 1 / -1;
    }
    
    .flow-diagram::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .campaign-flow-section {
        padding: 60px 0;
    }
    
    .campaign-flow-intro {
        margin-bottom: 40px;
    }
    
    .flow-steps-wrapper {
        grid-template-columns: 1fr;
        padding: 30px 15px;
        gap: 30px;
    }
    
    .flow-step {
        width: 100% !important;
        padding: 25px 20px !important;
    }
    
    .flow-center {
        width: 180px;
        height: 180px;
        padding: 25px;
    }
    
    .flow-center-icon {
        font-size: 2.8rem;
    }
    
    .flow-center h3 {
        font-size: 1.3rem;
    }
    
    .flow-center p {
        font-size: 0.85rem;
    }
    
    .flow-icon {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }
    
    .flow-content h3 {
        font-size: 1.2rem;
    }
    
    .flow-content h4 {
        font-size: 0.95rem;
    }
    
    .flow-deliverables li {
        font-size: 0.85rem;
    }
    
    .flow-note {
        flex-direction: column;
        padding: 30px 25px;
        gap: 20px;
    }
    
    .note-icon {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
    
    .note-content h4 {
        font-size: 1.3rem;
    }
    
    .note-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .campaign-flow-section .section-title {
        font-size: 2rem;
    }
    
    .flow-step {
        padding: 22px 18px !important;
    }
    
    .flow-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: -15px;
    }
    
    .flow-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
    
    .flow-content h3 {
        font-size: 1.1rem;
    }
    
    .flow-content h4 {
        font-size: 0.9rem;
    }
    
    .flow-deliverables {
        margin: 10px 0;
    }
    
    .flow-deliverables li {
        font-size: 0.8rem;
        padding: 4px 0;
        padding-left: 16px;
    }
    
    .flow-time {
        font-size: 0.75rem;
        padding: 5px 10px;
        margin-top: 8px;
    }
    
    .flow-center {
        width: 160px;
        height: 160px;
        padding: 20px;
    }
    
    .flow-center-icon {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }
    
    .flow-center h3 {
        font-size: 1.2rem;
    }
    
    .flow-center p {
        font-size: 0.8rem;
    }
    
    .note-content h4 {
        font-size: 1.2rem;
    }
    
    .note-content p {
        font-size: 0.95rem;
    }
    
    .note-content .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}