/* General styles */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: "Cairo", serif;
    font-weight: 500;
    background: url('/static/user_app/images/Untitled design.png') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden;
    line-height: 1.6;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #f0f0f0;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 0;
    background: transparent; /* Remove redundant background */
    padding: 0;
}

.content-wrap {
    flex: 1;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px 0;
}

/* Navbar styles */
.navbar-container {
    background-color: #92163A;
    width: 100%; /* Fix width to 100% */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    direction: rtl;
    z-index: 1;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.navbar-container h5 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

.navigation {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.navigation li {
    display: inline-block;
    position: relative;
    margin: 0 15px;
}

img {
    max-width: 100px !important;
    height: auto !important;
    border-radius: 5px;
}

.button {
    text-decoration: none;
    color: #ffffff;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: color 0.3s ease, transform 0.2s ease;
    font-weight: 700;
    font-family: "Scheherazade New", serif;
    padding: 10px 15px;
}

.button:hover {
    color: #a07883;
    transform: translateY(-2px);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    text-align: right;
    font-family: "Cairo", sans-serif;
    font-weight: 800;
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-content a {
    color: #92163A;
    text-decoration: none;
    display: block;
    padding: 10px;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #ff5722;
}

.navigation li:hover .dropdown-content {
    display: block;
}

/* Grid layout */
.container {
    padding: 4rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
}

.card {
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    width: 100%;
    position: relative;
    background-image: url("/static/user_app/images/Untitled design.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s ease;
}

.card:hover::before {
    background: rgba(0, 0, 0, 0.4);
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: #fff;
    position: relative;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 15px 15px;
}

.card-title,
.card-text {
    text-align: center;
    margin-bottom: 0.75rem;
    color: #fff;
    font-family: "Cairo", serif;
    font-weight: bold;
    line-height: 1.4;
}

.card-title {
    font-size: 1.2rem;
}

.card-img-top {
    width: 50%;
    height: 150px; /* Increase height for better visibility */
    object-fit: cover;
    align-self: center;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.text-center {
    text-align: center;
}

.btn {
    align-self: center;
    margin-top: 1rem;
    border-radius: 25px;
}

.btn-primary {
    background-color: #8f173a;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: #a61c47;
    transform: translateY(-2px);
}

footer {
    background-color: #92163A;
    color: white;
    text-align: center;
    padding: 20px;
    width: 100%;
    position: relative;
    bottom: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.social-icons a {
    color: white;
    font-size: 20px;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #ddd;
}

.copyright {
    color: #ffffff;
    font-size: 14px;
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .row {
        grid-template-columns: repeat(3, 1fr);
    }
    .container {
        padding: 3rem 0;
    }
}

@media (max-width: 992px) {
    .navbar-container {
        flex-direction: column;
        text-align: center;
        padding: 10px 20px;
    }
    .navigation {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }
    .navigation li {
        width: 100%;
        margin: 5px 0;
    }
    .row {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .page-container {
        transform: none; /* Remove scaling */
        width: 100%; /* Fix width */
        min-height: 100vh;
        margin: 0;
    }
    body, html {
        width: 100%;
        overflow-x: hidden;
    }
    .navbar-container, .container, .row, footer {
        width: 100%;
        box-sizing: border-box;
    }
    .container {
        padding: 2rem 10px; /* Reduce padding and add horizontal padding */
        max-width: 100%;
    }
    .row {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 1.5rem;
        padding: 0 10px;
    }
    .card {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }
    .card-img-top {
        width: 80%; /* Increase image size for readability */
        height: 150px;
    }
    .card-title {
        font-size: 1.1rem;
    }
    .card-text {
        font-size: 0.9rem;
    }
    .btn-primary {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    .main-content {
        padding: 10px;
    }
}
