body {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: "Cairo", sans-serif;
    background-image: url("/assist/background.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 100vh;
    object-fit: cover;
    background-size: 100% auto;
}

/*-------------------------------HEADER----------------------------------------*/
.img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    cursor: pointer;
}

.icon {
    font-size: 1rem;
    cursor: pointer;
    margin-left: 15px;
}

/* General link styles */
.navbar-links {
    list-style: none;
    /* Remove default list styling */
    padding: 0;
    margin: 0;
    display: flex;
    gap: 70px;
    /* Space between links */
}

.navbar-links a {
    text-decoration: none;
    color: black;
    /* Default color for links */
    font-weight: 500;
    position: relative;
    /* Necessary for positioning ::after */
    padding: 5px 0;
    /* Space around the text (optional) */
    transition: color 0.3s ease;
}

.navbar-links a::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    /* Thickness of the underline */
    background-color: black;
    /* Same color as text */
    transition: width 0.3s ease;
}

.navbar-links a.active::after {
    width: 100%;
    /* Match the width of the link text */
}

.navbar-links a:hover::after {
    width: 100%;
    /* Match the text width on hover */
}

.navbar-links a:hover {
    color: darkblue;
    /* Change link color on hover */
    text-shadow: 0 0 8px rgba(64, 129, 249, 0.8);
}

.navbar-links a.active {
    color: darkblue;
    /* Different color for the active link */
    text-shadow: 0 0 8px rgba(64, 129, 249, 0.8);
}

/* Adjust underline color in dark mode */
.dark-mode .navbar-links a::after {
    background-color: white;
}

.dark-mode .navbar-links a {
    color: white;
}

.dark-mode .navbar-links a.active {
    text-shadow: none;
}

.dark-mode .navbar-links a.active::after {
    background-color: white;
}

.navbar-dark-mode {
    background-color: #333 !important;
    color: white !important;
    direction: ltr;
}

.dark-mode .navbar-links .active::after {
    background-color: white;
}

.dark-mode {
    background-color: #121212;
    color: white;
}

.dark-mode .navbar-links a {
    color: white !important;
}

#smNavbar {
    background-color: #f8f9fa;
}

#smSearchBarContainer {
    padding: 10px;
    background-color: #f8f9fa;
}

#smimg {
    object-fit: contain;
    cursor: pointer;
    position: relative;
    right: 12px;
}

.no-scroll {
    overflow: hidden;
    height: 100%;
}

.sm-menu {
    position: fixed;
    top: 54px;
    left: -270px;
    width: 250px;
    height: 100%;
    background-color: #f8f9fa;
    box-shadow: 3px 6px 5px rgba(0, 0, 0, 0.5);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: right;
    transition: left 0.3s ease;
    z-index: 1000;
}

.sm-menu.show {
    left: 0;
}

.sm-menu a {
    padding: 8px 16px;
    text-decoration: none;
    font-size: 1.2rem;
    color: #666;
    display: block;
    transition: color 0.3s ease;
    border-bottom: 1px solid #ddd;
}

.sm-menu a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.sm-menu a:hover {
    color: #30b4f1;
    text-shadow: 0 0 8px rgba(64, 129, 249, 0.8);
}

.sm-menu a.active {
    color: darkblue;
    text-shadow: 0 0 8px rgba(64, 129, 249, 0.8);
}

#smSearchIcon {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666666;
    position: relative;
    left: 90px;
}

#smimg {
    position: relative;
    left: 10px;
}

#smMenuIcon {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666666;
    margin-right: 15px;
}

#smSearchIcon:hover,
#smMenuIcon:hover {
    color: rgb(50, 50, 225);
}

#smNavbar {
    background-color: #f8f9fa;
}

#smSearchIcon,
#smMenuIcon {
    font-size: 1.5rem;
    cursor: pointer;

    color: #666666;
}

#smSearchIcon:hover,
#smMenuIcon:hover {
    color: rgb(50, 50, 225);
}

.sm-menu a {
    text-decoration: none;
    font-size: 1.2rem;
    color: #333;
    padding: 10px 0;
    border-bottom: 1px solid #30b4f1;
}

.dark-mode #smNavbar {
    background-color: #333;
    color: white;
}

.dark-mode .sm-menu {
    background-color: #333;
}

.dark-mode .sm-menu a {
    color: white;
}

/* HEADER END !!!!!!!!!*/

/* --------------------------------section1------------------------------------------------------------------------*/
.student-union-section {
    direction: rtl; /* Retain if your layout is right-to-left */
    background: url("/assist/mainphoto.png") no-repeat center center;
    background-size: cover; /* Make the image cover the area */
    height: 100vh; /* Full viewport height */
    width: 100%; /* Full width */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center the content */
    align-items: center; /* Horizontally center the content */
    padding: 0; /* No unnecessary padding */
    margin: 0; /* No extra margins */
    overflow: hidden; /* Prevent scrollbars from appearing due to image size */
}

@media (max-width: 768px) {
    .student-union-section {
        background-size: contain; /* Ensure full image visibility on smaller screens */
        height: auto; /* Let height adjust dynamically */
        padding: 20px; /* Add some padding to content */
    }
}
.text-overlay {
    padding-top: 150px;
    text-align: center;
}

