/* color1: #ee792a   */
/* color2: #30609e   */

html {
    scroll-behavior: smooth !important;
}

body {

    background-color: #FAF9EE !important;
}

html, body {
    height: 100% !important; /* allow full height */
    margin: 0 !important;
    padding: 0 !important;
}

body {
    min-height: 100vh !important; /* always fill viewport height */
    display: flex !important;
    flex-direction: column !important;
}

/* Make sure main content grows to fill space */
main {
    flex: 1 !important; /* expands to take available height */
}

/* Optional: footer sticks to bottom */
footer {
    margin-top: auto !important;
}

/* Responsive tweaks for tablets and phones */
@media (max-width: 992px) {
    /* tablets and smaller */
    body {
        min-height: 100vh !important;
    }
}

@media (max-width: 576px) {
    /* phones */
    body {
        min-height: 100vh !important;
    }
}


.container-fluid {
    text-align: center;
    padding: 5% 5% !important;
}

/* ----------------- navbar --------------- */
.brand-img {
    width: 4rem;
}

.navbar {
    padding: 0 1.3rem !important;
    background-color: rgba(35, 76, 106, 0.8) !important;
    position: fixed !important; /* <-- fixed instead of absolute */
    top: 0; /* stick to the top */
    left: 0;
    width: 100%;
    z-index: 100000 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* optional floating shadow */
}

.navbar-nav, .dropdown {
    direction: rtl;
}

.navbar .nav-link {
    color: white !important;
}

.navbar .nav-link:hover {
    color: #ddd !important;
}

.login-icon {
    font-size: 20px !important;
}

.dropdown-menu {
    background-color: #234C6A !important;
}


.dropdown-menu a {
    color: #ffffff !important;
}

.dropdown-menu.show .dropdown-item:hover {
    background-color: #F5F2F2;
    color: #000 !important;
}


/* Force login/logout links to the left edge */
.navbar > .nav-link {
    margin-right: auto !important; /* push them left in LTR */
    margin-left: 0 !important;
    text-align: left !important;
    justify-content: flex-start !important;
    display: flex !important;
    align-items: center;
}


/* ---------------- landing page -------------------- */
.home-page {
    width: 100%;
    height: 106% !important;
    padding: 12% 12% !important;
    color: #fff;
}

.landing-page-btn {
    margin: 3rem 1rem 1rem 0 !important;
}

/* ----------------- Heading --------------------- */
h1, h2, h3, h4, h5 {
    font-family: "Parastoo", serif !important;
    font-weight: 900 !important;

}

.home-page h1 {
    font-size: 3.2rem;
}

.home-page h2 {
    font-size: 2.3rem;
}

#proud h2 {
    font-size: 2rem;
    padding: 10px;
}

#program h2 {
    font-size: 2rem;
    padding: 10px;
}

.footer {
    padding: 6% 20%;
    background-color: #30609e;
    color: #fff;
    text-align: center;

}

.media-icon {
    color: #fff;
    text-decoration: none;
    padding: 0 0.5rem;
}

.media-icon:hover {
    color: #ee792a;
}


.location-contact {
    text-align: center; /* ensures inline content is centered */
}

.loca-cont {
    direction: rtl;
    width: 240px; /* fixed width */
    margin: 0 auto; /* centers the block horizontally */
    text-align: right; /* keep the text inside left aligned */
}

.loca-cont a {
    margin: 2rem auto;
}


/* ------------------------ program section ----------------------------- */
.card-img-top {
    height: 160px; /* fixed height */
    object-fit: cover; /* crop/scale to fit */
}

.program-container {
    padding: 5% 0;
}

.program {
    background-color: #ff3f3f;
}
.online-img{
    width: 60%;
}

/*------------------------ program view -----------------------*/
.square-container {
    width: 120px;
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.square-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* keeps image proportional inside square */
}

/*------------------------ reader page -------------------------------*/
.reader_page {
    padding: 12% 10% !important;
}

.description-div {
    width: 60% !important;
    margin: 2% auto;

}

.description-div p {
    text-align: justify !important;
    direction: rtl !important;
}

