/* ===================================
   Enhanced Home Page Styles - Fixed
   =================================== */

/* Reset conflicts with old styles */
.neo-hero.enhanced,
.neo-hero.enhanced * {
    box-sizing: border-box;
}

/* Fix horizontal overflow - Critical */
html,
body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

.portfolio-layout {
    overflow-x: hidden !important;
    max-width: 100%;
}

.portfolio-main {
    overflow-x: hidden !important;
    max-width: 100%;
}

/* Layout Fix - Desktop Only - Sidebar + Main must have same height */
@media (min-width: 992px) {
    .portfolio-layout {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        min-height: 100vh;
    }

    .portfolio-sidebar {
        flex-shrink: 0;
        width: 320px;
        position: relative !important;
        height: auto !important;
        min-height: 100%;
    }

    .portfolio-sidebar .sidebar-inner {
        position: sticky;
        top: 0;
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .portfolio-main {
        flex: 1;
        min-height: 100%;
    }
}

/* Full Width Home Page */
.portfolio-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    overflow-x: hidden !important;
}

.portfolio-content .container-fluid {
    width: 100%;
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Neo Hero Enhanced */
.neo-hero.enhanced {
    padding: 2.5rem 0 2rem;
    background: linear-gradient(135deg, rgba(87, 179, 103, 0.03) 0%, transparent 50%);
    direction: rtl;
    width: 100%;
    max-width: 100%;
}

.neo-hero.enhanced .neo-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
    direction: rtl;
}

.neo-hero.enhanced .hero-core {
    background: linear-gradient(135deg, #ffffff 0%, #f9fdfa 100%);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(15, 32, 24, 0.08),
        0 0 0 1px rgba(87, 179, 103, 0.1);
    border: 1.5px solid rgba(87, 179, 103, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.neo-hero.enhanced .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(87, 179, 103, 0.1) 0%, rgba(87, 179, 103, 0.15) 100%);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1rem;
    width: fit-content;
}

.neo-hero.enhanced h1 {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    line-height: 1.3;
    margin-bottom: 0.8rem;
    color: var(--gray-900);
}

.neo-hero.enhanced h1 span {
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.9em;
    margin-top: 0.3rem;
}

.neo-hero.enhanced .hero-description {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.neo-hero.enhanced .hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.neo-hero.enhanced .meta-chip {
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 50px;
    background: rgba(87, 179, 103, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(87, 179, 103, 0.15);
    display: inline-flex;
    align-items: center;
}

.neo-hero.enhanced .meta-chip i {
    font-size: 0.7rem;
}

/* Hero Title Enhanced - New Design */
.neo-hero.enhanced .hero-title {
    margin-bottom: 1.5rem;
}

.neo-hero.enhanced .hero-title .title-line {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.2;
}

.neo-hero.enhanced .hero-title .title-highlight {
    display: block;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    line-height: 1.1;
    margin: 0.3rem 0;
}

.neo-hero.enhanced .hero-title .title-sub {
    display: block;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: var(--gray-600);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Hero Stats - Modern Card Design */
.neo-hero.enhanced .hero-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 1.5rem;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, rgba(87, 179, 103, 0.05) 0%, rgba(87, 179, 103, 0.02) 100%);
    border-radius: 16px;
    border: 1.5px solid rgba(87, 179, 103, 0.1);
}

.neo-hero.enhanced .stat-item {
    text-align: center;
    flex: 1;
    padding: 0 1rem;
}

.neo-hero.enhanced .stat-number {
    font-size: clamp(1.8rem, 2.5vw, 2.2rem);
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.neo-hero.enhanced .stat-plus {
    color: var(--primary-color);
    font-weight: 600;
}

.neo-hero.enhanced .stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.neo-hero.enhanced .stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, rgba(87, 179, 103, 0.3), transparent);
}

/* Hero Badges - Certificate Pills */
.neo-hero.enhanced .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.neo-hero.enhanced .badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #fff 0%, #f9fdfa 100%);
    border: 1.5px solid rgba(87, 179, 103, 0.15);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-800);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.neo-hero.enhanced .badge-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(87, 179, 103, 0.15);
}

