/* =====================================================
   ALFAISAL UNIVERSITY CASE STUDIES PAGE
   Standalone CSS
   Prefix: cs-
===================================================== */

.cs-page {
    width: 100%;
    color: #071a43;
    font-family: inherit;
    overflow: hidden;
}

.cs-page *,
.cs-modal * {
    box-sizing: border-box;
}

.cs-container {
    width: 90%;
    max-width: 1240px;
    margin: 0 auto;
}

.cs-eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    color: #80e387 !important;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Buttons */
.cs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 53px;
    padding: 15px 28px;
    border-radius: 50px;
    border: 2px solid #80e387;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none !important;
    transition: all .3s ease;
}

.cs-btn-primary {
    background: #80e387;
    color: #071a43 !important;
}

.cs-btn-primary:hover {
    background: #80e387 !important;
    border-color: #80e387 !important;
    color: #071a43 !important;
    transform: none;
    box-shadow: none;
}

/* Hero */
.cs-hero {
    min-height: 570px;
    display: flex;
    align-items: center;
    padding: 95px 0;
    background: linear-gradient(115deg, #071a43 0%, #123d60 58%, #1c6380 100%);
    background-size: cover;
    background-position: center;
}

.cs-hero-content {
    max-width: 850px;
}

.cs-hero h1 {
    max-width: 850px;
    margin: 0 0 22px;
    color: #ffffff !important;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.15;
}

.cs-hero p {
    max-width: 760px;
    margin: 0;
    color: #ffffff !important;
    font-size: 18px;
    line-height: 1.85;
}

.cs-hero .cs-btn {
    margin-top: 30px;
}

/* Intro */
.cs-intro {
    padding: 75px 0;
    background: #f5faf4;
}

.cs-intro-inner {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    align-items: center;
    gap: 65px;
}

.cs-intro h2,
.cs-section-heading h2 {
    margin: 0;
    color: #071a43 !important;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
}

.cs-intro p {
    margin: 0;
    color: #4c5a70 !important;
    font-size: 17px;
    line-height: 1.85;
}

/* Case studies */
.cs-library {
    padding: 90px 0;
    background: #f5faf4;
}

.cs-section-heading {
    max-width: 820px;
    margin: 0 auto 48px;
    text-align: center;
}

.cs-section-heading h2 {
    margin-bottom: 16px;
}

.cs-section-heading p {
    margin: 0;
    color: #4c5a70 !important;
    font-size: 17px;
    line-height: 1.8;
}

.cs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.cs-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e3eae6;
    border-radius: 14px;
    transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.cs-card:hover {
    transform: translateY(-5px);
    border-color: #80e387;
    box-shadow: 0 14px 35px rgba(7,26,67,.08);
}

.cs-card-image {
    width: 100%;
    height: 205px;
    overflow: hidden;
    background: #eaf0f4;
}

.cs-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cs-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #071a43, #16476a);
}

.cs-card-image-placeholder span {
    padding: 16px 24px;
    border: 1px solid rgba(255,255,255,.35);
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

.cs-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 27px 26px 25px;
}

.cs-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 17px;
    color: #0077b6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.cs-card h3 {
    margin: 0 0 9px;
    color: #071a43 !important;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
}

.cs-card h4 {
    margin: 0 0 15px;
    color: #314865 !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.cs-card p {
    flex: 1;
    margin: 0 0 22px;
    color: #596779 !important;
    font-size: 15px;
    line-height: 1.75;
}

.cs-open-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #071a43;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.cs-open-btn span {
    color: #1681b4;
    font-size: 22px;
    transition: transform .25s ease;
}

.cs-open-btn:hover span {
    transform: translateX(5px);
}

/* CTA */
.cs-cta {
    padding: 80px 0;
    background: #071a43;
}

.cs-cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 45px;
}

.cs-cta h2 {
    margin: 0 0 18px;
    color: #ffffff !important;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
}

.cs-cta p {
    max-width: 780px;
    margin: 0;
    color: #ffffff !important;
    font-size: 17px;
    line-height: 1.85;
}

.cs-cta-actions {
    flex-shrink: 0;
}

/* Modal */
body.cs-modal-open {
    overflow: hidden;
}

