* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.3s, color 0.3s;
    

}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(rgba(75, 85, 99, 0.8), rgba(31, 41, 55, 0.8)), url("/static/image/nav.jpg");
    background-size: cover;
    background-position: center;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 10px;
}

.navbar-lang-switcher {
    padding: 8px;
    border-radius: 5px;
    background: rgba(55, 65, 81, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    cursor: pointer;
}
.sidebar .sidebar-lang-switcher {
    margin-top: 20px;
    padding: 8px;
    border-radius: 5px;
    background: rgba(55, 65, 81, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
}
.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #93c5fd;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.5rem;
}

.theme-toggle .fa-moon {
    display: none;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    background: rgba(75, 85, 99, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px;
    transition: right 0.3s ease-in-out;
    z-index: 2000;
    touch-action: none;
}

.sidebar.active {
    right: 0;
}

html[dir="rtl"] .sidebar {
    right: -250px;
    left: auto;
}

html[dir="rtl"] .sidebar.active {
    right: 0;
    left: auto;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 20px 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
}

.sidebar .lang-switcher {
    margin-top: 20px;
    padding: 8px;
    border-radius: 5px;
    background: rgba(55, 65, 81, 0.3); /* Semi-transparent for lang switcher */
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
}

.close-sidebar {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
}

.close-sidebar:hover {
    color: #93c5fd;
    text-shadow: #1f2937 0px 0px 10px, #3b82f6 0px 0px 20px, #93c5fd 0px 0px 30px;
    transform: scale(1.2); /* Slight zoom effect on hover */
}

body.light-mode .close-sidebar {
    color: #1f2937;
}

body.light-mode .close-sidebar:hover {
    color: #3b82f6;
    transform: scale(1.2);
}

main {
    padding: 20px;
}

section {
    margin: 40px 0;
    text-align: center;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.card {
    width: 300px;
    height: 200px;
    perspective: 1000px;
    position: relative;
    cursor: pointer;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.card-front .card-text {
    position: absolute;
    width: 100%;
    background: rgba(255, 255, 255, 0.15); /* More transparent */
    backdrop-filter: blur(8px);
    padding: 10px;
    text-align: left;
    border-radius: 0 0 10px 10px;
     bottom: 0;
}

.card-back {
    transform: rotateY(180deg);
    padding: 20px;
}

.card.flipped .card-front {
    transform: rotateY(-180deg);
}

.card.flipped .card-back {
    transform: rotateY(0deg);
}

.contact-info {
    margin-top: 20px;
    font-size: 1.1rem;
}

.contact-info i {
    margin-left: 10px;
}

.footer {
    background: linear-gradient(rgba(75, 85, 99, 0.8), rgba(31, 41, 55, 0.8)), url("/static/image/nav.jpg");
    background-size: cover;
    background-position: center;
    color: white;
    padding: 40px 20px;
    margin-top: 40px;
    border-radius: 10px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #93c5fd;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Light Mode */
body.light-mode {
    background: #f3f4f6;
    color: #1f2937;
}


body.light-mode .navbar {
    background: linear-gradient(rgba(147, 197, 253, 0.8), rgba(59, 130, 246, 0.8)), url("/static/image/nav.jpg");
    background-size: cover;
    background-position: center;
}

body.light-mode .sidebar {
    background: rgba(147, 197, 253, 0.2); /* Semi-transparent for light mode */
    backdrop-filter: blur(10px);
}

body.light-mode .card-front .card-text,
body.light-mode .card-back {
    background: rgba(255, 255, 255, 0.25); /* Slightly more opaque for visibility */
}

body.light-mode .footer {
    background: linear-gradient(rgba(147, 197, 253, 0.8), rgba(59, 130, 246, 0.8)), url("/static/image/nav.jpg");
    background-size: cover;
    background-position: center;
}
/* Dark Mode */
body.dark-mode {
    background: #111827;
    color: #f3f4f6;
}

body.dark-mode .theme-toggle .fa-sun {
    display: none;
}

body.dark-mode .theme-toggle .fa-moon {
    display: inline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .navbar {
        flex-wrap: wrap;
    }

    .card {
        width: 100%;
        max-width: 300px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
    }
}

/*//////////////////////////////////////////////////////////*/

.card-stackk {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 60px auto 10px auto;
    perspective: 1000px;
    overflow: hidden;    direction: rtl !important;
 
}

/* الكرت كحاوية للصورة */
.cardd {
    position: absolute;
    width: 90%;
    height: 100%;
    border-style:double;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    transition: transform 0.5s ease, opacity 0.5s ease;
    background: #fff;
}

/* الصورة تظهر كاملة */
.cardd img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* الأزرار */
.buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 15px;
}

.nav-button {
    padding: 10px 20px;
    font-size: 16px;
    padding-top: 5px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(rgba(75, 85, 99, 0.8), rgba(31, 41, 55, 0.8)), url("/static/image/nav.jpg");    color: white;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.nav-button:hover {
background: linear-gradient(rgba(75, 85, 99, 0.8), rgba(31, 41, 55, 0.8)), url("/static/image/nav.jpg");    transform: scale(1.05);
}

body.light-mode  .nav-button{
 background: linear-gradient(rgba(147, 197, 253, 0.8), rgba(59, 130, 246, 0.8));
color: #1f2937;

}