.neo-hero.enhanced .badge-item i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Hero CTA Buttons Enhanced */
.neo-hero.enhanced .hero-ctas {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.neo-hero.enhanced .hero-btn-primary {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 12px;
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(87, 179, 103, 0.3);
    transition: all 0.3s ease;
}

.neo-hero.enhanced .hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(87, 179, 103, 0.4);
}

.neo-hero.enhanced .hero-btn-secondary {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 12px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-dark);
    transition: all 0.3s ease;
}

.neo-hero.enhanced .hero-btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Animation for eyebrow */
.neo-hero.enhanced .eyebrow.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.neo-hero.enhanced .hero-ctas .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

.neo-hero.enhanced .btn-outline-success {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-dark);
}

.neo-hero.enhanced .btn-outline-success:hover {
    background: var(--primary-color);
    color: white;
}

/* Hero Vision Enhanced - Full Height Image */
.neo-hero.enhanced .hero-vision {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.neo-hero.enhanced .vision-frame {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    flex: 1;
    min-height: 350px;
}

.neo-hero.enhanced .vision-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.neo-hero.enhanced .vision-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-green {
    color: #10b981;
    animation: pulse 2s infinite;
    font-size: 0.5rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Experiences Mini - Fixed */
.experiences-mini {
    background: linear-gradient(135deg, #fff 0%, #f9fdfa 100%);
    border-radius: 16px;
    padding: 1rem;
    border: 1.5px solid rgba(87, 179, 103, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.experiences-mini h4 {
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.experiences-mini h4 i {
    font-size: 0.85rem;
}

.exp-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exp-card {
    background: rgba(87, 179, 103, 0.04);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    border-right: 3px solid var(--primary-color);
}

.exp-card strong {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-800);
    margin-bottom: 0.15rem;
}

.exp-card p {
    font-size: 0.7rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.4;
}

.exp-card.timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.6rem 0.9rem;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 100px;
}

.timeline-item .year {
    font-size: 0.75rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.timeline-item .title {
    font-size: 0.7rem;
    color: var(--gray-600);
    line-height: 1.3;
}

/* ===================================
   Partners Section - Infinite Marquee
   =================================== */
.partners-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, rgba(87, 179, 103, 0.02) 0%, rgba(255, 255, 255, 0) 50%, rgba(87, 179, 103, 0.02) 100%);
    overflow: hidden !important;
    direction: rtl;
    width: 100%;
    max-width: 100%;
}

.partners-header {
    text-align: center;
    margin-bottom: 2rem;
}

.partners-header .eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(87, 179, 103, 0.1) 0%, rgba(87, 179, 103, 0.15) 100%);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.partners-header h3 {
    font-size: 1.6rem;
    color: var(--gray-900);
    margin: 0;
    font-weight: 700;
}

.partners-marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.partners-marquee {
    display: flex;
    width: 100%;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    flex-shrink: 0;
    min-width: 100%;
    animation: scroll-left 20s linear infinite;
}

.partner-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid rgba(87, 179, 103, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    width: 180px;
    height: 90px;
    overflow: hidden;
}

.partner-item:hover {
    box-shadow: 0 10px 30px rgba(87, 179, 103, 0.15);
    border-color: rgba(87, 179, 103, 0.3);
}

.partner-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.8rem;
}

.partner-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(10%);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.partner-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }


    100% {
        transform: translateX(calc(-100% - 2rem));
    }
}

/* Pause on hover */
.partners-marquee:hover .marquee-track {
    animation-play-state: paused;
}

/* ===================================
/* ===================================
   Booking Section Styles - Premium
   =================================== */
