@import url('https://fonts.googleapis.com/css2?family=Amiri&family=Tajawal:wght@400;700&display=swap'); /* Islamic Style Fonts */

body {
    font-family: 'Tajawal', sans-serif; /* Arabic-style font */
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: #f5f3e9; /* Light cream background */

    /* Fix the Islamic pattern */
    background-image: url('bpattern.png'); /* Islamic pattern */
    background-size: 300px 300px; /* Adjust pattern size */
    background-position: center center; /* Centers the pattern */
    background-repeat: repeat; /* Ensures seamless tiling */
    background-attachment: fixed; /* Keeps it fixed while scrolling */

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

/* Navigation Bar (Enhanced with More Logo Padding) */
nav {
    background: linear-gradient(to right, #046c4e, #097d5b); /* Islamic Green Gradient */
    color: white;
    padding: 14px 0; /* Keeps the vertical padding */
    font-size: 24px; /* Slightly larger font */
    font-weight: bold;
    font-family: 'Amiri', serif; /* Traditional Arabic font */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    border-bottom: 4px solid #c0a24b; /* Slightly thicker border */
    display: flex;
    flex-direction: column; /* Ensures elements stack vertically */
    align-items: center;
    justify-content: center;
    height: 100px; /* Keeps the increased height */
}

.logo-container {
    width: 280px;
    padding-top: 10px;
    margin-bottom: 8px;
}

.logo-container img {
    width: 100%;
    height: auto;
}

nav h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
}

.poll-container {
    width: 80%;
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid #c0a24b;
}

.poll-container h2 {
    font-size: 22px;
    color: #046c4e;
    font-family: 'Amiri', serif;
    text-align: center;
    margin-bottom: 4px;
}

.poll-subtitle {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
}

.candidates {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.candidate-card {
    background: white;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 14px;
}

.candidate-card:hover {
    transform: translateY(-2px);
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #c0a24b;
}

.candidate-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #046c4e;
    flex-shrink: 0;
}

.candidate-info {
    flex: 1;
    min-width: 0;
}

.candidate-card h3 {
    font-size: 15px;
    font-family: 'Amiri', serif;
    margin: 0 0 6px 0;
    color: #046c4e;
    line-height: 1.4;
}

.candidate-bar-container {
    width: 100%;
    height: 8px;
    background: #e8e4d9;
    border-radius: 4px;
    overflow: hidden;
}

.candidate-bar {
    height: 100%;
    background: linear-gradient(to left, #046c4e, #28a745);
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.vote-percentage {
    font-size: 16px;
    font-weight: bold;
    color: #046c4e;
    min-width: 45px;
    text-align: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .poll-container {
        width: 92%;
        padding: 14px;
    }

    .candidate-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .candidate-card img {
        width: 42px;
        height: 42px;
    }

    .candidate-card h3 {
        font-size: 13px;
    }

    .vote-percentage {
        font-size: 14px;
    }
}


.comment-section {
    width: 80%;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid #c0a24b;
    text-align: center;
}

.comment-section h2 {
    font-size: 22px;
    color: #046c4e;
    font-family: 'Amiri', serif;
}

#commentForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#commentForm input, #commentForm textarea {
    width: 90%;
    padding: 10px;
    border: 1px solid #c0a24b;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
}

#commentForm button {
    background: #046c4e;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

#commentForm button:hover {
    background: #03543f;
}

/* Comments Display */
.comments-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    text-align: left;
}

.comment {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #046c4e;
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
}

.comment strong {
    color: #046c4e;
    font-size: 16px;
}

.disclaimer {
    background: #fff3cd;
    color: #856404;
    text-align: center;
    padding: 10px;
    margin: 20px auto;
    width: 80%;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    font-weight: bold;
    border: 1px solid #ffeeba;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background: linear-gradient(to right, #046c4e, #097d5b);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    font-family: 'Amiri', serif;
    border-top: 5px solid #c0a24b;
}

footer a {
    color: #ffdd57;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

.explanation {
    width: 80%;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid #c0a24b;
}

.explanation h2 {
    font-size: 22px;
    color: #046c4e;
    font-family: 'Amiri', serif;
}

.explanation p {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
}
