body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    background-color: white;
}

.logo {
    width: 150px;
    height: 120px;
    background-color: #f1f4f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-img {
    width: 100px;
    height: 80px;
    object-fit: contain;
}

.header-title {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: bold;
}

.header-subtitle {
    color: #666;
    font-size: clamp(12px, 3vw, 14px);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.change-plan-link {
    color: #575d66;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.change-plan-link:hover {
    color: #007bff;
    background-color: #f8f9fa;
    text-decoration: underline;
}

.arrow-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    color: #007bff;
    font-weight: bold;
    font-size: 16px;
}

.change-plan-link:hover .arrow-icon {
    transform: translateX(3px);
}

.animated-box {
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-70%);
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
    animation: boxPulse 2s ease-in-out infinite;
    z-index: 1000;
    white-space: normal;
    width: 150px;
    display: none;
}

.animated-box.show {
    display: block;
}

.animated-box::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 60%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #007bff;
}

.animated-box-content {
    color: white;
    text-align: center;
    line-height: 1.4;
}

.animated-box-heading {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 6px;
    line-height: 1.2;
}

.animated-box-text {
    font-size: 9px;
    font-weight: 400;
    margin-bottom: 6px;
    line-height: 1.3;
}

.animated-box-badge {
    background-color: rgba(255, 255, 255, 0.9);
    color: #007bff;
    border-radius: 3px;
    padding: 3px 10px;
    font-size: 9px;
    display: inline-block;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.animated-box-badge:hover {
    background-color: white;
    transform: scale(1.05);
}

@keyframes boxPulse {
    0%, 100% {
        box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 14px rgba(0, 123, 255, 0.5);
    }
}

.quote-info {
    background-color: transparent;
    padding: 10px 0;
    border-radius: 5px;
    font-size: clamp(12px, 2.5vw, 14px);
    position: relative;
}

.quote-text {
    background-color: #f0f8ff;
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
    position: relative;
    margin-top: 10px;
}

/* ✅ FIXED: Responsive milestone section */
.milestone-details-section {
    background-color: white;
    border: 1px solid #007bff;
    border-radius: 10px;
    padding: 0;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 100%;
}

.milestone-header {
    background-color: #007bff;
    color: white;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.milestone-content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    flex-wrap: wrap;
}

.chapter-sidebar {
    width: 200px;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 100%;
}

.chapter-content-area {
    flex: 1;
    background-color: white;
    padding: 20px;
    overflow-y: auto;
    max-height: 100%;
}

.chapter-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: none;
    border-right: 1px solid #d1d5db;
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

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

.chapter-item.active {
    background-color: white;
    border-left: none;
    border-right: none;
}

.chapter-item:not(.active) {
    background-color: #e9ecef;
}

.chapter-item:hover:not(.active) {
    background-color: #d1d5db;
}

.chapter-sidebar-item {
    padding: 20px 12px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
}

.chapter-sidebar-title {
    font-weight: 600;
    color: #007bff;
    margin-bottom: 8px;
    word-break: break-word;
}

.chapter-sidebar-price {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.chapter-content {
    display: none;
}

.chapter-content.active {
    display: block;
}

.content-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
}

.content-section {
    margin-bottom: 35px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-description {
    font-size: 14px;
    color: #374151;
    text-align: justify;
}

.content-meta {
    background-color: #f8f9fa;
    border-radius: 5px;
}

.meta-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.meta-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
}

.payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #007bff;
}

.detail-label {
    color: #666;
    font-weight: bold;
    font-size: clamp(12px, 2.5vw, 14px);
}

.detail-value {
    color: #333;
    font-size: clamp(12px, 2.5vw, 14px);
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.btn-primary:hover {
    background-color: white;
    color: black;
    border: 1px solid #007bff;
}

.additional-remarks-section {
    background-color: white;
}

.section-heading {
    color: #007bff;
    font-weight: bold;
    font-size: clamp(16px, 4vw, 18px);
    text-transform: uppercase;
}

.footer-text {
    color: #aaa;
    font-size: clamp(11px, 2vw, 13px);
}

.amount-text {
    font-size: clamp(12px, 2.5vw, 14px);
}

.amount-value {
    font-weight: bold;
    font-size: clamp(16px, 4vw, 18px);
}

.remarks-list {
    list-style-type: none;
    padding-left: 0;
}

.remarks-list li {
    font-size: clamp(12px, 2.5vw, 14px);
    line-height: 1.6;
    padding-left: 30px;
    position: relative;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.remarks-list li:before {
    content: '>';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background-color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
}

.header-flex {
    min-width: 280px;
}

@media (max-width: 991px) {
    .animated-box {
        width: 130px;
        padding: 7px 10px;
        left: calc(100% + 5px);
    }

    .animated-box-heading {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .animated-box-text {
        font-size: 8px;
        margin-bottom: 6px;
    }

    .animated-box-badge {
        padding: 2px 8px;
        font-size: 8px;
    }
}

@media (max-width: 767px) {
    .milestone-content-wrapper {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .chapter-sidebar {
        width: 100%;
        flex-direction: row;
        border-bottom: none;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
    }

    .chapter-content-area {
        width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .chapter-item {
        min-width: 150px;
        flex-shrink: 0;
        border-bottom: 1px solid #d1d5db;
        border-right: 1px solid #d1d5db;
    }

    .chapter-item.active {
        border-bottom: none;
        border-right: 1px solid #d1d5db;
    }

    .chapter-item:last-child {
        border-right: none;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .logo-img {
        width: 80px;
        height: 70px;
    }

    .quote-info::after {
        display: none;
    }

    .animated-arrow-container {
        display: none;
    }

    .animated-box {
        width: 110px;
        padding: 6px 8px;
        left: calc(100% + 3px);
        top: 50%;
        transform: translateY(-50%);
    }

    .animated-box::before {
        top: 50%;
    }

    .animated-box-heading {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .animated-box-text {
        font-size: 7px;
        margin-bottom: 5px;
    }

    .animated-box-badge {
        padding: 2px 6px;
        font-size: 7px;
    }
}

@media (min-width: 768px) {
    .container-custom {
        padding: 20px;
    }

    .logo {
        width: 160px;
        height: 130px;
    }

    .logo-img {
        width: 120px;
        height: 100px;
    }
}

@media (min-width: 1024px) {
    .logo {
        width: 180px;
        height: 150px;
    }

    .logo-img {
        width: 140px;
        height: 120px;
    }
}