.cs-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.cs-modal.is-open {
    display: flex;
}

.cs-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,20,51,.82);
    backdrop-filter: blur(4px);
}

.cs-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 25px 80px rgba(0,0,0,.28);
    animation: cs-modal-enter .25s ease;
}

@keyframes cs-modal-enter {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.cs-modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 30px;
    background: #071a43;
}

.cs-modal-header .cs-eyebrow {
    margin-bottom: 7px;
}

.cs-modal-header h2 {
    margin: 0;
    color: #ffffff !important;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}

.cs-modal-close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #80e387;
    color: #071a43;
    font-family: inherit;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.cs-modal-content {
    padding: 30px;
    overflow-y: auto;
}

.cs-detail-meta {
    margin-bottom: 22px;
    color: #0077b6;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.cs-detail-client {
    margin-bottom: 25px;
    padding: 18px 22px;
    background: #f5faf4;
    border-left: 4px solid #80e387;
    border-radius: 7px;
}

.cs-detail-client strong {
    display: block;
    margin-bottom: 6px;
    color: #071a43;
    font-size: 14px;
}

.cs-detail-client p {
    margin: 0;
    color: #314865;
    font-size: 15px;
    line-height: 1.65;
}

.cs-detail-section {
    margin-bottom: 24px;
}

.cs-detail-section h3 {
    margin: 0 0 10px;
    color: #071a43;
    font-size: 20px;
    font-weight: 700;
}

.cs-detail-section p,
.cs-detail-section li {
    color: #4c5a70;
    font-size: 15px;
    line-height: 1.8;
}

.cs-detail-section p {
    margin: 0;
}

.cs-detail-section ul {
    margin: 0;
    padding-left: 22px;
}

.cs-detail-section li {
    padding-left: 4px;
    margin-bottom: 7px;
}

.cs-detail-section li:first-child {
    list-style: none;
    margin-left: -22px;
    padding-left: 0;
    margin-bottom: 12px;
}

.cs-detail-section li:first-child::before {
    content: "";
}

.cs-detail-link-wrap {
    padding-top: 8px;
}

/* Tablet */
@media (max-width: 991px) {
    .cs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cs-intro-inner {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .cs-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .cs-container {
        width: 90%;
    }

    .cs-hero {
        min-height: 540px;
        padding: 70px 0;
    }

    .cs-hero h1 {
        font-size: 36px;
    }

    .cs-hero p,
    .cs-intro p,
    .cs-section-heading p,
    .cs-cta p {
        font-size: 15px;
    }

    .cs-intro,
    .cs-library {
        padding: 58px 0;
    }

    .cs-intro h2,
    .cs-section-heading h2,
    .cs-cta h2 {
        font-size: 32px;
    }

    .cs-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cs-card-image {
        height: 190px;
    }

    .cs-card-body {
        padding: 23px 21px;
    }

    .cs-cta {
        padding: 60px 0;
    }

    .cs-cta-actions,
    .cs-cta-actions .cs-btn {
        width: 100%;
    }

    .cs-modal {
        padding: 8px;
    }

    .cs-modal-dialog {
        max-height: 96vh;
        border-radius: 10px;
    }

    .cs-modal-header {
        padding: 17px 18px;
    }

    .cs-modal-header h2 {
        font-size: 20px;
    }

    .cs-modal-content {
        padding: 22px 18px;
    }

    .cs-detail-section h3 {
        font-size: 18px;
    }

    .cs-detail-section p,
    .cs-detail-section li {
        font-size: 14px;
    }

    .cs-detail-link-wrap .cs-btn {
        width: 100%;
    }
}

/* =====================================
   CASE STUDY BUTTON ALIGNMENT
===================================== */

.cs-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cs-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cs-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    gap: 10px;

    margin-top: auto;
    padding: 11px 19px;

    background: #071a43;
    color: #ffffff !important;
    border: none;
    border-radius: 50px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;

    transition: all 0.3s ease;
}

.cs-open-btn span {
    font-size: 15px;
    transition: transform 0.3s ease;
}

.cs-open-btn:hover {
    background: #12336b;
    color: #ffffff !important;
}

.cs-open-btn:hover span {
    transform: translateX(4px);
}