/* =================================================
   AJESH PHYSIO EXERCISE – THEME SAFE CSS
   SCOPE: /exercise/ PAGE ONLY
================================================= */

/* ===============================
   GLOBAL SAFETY (EXERCISE PAGE)
=============================== */
body.page-slug-exercise *,
body.page-id-13248 *{
    box-sizing: border-box !important;
}

/* ===============================
   EXERCISE HOME SECTIONS
=============================== */
body.page-slug-exercise .ex-section,
body.page-id-13248 .ex-section{
    width:100% !important;
    max-width:100% !important;
    margin-bottom:48px;
    overflow:hidden;
}

/* ===============================
   HEADER ROW
=============================== */
body.page-slug-exercise .ex-head,
body.page-id-13248 .ex-head{
    display:flex !important;
    justify-content:space-between;
    align-items:center;
    margin-bottom:16px;
}

body.page-slug-exercise .ex-head h2,
body.page-id-13248 .ex-head h2{
    font-size:24px;
    font-weight:600;
    color:#1f3c5a;
}

body.page-slug-exercise .ex-head a,
body.page-id-13248 .ex-head a{
    font-size:14px;
    color:#3b82f6;
    text-decoration:none;
    font-weight:500;
}

/* ===============================
   HORIZONTAL SCROLL ROW (CORE FIX)
=============================== */
body.page-slug-exercise .ex-row,
body.page-id-13248 .ex-row{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:20px;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    padding-bottom:12px;
    -webkit-overflow-scrolling:touch;
}

/* Scrollbar */
body.page-slug-exercise .ex-row::-webkit-scrollbar,
body.page-id-13248 .ex-row::-webkit-scrollbar{
    height:6px;
}
body.page-slug-exercise .ex-row::-webkit-scrollbar-thumb,
body.page-id-13248 .ex-row::-webkit-scrollbar-thumb{
    background:#cfd8e3;
    border-radius:10px;
}

/* ===============================
   EXERCISE CARDS (UNBREAKABLE)
=============================== */
body.page-slug-exercise .ex-card,
body.page-id-13248 .ex-card{
    min-width:240px !important;
    flex-shrink:0 !important;
    background:rgba(255,255,255,0.95);
    border-radius:24px;
    padding:14px;
    box-shadow:0 8px 24px rgba(0,0,0,0.08);
    scroll-snap-align:start;
    transition:all .25s ease;
}

body.page-slug-exercise .ex-card:hover,
body.page-id-13248 .ex-card:hover{
    transform:translateY(-4px);
    box-shadow:0 14px 32px rgba(59,130,246,0.25);
}

body.page-slug-exercise .ex-card img,
body.page-id-13248 .ex-card img{
    width:100%;
    height:140px;
    object-fit:cover;
    border-radius:18px;
    margin-bottom:12px;
}

/* ===============================
   CARD CONTENT
=============================== */
body.page-slug-exercise .ex-title,
body.page-id-13248 .ex-title{
    font-size:16px;
    font-weight:500;
    color:#1f2937;
    margin-bottom:10px;
}

body.page-slug-exercise .ex-btn,
body.page-id-13248 .ex-btn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:#3b82f6;
    color:#fff;
    padding:8px 16px;
    border-radius:999px;
    text-decoration:none;
    font-size:14px;
    transition:.25s ease;
}

body.page-slug-exercise .ex-btn:hover,
body.page-id-13248 .ex-btn:hover{
    background:#2563eb;
    box-shadow:0 0 10px rgba(59,130,246,0.5);
}

/* ===============================
   HIDE LISTING ON HOME
=============================== */
body.page-slug-exercise .exercise-listing,
body.page-slug-exercise .pem-grid,
body.page-slug-exercise .pem-card,
body.page-id-13248 .exercise-listing,
body.page-id-13248 .pem-grid,
body.page-id-13248 .pem-card{
    display:none !important;
}