.college-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 0;
    color: #a1defa;
}

.union-title {
    font-size: 60px;
    font-weight: bold;
}

/* Default paragraph text color (light mode) */
.section-description {
    color: black;
    transition: color 0.3s ease;
    /* Smooth transition */
}

/* Paragraph text color in dark mode */
.dark-mode .section-description {
    color: white;
}

.info-container {
    justify-content: center;
    gap: 40px;
    display: flex;
    flex-wrap: wrap;
}

.info-box {
    background-color: #28658d;
    color: #fff;
    padding: 16px;
    height: 200px;
    width: 100%;
    max-width: 300px;
    border-radius: 60px 60px 0px 60px;
    margin: 10px;
    text-align: center;
    transition: background-color 0.3s;
}

.info-box h3 {
    color: #a1defa;
}

.info-box .icon {
    font-size: 25px;
    margin-bottom: 10px;
}

.info-box:hover {
    background-color: #30b4f1;
}

.info-box h3:hover {
    color: #214d6d;
}

@media (min-width: 768px) {
    .union-title {
        font-size: 48px;
    }
}

@media (max-width: 670px) {
    .student-union-section {
        height: auto;
        background-size: cover;
        padding: 30px 0;
    }

    .text-overlay {
        padding-top: 80px;
    }

    .info-container {
        padding: 10% 0;
    }
}

/* -------------------------------------------------section 2---------------------------------------------*/
.about-section {
    padding: 120px 0;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #30b4f1;
    text-align: right;
    margin-bottom: 20px;
}

.section-description {
    font-size: 18px;
    line-height: 1.8;
    text-align: right;
    color: #333;
}

.image-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.illustration-image {
    max-width: 100%;
    height: auto;
}

@media (min-width: 768px) {
    .section-description {
        padding: 0 50px;
    }
}

/* -------------------------------------------------section 3---------------------------------------------*/

* {
    box-sizing: border-box;
}

.sec3h {
    font-size: 24px;
    font-weight: bold;
    color: #30b4f1;
    text-align: right;
    margin-bottom: 20px;
    margin-right: 100px;
}

.card-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 70px;
    padding: 20px;
    direction: rtl;
}

.card {
    width: 340px;
    height: 480px;
    perspective: 1000px;
    border-radius: 20px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card-front {
    background-color: #214d6d;
    color: white;
}

.card-front img {
    width: 97%;
    height: 80%;
    border-radius: 10px;
    margin-bottom: 16px;
}

.card-front h3 {
    font-size: 1.1em;
    color: #a1defa;
}

.card-back {
    background-color: #a1defa;
    color: #214d6d;
    transform: rotateY(180deg);
    padding: 20px;
    text-align: center;
    font-size: 1em;
}

/*  التصميم للشاشات الصغيرة */
@media (max-width: 600px) {
    .card {
        width: 220px;
        height: 350px;
    }

    .card-front h3 {
        font-size: 0.8em;
    }
    .card-front p {
        font-size: 0.7em;
    }

    .card-back {
        font-size: 0.7em;
    }
    .sec3h {
        font-size: 24px;
        font-weight: bold;
        color: #30b4f1;
        text-align: right;
        margin-bottom: 20px;
        margin-right: 140px;
    }
}

/*----------------------------------------------- section 4 ----------------------------------------------*/
.sec4 {
    direction: rtl;
    align-content: center;
    margin-bottom: 50px;
    margin-top: 50px;
}

.sec4 h1 {
    text-align: center;
    color: #30b4f1;
}

.cards2 {
    display: flex;
    flex-wrap: wrap;
    gap: 45px;
    direction: rtl;
    justify-content: center;
}

.card2 {
    background-color: #28658d;
    flex: 1 1 180px;
    max-width: 180px;
    height: 100px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: background-color 0.4s, transform 0.4s;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

.card2 p.tip {
    font-size: 1.3em;
    font-weight: 500;
    margin-bottom: 5px;
    color: #a1defa;
}

.card2 p.second-text {
    font-size: 1.1em;
}

.card2:hover {
    transform: scale(1.1);
    background-color: #30b4f1;
}

.cards2:hover .card:not(:hover) {
    filter: blur(10px);
    transform: scale(0.9);
}

@media (max-width: 768px) {
    .cards2 {
        align-items: center;
    }

    .card2 {
        width: 100%;
    }
}

/*----------------------------------------------- FOOTER ----------------------------------------------*/

.footer {
    background-color: #214d6d;
}

.footer-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
}

.footer-text {
    font-size: 1rem;
    font-weight: bold;
    color: #1fa2ff;
}

.footer-icon {
    color: white;
    font-size: 1.2rem;
}

.footer-icon:hover {
    color: #ddd;
}

.footer .img {
    position: relative;
    left: 30px;
}

@media (max-width: 586px) {
    .footer {
        font-size: smaller;
    }

    .footer .col-md-6 {
        margin-top: 15px;
    }

    .footer .img {
        position: relative;
        left: 140px;
    }

    .footer-icon {
        margin-top: 5px;
    }
}
