/* =========================================================
 * Package Infographic (shared across 3 package pages)
 * ========================================================= */
.pkg-infographic {
    padding: 70px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    position: relative;
}
.pkg-infographic__wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
}
.pkg-infographic__wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(47, 90, 174, 0.14);
    border: 3px solid #ffffff;
    outline: 2px dashed rgba(47, 90, 174, 0.25);
    outline-offset: 4px;
    transform: rotate(-0.8deg);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.pkg-infographic__wrap img:hover { transform: rotate(0) scale(1.01); }
@media (max-width: 640px) {
    .pkg-infographic { padding: 50px 0; }
    .pkg-infographic__wrap img { transform: rotate(0); }
}

/* =========================================================
 * Package Rating (shared across 3 package pages)
 * ========================================================= */

.pkg-rating {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
}

.pkg-rating__head { text-align: center; margin-bottom: 40px; }
.pkg-rating__title {
    font-size: clamp(24px, 3vw, 34px);
    color: #0c1a2a;
    margin: 12px 0 0;
    font-weight: 800;
}

/* ===== Summary ===== */
.pkg-rating__summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 24px;
    margin: 0 auto 40px;
    max-width: 480px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.pkg-rating__score {
    font-weight: 900;
    line-height: 1;
    color: #0c1a2a;
}
.pkg-rating__avg {
    font-size: 64px;
    background: linear-gradient(135deg, #2f5aae, #27ae60);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pkg-rating__max {
    font-size: 24px;
    color: #64748b;
    margin-right: 4px;
}

.pkg-rating__count {
    color: #475569;
    font-size: 15px;
}
.pkg-rating__count strong { color: #2f5aae; }

/* ===== Stars (display) ===== */
.pkg-stars {
    position: relative;
    display: inline-block;
    font-size: 28px;
    line-height: 1;
    letter-spacing: 4px;
    user-select: none;
}
.pkg-stars__bg {
    color: #d1d5db;
}
.pkg-stars__fill {
    position: absolute;
    top: 0; right: 0;
    color: #fbbf24;
    overflow: hidden;
    white-space: nowrap;
    direction: ltr; /* fill left-to-right for consistent behavior */
}
.pkg-stars--small { font-size: 16px; letter-spacing: 2px; }
.pkg-stars--display { filter: drop-shadow(0 2px 4px rgba(251,191,36,0.3)); }

/* RTL: the overlay should still cover first N stars starting from the star block's origin.
   In RTL, 'right: 0' aligns with the start (visually right-side). We need LTR inside this
   specific element so that width% fills from the leftmost star upward. */
.pkg-stars__fill,
.pkg-stars__bg {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ===== Comments block ===== */
.pkg-rating__comments {
    max-width: 780px;
    margin: 0 auto;
}

.pkg-rating__form-title {
    font-size: 22px;
    color: #0c1a2a;
    margin-bottom: 12px;
}

.pkg-rating__notes {
    background: #f0f9ff;
    color: #0369a1;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Picker */
.pkg-rating-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fef3c7;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 2px dashed #f59e0b;
}
.pkg-rating-picker__label {
    font-weight: 700;
    color: #92400e;
    margin: 0;
    font-size: 16px;
}
.pkg-stars-picker {
    display: inline-flex;
    gap: 6px;
    font-size: 32px;
    direction: ltr;
    line-height: 1;
}
.pkg-stars-picker .pkg-star {
    color: #d1d5db;
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
}
.pkg-stars-picker .pkg-star:hover {
    transform: scale(1.15);
}
.pkg-stars-picker .pkg-star.is-on {
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(251,191,36,0.4);
}

/* Comment form styling */
#commentform p { margin-bottom: 14px; }
#commentform label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#commentform input:focus,
#commentform textarea:focus {
    outline: none;
    border-color: #2f5aae;
    box-shadow: 0 0 0 3px rgba(47,90,174,0.12);
}

.pkg-rating__submit,
#commentform input[type="submit"],
#commentform button[type="submit"] {
    background: linear-gradient(135deg, #27ae60 0%, #1e874a 100%);
    color: #ffffff;
    border: none;
    padding: 14px 36px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(39,174,96,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.pkg-rating__submit:hover,
#commentform input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(39,174,96,0.4);
}

/* ===== List ===== */
.pkg-rating__list-title {
    font-size: 20px;
    color: #0c1a2a;
    margin: 36px 0 16px;
    padding-right: 16px;
    border-right: 4px solid #27ae60;
}

.pkg-rating__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pkg-rating__item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.pkg-rating__item-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.pkg-rating__avatar img {
    border-radius: 50%;
    border: 2px solid #e5e7eb;
}

.pkg-rating__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pkg-rating__author {
    color: #0c1a2a;
    font-size: 16px;
}

.pkg-rating__date {
    color: #94a3b8;
    font-size: 13px;
}

.pkg-rating__body {
    color: #334155;
    font-size: 15px;
    line-height: 1.7;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .pkg-rating { padding: 56px 0; }
    .pkg-rating__avg { font-size: 48px; }
    .pkg-stars { font-size: 24px; }
    .pkg-stars-picker { font-size: 26px; }
    .pkg-rating-picker {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pkg-stars-picker .pkg-star,
    .pkg-rating__submit { transition: none; }
}
