/* AG Hero Styles */
.ag-hero {
    --ag-hero-gradient: linear-gradient(270deg, rgba(8, 13, 27, 0) 0%, #0E152D 100%);
    --ag-hero-blue-start: #2673B7;
    --ag-hero-blue-end: #3192E8;
    --ag-hero-accent: #FAB93A;
    --ag-hero-font: 'Al-Jazeera-Arabic', sans-serif;

    position: relative;
    width: 100%;
    min-height: 700px;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #0E152D;
}

.ag-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ag-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ag-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ag-hero-gradient);
    z-index: 1;
}

/* Full cover overlay option */
.ag-hero--overlay-solid .ag-hero__overlay {
    background: rgba(14, 21, 45, 0.7);
}

/* Ensure overlay covers entire image on all screen sizes */
.ag-hero__bg + .ag-hero__overlay,
.ag-hero__bg:has(img) + .ag-hero__overlay {
    min-height: 100%;
}

.ag-hero__container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
    direction: rtl;
    display: flex;
    justify-content: flex-start;
    /* Content on right by default in RTL */
}

/* LTR Direction Modifier */
.ag-hero--dir-ltr .ag-hero__container {
    direction: ltr;
}

.ag-hero--dir-ltr .ag-hero__title-main,
.ag-hero--dir-ltr .ag-hero__title-sub,
.ag-hero--dir-ltr .ag-hero__description {
    text-align: left;
}

/* Modifier for Content on Left */
.ag-hero--content-left .ag-hero__container {
    justify-content: flex-end;
    /* Pushes content to the left */
}

/* Gradient flips when content flips */
.ag-hero--content-left .ag-hero__overlay {
    background: linear-gradient(90deg, rgba(8, 13, 27, 0) 0%, #0E152D 100%);
}

.ag-hero__content {
    max-width: 800px;
    width: 100%;
}

.ag-hero__title {
    margin-bottom: 25px;
}

.ag-hero__title-main {
    color: white;
    font-family: var(--ag-hero-font);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    display: block;
}

.ag-hero__title-sub {
    color: white;
    font-family: var(--ag-hero-font);
    font-size: 38px;
    font-weight: 400;
    line-height: 1.3;
    display: block;
    margin-top: 10px;
}

.ag-hero__description {
    color: white;
    font-family: var(--ag-hero-font);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.8;
    max-width: 620px;
    margin-bottom: 40px;
}

.ag-hero__actions {
    display: flex;
    gap: 20px;
}

.ag-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 47px;
    border-radius: 10px;
    text-decoration: none;
    font-family: var(--ag-hero-font);
    font-size: 15px;
    font-weight: 300;
    transition: all 0.3s ease;
}

.ag-hero__btn--primary {
    background: linear-gradient(90deg, var(--ag-hero-blue-start) 0%, var(--ag-hero-blue-end) 100%);
    color: white;
}

.ag-hero__btn--primary:hover {
    box-shadow: 0 8px 20px rgba(38, 115, 183, 0.4);
    transform: translateY(-2px);
}

.ag-hero__btn--outline {
    border: 1px solid var(--ag-hero-accent);
    color: white;
}

.ag-hero__btn--outline:hover {
    background: var(--ag-hero-accent);
    color: #0E152D;
    transform: translateY(-2px);
}

/* Sidebar Elements (Theme Switcher / Search) */
.ag-hero__sidebar {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}

.ag-hero__switcher {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(144, 145, 156, 0.1);
    padding: 10px 5px;
    border-radius: 30px;
    border: 1px solid rgba(144, 145, 156, 0.15);
}

.ag-hero__switcher-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.6);
    font-family: 'SF Pro Display', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ag-hero__switcher-label--active {
    color: white;
}

.ag-hero__search {
    width: 56px;
    height: 56px;
    background: rgba(144, 145, 156, 0.08);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ag-hero__search:hover {
    background: rgba(144, 145, 156, 0.2);
    color: white;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .ag-hero__container {
        padding: 0 40px;
    }

    .ag-hero__title-main {
        font-size: 36px;
    }

    .ag-hero__title-sub {
        font-size: 32px;
    }

    .ag-hero__sidebar {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .ag-hero {
        min-height: auto;
        height: auto;
        padding: 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .ag-hero__bg {
        position: relative;
        height: 300px;
        /* Fixed height for the image area on mobile */
        width: 100%;
        order: -1;
    }

    .ag-hero__overlay {
        height: 100%;
        min-height: 300px;
        background: linear-gradient(180deg, rgba(14, 21, 45, 0) 0%, #0E152D 100%);
    }

    .ag-hero--overlay-solid .ag-hero__overlay {
        background: rgba(14, 21, 45, 0.7);
        height: 100%;
        min-height: 100%;
    }

    .ag-hero__container {
        padding: 40px 20px 80px;
        width: 100%;
    }

    .ag-hero__title-main {
        font-size: 28px;
    }

    .ag-hero__title-sub {
        font-size: 24px;
    }

    .ag-hero__sidebar {
        display: none;
    }
}

@media (max-width: 480px) {
    .ag-hero__actions {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .ag-hero__btn {
        width: 100% !important;
    }
}