.image-container {
    margin: 2rem auto !important;
    width: 30% !important;
    display: inline-block !important;
}

.image-container img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}


/* ------------------------------------- search section ----------------- */

#search {
    padding: 9% 10% 0%;
}

#serch-div {
    border: none;
   
}

.search_btn {
    margin: 1rem !important;
}

#search .container-fluid {
    padding: 1% 5% !important;
}

.add_program {
    padding: 12%;
}

.add_program .title {
    text-align: center;
    padding: 5%;
}

/* ----------------------------------------- exam page ----------------- */
.custom-head th {
    background-color: rgba(0, 123, 255, 0.89) !important;
    color: white !important;
}

/* Right-to-left table direction */
.rtl-table {
    direction: rtl;
}

/* Position nested dropdowns */
.dropdown-submenu {
    position: relative;
    text-align: right !important;
}


.dropdown-submenu .dropdown-menu {
    margin-top: -1px !important;
    right: 7rem !important; /* reset default */
    left: 100% !important; /* push it to the left side */
}


/* Show submenu on hover */
.dropdown-submenu:hover .dropdown-menu {
    display: block;
}

/* ----------------------------------------- media query ----------------- */
#program, #main-program, #exam-program {
    padding: 0 5% 0% !important;
}


.reader_page {
    padding: 12% 3% !important;
}

.image-container {
    width: 96% !important;
    display: inline-block;

}


/* ------------------------------------------ stars section -------------------------------------------------------- */
.play-list {
    margin: 5rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.carousel .slider,
.carousel .flickity-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

.carousel .card {
    margin: 0 1rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 35, .25);
    border-radius: 8px;
    height: 200px;
    width: 238px;
    display: block;
    position: relative;
    background: 50%/cover;
    cursor: pointer;
    transition: .16s ease-in-out;
}

.carousel .card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    border-radius: 10px 10px 0 0;
}

.carousel .card.is-custom-selected {
    width: 298px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel .card.is-custom-selected::after {
    background: none;
}

.carousel .card-bg {
    height: 100%;
    width: 100%;
    background: center/cover;
}

.carousel .flickity-enabled {
    position: relative;
}

.carousel .flickity-enabled:focus {
    outline: none;
}

.carousel .flickity-viewport {
    position: relative;
    height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel .card {
        width: 210px;
        height: 187px;
        margin: 0 .5rem;
    }

    .carousel .card.is-custom-selected {
        width: 253px;
        height: 227px;
    }

    .play-list {
        margin: 2rem 0;
        padding: 1rem .5rem;
    }

    .home-page {
        width: 100%;

        padding: 20% 12% !important;

    }

    html {
        height: 100vh !important;
    }

    #program, #main-program, #exam-program {
        padding: 10% 10% !important;
    }

    .reader_page {
        padding: 12% 5% !important;
    }

    .image-container {
        width: 80%;
        display: inline-block;
    }

    #gallery h1 {
        font-size: 1.5rem; /* slightly smaller font on tablets/phones */
    }

    .description-div {
        width: 80% !important;
        margin: 2% auto;
        justify-content: center;
    }

    .search-btn-1 {
        margin-top: 1rem !important;
        margin-left: 1rem;
    }

}

@media (max-width: 580px) {
   .carousel .card {
        width: 190px;
        height: 172px;
        margin: 0 .5rem;
    }

    .carousel .card.is-custom-selected {
        width: 233px;
        height: 215px;
    }
    .play-list {
        margin: 1rem 0;
        padding: .5rem;
        flex-direction: column;
    }

    .container-img {
        padding: 2% 0;
        display: flex;
        gap: 2px;
        flex-wrap: wrap;

    }

    /* Card styling */
    .card {
        padding: 4px !important;
        border-radius: 4px !important;
    }

    .card:hover {
        transform: scale(1.1);
    }

    /* Thumbnail images */
    .card-image img {
        width: 50px !important;
        height: 50px !important;
    }

    .search-btn-1 {
        margin-top: 1rem !important;
    }

    #program, #main-program, #exam-program {
        padding: 5% 10% !important;
    }

    .container-fluid {
        text-align: center;
        padding: 10% 5% !important;

    }

    html {
        height: 106vh !important;
    }

    #landing-page .home-page {
        width: 100%;
        padding: 40% 8% 15% !important;
    }

    .margin-top {
        padding-top: 20px !important;
    }

    #search .container-fluid {
        padding: 12% 2% 1% !important;
    }

    #search {
        padding:12% 1% 2% !important;
    }


    #gallery h1 {
        font-size: 1.2rem;
    }

    .description-div {
        width: 90% !important;
        margin: 2% auto;
    }

    .add_program {
        padding: 20% 1% !important;
    }

    .login {
        padding: 40% 1% !important;
    }

    #serch-div {
        padding-top: 5px !important;

    }

}


