/* ========================================
   SINGLE CAMPAIGN PAGE
======================================== */

/* Custom Font */
@font-face {
    font-family: 'Lilita One';
    src: url('../fonts/LILITAONE-REGULAR.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.single-campaign-page {
    max-width: 440px;
    margin: 0 auto;
    background: #FFFFFF;
    min-height: 100vh;
    padding: 10px 36px 140px;
    font-family: 'Lilita One', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   BACK BUTTON
======================================== */
.back-button-container {
    margin-bottom: 15px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #14b8a6;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button i {
    width: 20px;
    height: 20px;
    background: #F1FF4D;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #333333;
}

.back-button:hover {
    transform: translateX(-3px);
}

/* ========================================
   CAMPAIGN IMAGE SLIDER
======================================== */
.campaign-slider {
    margin-bottom: 20px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Carousel Images Container */
.carousel-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.campaign-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Legacy support */
.campaign-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.campaign-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
    display: flex;
    align-items: center;
    justify-content: center;
}

.campaign-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Arrows */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #FFFFFF;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    font-size: 16px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev:active,
.carousel-next:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.slider-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-dots .dot.active {
    background: #F1FF4D;
    transform: scale(1.2);
}

.slider-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
}

/* ========================================
   CAMPAIGN HEADER
======================================== */
.campaign-header {
    margin-bottom: 20px;
    text-align: center;
}

.single-campaign-page .campaign-header .campaign-title,
.campaign-title {
    font-size: 32px;
    font-weight: 700;
    color: #14b8a6 !important;
    margin: 0;
    line-height: 1.3;
}

/* ========================================
   CAMPAIGN PERKS
======================================== */
.campaign-perks {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 25px;
    padding: 0 24px;
}

.perk-item {
    background: transparent;
    padding: 15px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.perk-item:last-child {
    border-bottom: none;
}

.perk-item:hover {
    padding-left: 5px;
}

.perk-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perk-name {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    margin: 0;
}

.perk-description {
    font-size: 12px;
    color: #757575;
    margin: 0;
}

.perk-amount {
    background: #14b8a6;
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========================================
   SECTION TITLES
======================================== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.title-line {
    flex: 1;
    height: 4px;
    background: #E0E0E0;
}

.title-text {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    white-space: nowrap;
}

/* ========================================
   DESCRIPTION SECTION
======================================== */
.campaign-description {
    margin-bottom: 25px;
}

.description-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.description-content p {
    font-size: 13px;
    line-height: 1.6;
    color: #333333;
    margin: 0 0 12px 0;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #757575;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.read-more-link:hover {
    color: #14b8a6;
}

.read-more-link i {
    font-size: 10px;
}

/* ========================================
   FULL STORY MODAL
======================================== */
.story-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.story-modal {
    background: #FFFFFF;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    animation: modalSlideIn 0.3s ease;
    position: relative;
    margin: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-modal-back-btn {
    position: absolute;
    top: -45px;
    left: 0;
    background: transparent;
    border: none;
    color: #14b8a6;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.story-modal-back-btn:hover {
    opacity: 0.8;
}

.story-modal-back-btn::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #FFC107;
    border-radius: 50%;
    display: inline-block;
}

.story-modal-header {
    padding: 25px 25px 20px;
    border-bottom: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.story-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

.story-modal-close {
    display: none;
}

.story-modal-body {
    padding: 20px 25px 30px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 100px);
}

.story-modal-body p {
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 14px;
    text-align: justify;
}

.story-modal-body p:last-child {
    margin-bottom: 0;
}

.story-modal-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: #14b8a6;
    margin: 20px 0 10px;
}

.story-modal-body ul,
.story-modal-body ol {
    padding-left: 25px;
    margin-bottom: 15px;
}

.story-modal-body li {
    font-size: 15px;
    line-height: 1.8;
    color: #333333;
    margin-bottom: 8px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .story-modal {
        max-width: calc(100% - 40px);
        max-height: 80vh;
        border-radius: 15px;
    }
    
    .story-modal-back-btn {
        top: -40px;
        font-size: 16px;
    }
    
    .story-modal-header {
        padding: 20px 20px 15px;
    }
    
    .story-modal-header h2 {
        font-size: 16px;
    }
    
    .story-modal-body {
        padding: 15px 20px 25px;
        max-height: calc(80vh - 90px);
    }
    
    .story-modal-body p {
        font-size: 13px;
        line-height: 1.6;
    }
}

@media (max-width: 380px) {
    .story-modal {
        max-width: calc(100% - 30px);
    }
    
    .story-modal-back-btn {
        font-size: 15px;
        gap: 6px;
    }
    
    .story-modal-back-btn::before {
        width: 10px;
        height: 10px;
    }
    
    .story-modal-header {
        padding: 18px 15px 12px;
    }
    
    .story-modal-header h2 {
        font-size: 15px;
    }
    
    .story-modal-body {
        padding: 12px 15px 20px;
    }
    
    .story-modal-body p {
        font-size: 12px;
    }
}

/* ========================================
   DONATE SECTION
======================================== */
.donate-section {
    margin-bottom: 25px;
}

.donation-stats {
    margin-bottom: 12px;
}

.stat-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: nowrap; /* Prevent wrapping to new line */
}

.stat-column {
    flex: 1; /* Equal width columns */
    min-width: 0; /* Allow shrinking below content size */
}

.stat-column.stat-left {
    text-align: left;
}

.stat-column.stat-right {
    text-align: right;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-label {
    font-size: 13px;
    color: #757575;
    font-weight: 600;
    white-space: nowrap; /* Prevent label from wrapping */
}

.stat-value {
    font-size: 14px;
    color: #aaaaaa;
    font-weight: 700;
    word-break: break-word; /* Allow breaking long numbers if needed */
}

/* Responsive scaling for smaller screens */
@media (max-width: 380px) {
    .stat-columns {
        gap: 10px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 13px;
    }
}

/* Extra small screens - scale further */
@media (max-width: 320px) {
    .stat-columns {
        gap: 8px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 12px;
    }
}

.stat-separator {
    font-size: 14px;
    color: #757575;
    margin: 0 4px;
}

.progress-bar-wrapper {
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #8B7355;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #14b8a6;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.donation-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.group-info .group-label {
    font-size: 14px;
    color: #333333;
    font-weight: 600;
}

.group-raised {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.group-raised .group-label {
    font-size: 12px;
    color: #757575;
}

.group-raised .group-value {
    font-size: 13px;
    color: #333333;
    font-weight: 700;
}

.donate-button-container {
    text-align: center;
}

.donate-button {
    display: inline-block;
    background: #14b8a6;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    padding: 14px 60px;
    border-radius: 30px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.donate-button:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(23, 162, 184, 0.4);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
======================================== */
@media (max-width: 380px) {
    .single-campaign-page {
        padding: 8px 36px 140px;
    }
    
    .campaign-title {
        font-size: 20px;
    }
    
    .perk-card {
        padding: 12px;
    }
    
    .perk-title {
        font-size: 14px;
    }
    
    .perk-subtitle {
        font-size: 11px;
    }
    
    .perk-price {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .donate-button {
        padding: 12px 50px;
        font-size: 16px;
    }
}