/* ===============================
   PROTECT FROM ELEMENTOR / THEME
=============================== */
body.page-slug-exercise .elementor-section,
body.page-slug-exercise .elementor-container,
body.page-slug-exercise .elementor-widget-wrap,
body.page-id-13248 .elementor-section,
body.page-id-13248 .elementor-container,
body.page-id-13248 .elementor-widget-wrap{
    max-width:100% !important;
    width:100% !important;
    overflow:visible !important;
}

.pem-order{
    width:22px;
    height:22px;
    background:#2563eb;
    color:#fff;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:600;
}

.pem-order:empty{
    display:none;
}

/* ===============================
   EXERCISE IMAGE (VIDEO KE NICHE)
=============================== */

body .pem-ex-img{
    margin-top:12px;
    display:flex;
    justify-content:center;
}

/* ===============================
   VIDEO + IMAGE PERFECT ALIGN FIX
=============================== */

.pem-media-wrap{
    display:flex;
    gap:15px;
    margin-top:10px;
    align-items:center;   /* 🔥 CHANGE: stretch → center */
}

/* VIDEO (70%) */
.pem-video{
    flex:7;
    height:260px;
    display:flex;
}

.pem-video iframe{
    width:100%;
    height:100%;
    border-radius:10px;
    display:block;
}

/* IMAGE (30%) */
.pem-ex-img{
    flex:3;
    height:260px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#000;
    border-radius:10px;
	overflow:hidden;
	
	padding:10px;
}

/* IMAGE */
.pem-ex-img img{
    width:100%;
    height:100%;
    object-fit:contain;
}

/* 📱 MOBILE */
@media(max-width:768px){
    .pem-media-wrap{
        flex-direction:column;
    }

    .pem-video,
    .pem-ex-img{
        height:auto;
    }
}

/* ===============================
   GUEST EXERCISE LISTING PAGE
=============================== */

.guest-exercise-wrap{
    max-width:1200px;
    margin:0 auto;
    padding:20px;
}

.guest-exercise-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:24px;
}

.guest-ex-card{
    background:#ffffff;
    border-radius:22px;
    padding:16px;
    box-shadow:0 10px 28px rgba(0,0,0,0.08);
    border:1px solid #e5e7eb;
}

.guest-ex-card h3{
    font-size:20px;
    font-weight:700;
    color:#06245c;
    margin-bottom:12px;
    line-height:1.3;
}

.guest-ex-media iframe{
    width:100%;
    height:220px;
    border:0;
    border-radius:16px;
    display:block;
}

.guest-ex-toggle{
    margin-top:14px;
    width:100%;
    padding:10px 14px;
    border:none;
    border-radius:999px;
    background:#0d8ee8;
    color:#fff;
    font-weight:600;
    cursor:pointer;
}

.guest-ex-details{
    margin-top:14px;
    padding:14px;
    background:#f8fafc;
    border-radius:14px;
    color:#1f2937;
    font-size:14px;
    line-height:1.6;
}

@media(max-width:768px){
    .guest-exercise-wrap{
        padding:12px;
    }

    .guest-exercise-grid{
        grid-template-columns:1fr;
    }

    .guest-ex-media iframe{
        height:210px;
    }
}

.ajesh-ex-heading{
    text-align:center;
    margin:10px auto 45px;
    max-width:900px;
    padding:0 20px;
}

.ajesh-ex-heading h1{
    font-size:48px;
    font-weight:800;
    line-height:1.1;
    margin-bottom:14px;

    background:linear-gradient(90deg,#0f172a,#0ea5e9);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;

    letter-spacing:-1px;
}

.ajesh-ex-heading p{
    font-size:18px;
    line-height:1.8;
    color:#475569;
    font-weight:500;
    max-width:760px;
    margin:auto;
}

/* mobile */
@media(max-width:768px){

    .ajesh-ex-heading h1{
        font-size:34px;
    }

    .ajesh-ex-heading p{
        font-size:15px;
        line-height:1.7;
    }
}