/*------------------------- gallery -------------------------------------*/
.message {
    color: red !important;
}

/* Gallery layout */

.container-img {
    padding: 4% 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    text-align: center !important;
    align-items: center !important;
}

/* Card styling */
.card {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 5px;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: scale(1.1);
}

/* Thumbnail images */
.card-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
}

/* Ensure Fancybox is always above other elements */
.fancybox__container {
    z-index: 99999999999999999999 !important;
}

/* Style the gallery title */
#gallery {
    padding: 90px 20px; /* fixed units, same on all screens */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


#gallery .container-img {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center; /* center cards in the row */
    align-items: center; /* vertically center cards */
}

#gallery h1 {
    text-align: center; /* always center the text */
    margin: 0 auto; /* prevent extra margins */
}


/*-----------------------------------------------ads -----------------------------*/
.ad-card {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px !important;
    height: 300px !important; /* taller than width */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    z-index: 100000000000000;
    transition: transform 0.2s ease;
    margin-top: 60px !important;
}

.ad-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ensures image fills box */
    display: block;
}

/* Close button overlay */
.close-btn {
    position: absolute; /* overlay inside ad-card */
    top: 8px;
    right: 8px;
    background: rgba(245, 6, 6, 0.7); /* semi-transparent background */
    color: #ffffff;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 24px;
    text-align: center;
}

/* Tablet screens */
@media (max-width: 768px) {
    .ad-card {
        width: 220px !important;
        height: 220px !important;
        top: 10px;
        right: 10px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .ad-card {
        width: 120px;
        height: 180px;
        top: 5px;
        right: 5px;
    }
}
/*-------------------------------------------------- animated carousel -------------------------------------*/
#myCarousel {
    width: 100%;
    height: 90vh; /* large screens → 90% of viewport height */
}

/* Each carousel item fills the section */
.carousel-item {
    position: relative; /* needed for overlay */
    width: 100%;
    height: 90vh;
    background-size: cover;
    background-position: center;
}


/* Gray overlay */
.carousel-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
    /*background-color: rgba(147, 147, 147, 0.54); !* semi-transparent gray *!*/
    z-index: 1;
}
.carousel-caption {
    position: absolute;       /* position inside the slide */
    top: 70%;                 /* move to vertical center */
    left: 3%;                /* push towards the right side */
    transform: translateY(-50%); /* adjust for perfect centering */
    text-align: left;        /* align text to the right */
    z-index: 2;               /* above overlay */
}
.carousel-caption h1 {
    font-size: 2.8rem;
    font-weight: bold;
}
.home-btn a{
    margin: 10px;
    bottom: 20px  !important;
}


/* Tablet adjustments */
@media (max-width: 1024px) {
    #myCarousel,
    .carousel-item {
        height: 75vh; /* tablets → 75% of viewport height */
    }
    .carousel-caption h1 {
        font-size: 2rem;
    }
}

/* Mobile adjustments */
@media (max-width: 600px) {
    #myCarousel,
    .carousel-item {
        height: 65vh !important; /* mobiles → 65% of viewport height */
    }
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
}


/* Default size for large screens */
.map-box iframe {
  width: 500px;
  height: 400px;
  border: 0;
}

/* Mobile screens */
@media (max-width: 768px) {
  .map-box iframe {
    width: 300px;
    height: 300px;
  }
}

