/* style.css Governor*/
/* Hide sidebar on smaller screens */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        width: 100%; /* Expand main content to full width */
    }
}

body {
    font-family: Arial, sans-serif;
    background-color: #e3f2fd;
    color: #333;
    margin: 0;
    padding: 0;
}

.county-profile {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

h1 {
    color: #007bff;
    text-align: center;
}

h2, h3 {
    color: #0056b3;
}

/* Leaders Section */
.leaders-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Styling for each leader card */
.leader {
    flex: 1;
    text-align: center;
    background-color: #e9f7fe;
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Initial shadow */
}

/* Image styling inside each leader card */
.leader img {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    margin-top: 10px;
}

/* Hover effect for leader boxes */
.leader:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

p {
    margin: 5px 0;
    color: #333;
}

.county-info, .county-coat {
    text-align: center;
}

/* Constituency Section */
.constituencies-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #e0f7fa;
    border-radius: 8px;
}

.constituency {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 5px;
    text-align: center;
}

.constituency img {
    max-width: 120px;
    margin: 10px auto;
    border-radius: 8px;
}
/* CSS for the cover photo */
.cover-photo {
    position: relative;
    text-align: center;
    overflow: hidden;
    border: 5px solid #007bff; /* Adds a beautiful border */
    border-radius: 10px;        /* Rounded corners */
    width: 100%;                /* Full-width */
    max-height: 300px;          /* Limit height to focus on midsection */
}

.cover-photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;    /* Centers the midsection of the image */
}

.cover-title {
    position: absolute;
    bottom: 10px;
    left: 20px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5); /* Adds slight transparency */
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 1.5em;
}


/* Profile Container */
.profile-container {
    display: flex;
    padding: 20px;
}

.sidebar {
    width: 25%;
    padding: 20px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
}

.sidebar h3 {
    color: #0056b3;
}

.sidebar img {
    width: 100%;
    max-width: 150px;
    border-radius: 8px;
}

.main-content {
    width: 75%;
    padding: 20px;
}

/* Leaders Section */
.leaders-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}


/* Constituencies Section */
.constituencies-section {
    margin-top: 30px;
    display: grid;
    gap: 15px;
}

/* Default styling for constituency cards */
.constituencies-section .constituency {
    background-color: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
	   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Initial shadow */
}

/* Image styling for constituency */
.constituencies-section .constituency img {
    width: 170px;
    border-radius: 50%;
    margin-top: 10px;
}

/* Hover effect for constituency cards */
.constituencies-section .constituency:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Larger screen layout: 4 columns */
@media (min-width: 992px) {
    .constituencies-section {
        grid-template-columns: repeat(4, 1fr); /* 4 items per row */
    }
}
/* Modal styling */
/* Modal background overlay */
#candidateModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it appears above other content */
}

/* Modal content styling */
#candidateModal .modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 80%; /* Adjust width as needed */
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Close button styling */
#candidateModal .close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}


.modal-content {
    background: #fff;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    text-align: left;
}

 
.view-candidates-btn {
        background-color: #4a90e2; /* Light blue */
        color: #ffffff;
        padding: 10px 20px;
        border: none;
        border-radius: 5px;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.2s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    }

    .view-candidates-btn:hover {
        background-color: #357abd; /* Darker blue on hover */
        transform: translateY(-2px); /* Slight lift effect */
    }

    .view-candidates-btn:active {
        background-color: #2c6ea4; /* Even darker blue when pressed */
        transform: translateY(1px); /* Button depress effect */
    }