.booking-section-premium {
    padding: 4rem 0;
    background: linear-gradient(180deg, rgba(87, 179, 103, 0.03) 0%, transparent 100%);
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.booking-section-premium::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(87, 179, 103, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
    z-index: 0;
}

.booking-header-premium {
    position: relative;
    z-index: 1;
    margin-bottom: 3.5rem;
}

.booking-header-premium .eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--primary-dark);
    background: rgba(87, 179, 103, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.booking-header-premium .section-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.booking-header-premium .section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.slots-premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.slot-card-premium {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(87, 179, 103, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.slot-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(87, 179, 103, 0.1);
    border-color: rgba(87, 179, 103, 0.3);
}

.card-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.slot-content-wrapper {
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.slot-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 90px;
    background: rgba(87, 179, 103, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(87, 179, 103, 0.1);
    text-align: center;
}

.slot-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.day-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
}

.slot-details {
    flex: 1;
}

.slot-time-large {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.time-separator {
    color: var(--primary-color);
    font-weight: 400;
}

.slot-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

.meta-badge.online {
    color: #3b82f6;
}

.meta-badge.inperson {
    color: #d97706;
}

.meta-divider {
    color: #e5e7eb;
}

.slot-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.btn-book {
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-book.active {
    background: var(--gray-900);
    color: white;
    cursor: pointer;
}

.btn-book.active:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.btn-book.disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.slot-card-premium.booked {
    opacity: 0.7;
    filter: grayscale(1);
    pointer-events: none;
}

/* Booking Modal Styles - Enhanced */
#bookingModal .modal-content {
    border: none;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#bookingModal .modal-header {
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    padding: 1.5rem 2rem;
    border-radius: 24px 24px 0 0;
}

#bookingModal .modal-title {
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.25rem;
}

#bookingModal .modal-body {
    padding: 2rem;
}

#bookingModal .form-control {
    border-radius: 12px;
    border: 2px solid #f3f4f6;
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

#bookingModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(87, 179, 103, 0.1);
    background: white;
}

#bookingModal .form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

#bookingModal .modal-footer {
    padding: 1.5rem 2rem;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    border-radius: 0 0 24px 24px;
}

/* Responsive Premium Booking */
@media (max-width: 768px) {
    .booking-section-premium {
        padding: 3rem 0;
    }

    .booking-header-premium .section-title {
        font-size: 1.8rem;
    }

    .slot-content-wrapper {
        flex-direction: column;
        padding: 1.2rem;
        gap: 1rem;
        text-align: center;
    }

    .slot-date-box {
        width: 100%;
        height: auto;
        padding: 0.8rem;
        flex-direction: row;
        gap: 0.8rem;
    }

    .slot-date-box .slot-icon {
        margin-bottom: 0;
    }

    .slot-details {
        width: 100%;
    }

    .slot-time-large {
        justify-content: center;
        font-size: 1.6rem;
    }

    .slot-meta {
        justify-content: center;
    }

    .slot-action {
        width: 100%;
    }

    .btn-book {
        width: 100%;
        justify-content: center;
    }

    .card-decoration {
        width: 100%;
        height: 4px;
        top: 0;
        right: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .partners-section {
        padding: 2rem 0;
    }

    .partners-header h3 {
        font-size: 1.3rem;
    }

    .marquee-content {
        gap: 1.5rem;
    }

    .partner-item {
        width: 160px;
        height: 80px;
    }
}

/* Capsule Grid Enhanced - Fixed */
.capsule-grid.enhanced {
    padding: 2rem 0 2.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(87, 179, 103, 0.02) 100%);
    direction: rtl;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.capsule-grid.enhanced .capsule-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(87, 179, 103, 0.06) 0%, rgba(87, 179, 103, 0.02) 100%);
    border-radius: 20px;
    border: 1.5px solid rgba(87, 179, 103, 0.1);
    flex-wrap: wrap;
    gap: 1.5rem;
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.capsule-grid.enhanced .capsule-head::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(87, 179, 103, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.capsule-grid.enhanced .capsule-head>div {
    flex: 1;
    min-width: 250px;
    position: relative;
    z-index: 1;
}

.capsule-grid.enhanced .capsule-head .eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 8px rgba(87, 179, 103, 0.15);
    border: 1px solid rgba(87, 179, 103, 0.2);
    font-weight: 600;
}

.capsule-grid.enhanced .capsule-head .eyebrow i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.capsule-grid.enhanced .capsule-head h2 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--gray-900);
    font-weight: 700;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.capsule-grid.enhanced .capsule-head>p {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin: 0;
    max-width: 350px;
    line-height: 1.6;
    text-align: right;
    position: relative;
    z-index: 1;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border-right: 3px solid var(--primary-color);
}

