/* Guide Page Styles
   ========================================= */

/* Step Card */
.guide-step-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Step Card Description - Limit to 4 lines */
.guide-step-desc {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    min-height: calc(1.5em * 4);
}

.guide-step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #399497, #5ab9bc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.guide-step-card:hover {
    box-shadow: 0 8px 30px rgba(57, 148, 151, 0.15);
    transform: translateY(-4px);
}

.guide-step-card:hover::before {
    transform: scaleX(1);
}

/* Step Marker (Desktop) */
.guide-step-marker {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #399497, #2d7577);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(57, 148, 151, 0.4);
    position: relative;
    z-index: 2;
}

.guide-step-marker::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px dashed rgba(57, 148, 151, 0.3);
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Step Marker (Mobile) */
.guide-step-marker-mobile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #399497, #2d7577);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(57, 148, 151, 0.4);
    position: relative;
    z-index: 2;
}

/* Final Marker */
.guide-step-marker-final {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
    animation: celebrate 1s ease-in-out infinite alternate;
}

@keyframes celebrate {
    0% {
        transform: scale(1) rotate(-5deg);
    }
    100% {
        transform: scale(1.05) rotate(5deg);
    }
}

/* Step Tags */
.guide-step-tags .badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border: 1px solid rgba(57, 148, 151, 0.2);
}

.guide-step-tags .badge:hover {
    background-color: #399497 !important;
    color: white !important;
    border-color: #399497;
}

/* SVG Path Animation */
.guide-path {
    stroke-dasharray: 10, 8;
    animation: dash-flow 30s linear infinite;
}

@keyframes dash-flow {
    to {
        stroke-dashoffset: -1000;
    }
}

/* Mobile Path */
.guide-path-mobile {
    animation: dash-flow-vertical 10s linear infinite;
    background-size: 3px 18px !important;
}

@keyframes dash-flow-vertical {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 180px;
    }
}

/* Journey Container */
.guide-journey {
    padding-bottom: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .guide-step-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 575.98px) {
    .guide-step-card {
        padding: 1rem;
    }

    .guide-step-card lord-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .guide-step-tags .badge {
        font-size: 0.65rem;
    }
}

/* RTL Support */
[dir="rtl"] .guide-step-card .fa-arrow-right {
    transform: scaleX(-1);
}

[dir="rtl"] .guide-step-card .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .guide-step-tags .badge.me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

[dir="rtl"] .btn .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .btn .ms-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* Hover effects on icon */
.guide-step-card:hover lord-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Stretched link overlay fix */
.guide-step-card .stretched-link::after {
    border-radius: 1rem;
}

/* ===========================================
   Step Page Styles
   =========================================== */

/* Step Content Area */
.guide-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.guide-content h2 {
    margin-top: 3rem;
    margin-bottom: 0;
    font-weight: 600;
}

.guide-content .lead {
    font-size: 1.15rem;
    color: #555;
    border-left: 4px solid #399497;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

[dir="rtl"] .guide-content .lead {
    border-left: none;
    border-right: 4px solid #399497;
    padding-left: 0;
    padding-right: 1rem;
}

/* Info Cards */
.info-card {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: #399497;
    box-shadow: 0 4px 15px rgba(57, 148, 151, 0.1);
}

.info-card h5 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Tip Box */
.tip-box {
    background: linear-gradient(135deg, #fff8e1, #fffde7);
    border-left: 4px solid #ffc107;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

[dir="rtl"] .tip-box {
    border-left: none;
    border-right: 4px solid #ffc107;
    border-radius: 0.5rem 0 0 0.5rem;
}

.tip-box strong {
    color: #856404;
}

/* Placeholder Image */
.placeholder-image {
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    border: 2px dashed #ced4da;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    margin: 1.5rem 0;
}

/* Step Number (Sidebar) */
.step-number-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Step Icon Large (Hero) */
.step-icon-large {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 0.5rem;
}

/* Guide Progress */
.guide-progress {
    padding: 0.5rem 0;
}

.guide-progress .progress {
    border-radius: 0;
}

/* Step Navigation Footer */
.guide-step-nav .btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

@media (max-width: 575.98px) {
    .guide-step-nav .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

/* List Group in Sidebar */
.guide-step-content .list-group-item.active {
    background-color: #399497;
    border-color: #399497;
}

.guide-step-content .list-group-item.active .step-number-small {
    background: white !important;
    color: #399497;
}

/* Hero Section */
.guide-step-hero {
    background: linear-gradient(135deg, #399497 0%, #2d7577 100%);
}

.guide-step-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .guide-content .lead {
        font-size: 1.05rem;
    }

    .guide-step-hero h1 {
        font-size: 1.75rem;
    }

    .guide-step-hero .lead {
        font-size: 1rem;
    }
}