.capsule-grid.enhanced .capsule-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.capsule-grid.enhanced .capsule-item {
    display: flex;
    flex-direction: column;
    padding: 1.3rem;
    background: linear-gradient(135deg, #fff 0%, #fafdfb 100%);
    border-radius: 16px;
    border: 1.5px solid rgba(87, 179, 103, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: all 0.3s ease;
    min-height: 200px;
}

.capsule-grid.enhanced .capsule-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(87, 179, 103, 0.12);
    border-color: rgba(87, 179, 103, 0.2);
    text-decoration: none;
    color: inherit;
}

.capsule-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(87, 179, 103, 0.1) 0%, rgba(87, 179, 103, 0.15) 100%);
    border-radius: 12px;
    margin-bottom: 0.8rem;
}

.capsule-icon i {
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.capsule-grid.enhanced .capsule-item>span:first-of-type {
    font-size: 0.7rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.capsule-grid.enhanced .capsule-item h3 {
    font-size: 1rem;
    margin: 0.3rem 0 0.5rem;
    line-height: 1.35;
    color: var(--gray-900);
}

.capsule-grid.enhanced .capsule-item>p {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 0;
    flex-grow: 1;
}

.capsule-arrow {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(87, 179, 103, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.capsule-arrow i {
    color: var(--primary-dark);
    font-size: 0.8rem;
}

.capsule-grid.enhanced .capsule-item:hover .capsule-arrow {
    background: var(--primary-color);
}

.capsule-grid.enhanced .capsule-item:hover .capsule-arrow i {
    color: white;
}

/* Footer Enhanced */
.portfolio-footer {
    background: linear-gradient(135deg, #0a1f14 0%, #03140b 100%) !important;
    color: rgba(255, 255, 255, 0.9);
    padding: 1.5rem 0 1rem !important;
    border-top: 3px solid var(--primary-color);
    direction: rtl;
    position: relative;
    z-index: 100;
}

.portfolio-footer * {
    pointer-events: auto;
}

.portfolio-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.portfolio-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.portfolio-footer .footer-brand img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.portfolio-footer .footer-brand>div {
    display: flex;
    flex-direction: column;
}

.portfolio-footer .footer-brand span {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.portfolio-footer .footer-brand small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.portfolio-footer .footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.portfolio-footer .footer-links a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
}

.portfolio-footer .footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.portfolio-footer .footer-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
    background: rgba(87, 179, 103, 0.1);
}

.portfolio-footer .footer-links a:hover::after {
    width: 100%;
}

.portfolio-footer .footer-social {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.portfolio-footer .footer-social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-footer .footer-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(87, 179, 103, 0.4);
    border-color: var(--primary-color);
}

.portfolio-footer .footer-bottom {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.portfolio-footer .footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Mobile Header Fix */
@media (max-width: 991px) {
    .neo-hero.enhanced .neo-hero-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .neo-hero.enhanced .hero-core {
        padding: 1.5rem;
    }

    .neo-hero.enhanced .hero-title .title-line {
        font-size: 1.6rem;
    }

    .neo-hero.enhanced .hero-title .title-highlight {
        font-size: 2rem;
    }

    .neo-hero.enhanced .hero-title .title-sub {
        font-size: 1rem;
    }

    .neo-hero.enhanced .hero-stats {
        padding: 1rem;
    }

    .neo-hero.enhanced .stat-number {
        font-size: 1.6rem;
    }

    .neo-hero.enhanced .stat-label {
        font-size: 0.65rem;
    }

    .neo-hero.enhanced .hero-badges {
        justify-content: center;
    }

    .neo-hero.enhanced .vision-frame {
        min-height: 280px;
    }

    .capsule-grid.enhanced .capsule-head {
        flex-direction: column;
        text-align: right;
    }

    .capsule-grid.enhanced .capsule-head>p {
        text-align: right;
        max-width: 100%;
    }

    .portfolio-footer .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .portfolio-footer .footer-brand {
        justify-content: center;
    }

    .portfolio-footer .footer-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {

    /* Mobile Sidebar Toggle */
    .portfolio-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .portfolio-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .neo-hero.enhanced {
        padding: 1.5rem 0;
    }

    .neo-hero.enhanced .hero-core {
        padding: 1.2rem;
    }

    .neo-hero.enhanced h1 {
        font-size: 1.35rem;
    }

    .neo-hero.enhanced .hero-description {
        font-size: 0.9rem;
    }

    .neo-hero.enhanced .hero-dials {
        gap: 0.4rem;
    }

    .neo-hero.enhanced .hero-dials div {
        padding: 0.6rem 0.3rem;
    }

    .neo-hero.enhanced .hero-dials strong {
        font-size: 1.2rem;
    }

    .neo-hero.enhanced .hero-dials span {
        font-size: 0.65rem;
    }

    .neo-hero.enhanced .vision-frame {
        min-height: 250px;
    }

    .exp-card.timeline {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-item {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        min-width: auto;
    }

    .capsule-grid.enhanced {
        padding: 1.5rem 0 2rem;
    }

    .capsule-grid.enhanced .capsule-items {
        grid-template-columns: 1fr;
    }

    .capsule-grid.enhanced .capsule-item {
        min-height: auto;
        padding: 1rem;
    }
}

/* Override old styles */
.neo-hero.enhanced .hero-core::after {
    display: none;
}

.capsule-grid.enhanced .capsule-item::before {
    display: none;
}

/* Mobile Toolbar Enhancement */
@media (max-width: 991px) {
    .portfolio-toolbar {
        padding: 0.8rem 1rem !important;
        background: linear-gradient(135deg, #fff 0%, #f9fdfa 100%) !important;
        border-bottom: 2px solid rgba(87, 179, 103, 0.1) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    }

    .sidebar-trigger {
        background: linear-gradient(135deg, rgba(87, 179, 103, 0.1) 0%, rgba(87, 179, 103, 0.15) 100%) !important;
        padding: 0.6rem 1rem !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .sidebar-trigger span {
        background: var(--primary-dark) !important;
    }

    .toolbar-cta {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }

    .toolbar-cta .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
    }
}

/* RTL Fixes */
[dir="rtl"] .neo-hero.enhanced,
.neo-hero.enhanced {
    text-align: right;
}

[dir="rtl"] .capsule-grid.enhanced,
.capsule-grid.enhanced {
    text-align: right;
}

[dir="rtl"] .capsule-arrow,
.capsule-arrow {
    left: 1rem;
    right: auto;
}

[dir="rtl"] .exp-card,
.exp-card {
    border-right: 3px solid var(--primary-color);
    border-left: none;
}

/* Ensure proper text direction */
.neo-hero.enhanced p,
.neo-hero.enhanced h1,
.neo-hero.enhanced h2,
.neo-hero.enhanced h3,
.capsule-grid.enhanced p,
.capsule-grid.enhanced h2,
.capsule-grid.enhanced h3 {
    text-align: right;
    direction: rtl;
}

/* ===================================
   Mobile Fixes
   =================================== */

/* Sidebar fix for mobile */
@media (max-width: 991px) {
    body.sidebar-open .portfolio-sidebar {
        right: 0 !important;
        transform: translateX(0) !important;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .sidebar-trigger {
        cursor: pointer;
        border: none !important;
        outline: none !important;
    }

    /* Show image first on mobile - hero-vision before hero-core */
    .neo-hero.enhanced .neo-hero-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    /* Image section first (order: 1) */
    .neo-hero.enhanced .hero-vision {
        order: -1 !important;
        margin-bottom: 0;
    }

    /* Text section second (order: 2) */
    .neo-hero.enhanced .hero-core {
        order: 1 !important;
    }

    /* Mobile image - show prominently at top */
    .neo-hero.enhanced .vision-frame {
        border-radius: 16px;
        height: auto;
        min-height: 180px;
        max-height: 250px;
        overflow: hidden;
    }

    .neo-hero.enhanced .vision-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
    }

    /* Experiences on mobile */
    .experiences-mini {
        margin-top: 1rem;
    }
}

/* Timeline items - show all */
.exp-card.timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    overflow: visible !important;
    max-height: none !important;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 120px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .exp-card.timeline {
        flex-direction: column;
        gap: 0.6rem;
    }

    .timeline-item {
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
        min-width: auto;
        width: 100%;
        padding: 0.4rem 0;
        border-bottom: 1px solid rgba(87, 179, 103, 0.1);
    }

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

    .timeline-item .year {
        min-width: 45px;
        font-size: 0.8rem;
    }

    .timeline-item .title {
        flex: 1;
        font-size: 0.75rem;
    }
}

/* Experiences mini box - ensure all items visible */
.experiences-mini {
    overflow: visible !important;
}

.exp-cards {
    overflow: visible !important;
    max-height: none !important;
}