/*
 * index_main.css - Styling for the main content areas,
 * specifically targeting the professional display of officer information and the slider.
 */

/* General Typography and Layout for Main Content */
.main-content-container {
    padding: 20px;
    max-width: 100%; /* Ensures it fills parent container */
    margin: 0 auto;
    box-sizing: border-box;
}

/* Officer Section Styling */
/* =========================================
CSS FOR OFFICER CARD (Vertical/Rounded Photo Look)
=========================================
*/

.officer-section {
    margin-bottom: 40px;
    background-color: #f7f7f7; /* Light background for the section */
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
}

/* Container for all Officer Cards - Makes them display horizontally */
.all-officers-container {
    display: flex;
    justify-content: center; /* Center the cards horizontally */
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Individual Officer Card Styling */
.officer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
    padding: 10px;
    width: 200px; /* Fixed width for desktop */
    text-align: center;
    flex-grow: 0;
    flex-shrink: 0;
    margin-bottom: 10px; /* Add vertical spacing when wrapping */
}

/* Specific styling for the photo container to get the curved border */
.officer-photo-container {
    width: 150px;
    height: 180px;
    padding: 5px;
    background-color: white;
    border: 3px solid #006633;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.officer-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12.5px;
}


/* Styling the text details (Vertical stacking for details) */
.officer-details-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.2;
}

.officer-designation-h {
    font-size: 1.3rem;
    color: #e53935;
    font-weight: 500;
    margin: 5px 0 2px 0;
}

.officer-name-h strong {
    font-size: 1rem;
    color: #333;
    font-weight: normal;
    display: block;
    margin: 0;
}

.municipality-name-h {
    display: none;
}

/* --- SLIDER SECTION STYLING (UPDATED) --- */

.slider-section {
    margin-bottom: 40px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.image-slider {
    width: 100%;
    max-height: 450px; /* Desktop/Large Screen Height */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    width: 100%;
    height: 450px; /* Desktop/Large Screen Height */
    display: none;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
    box-sizing: border-box;
}

.prev-btn, .next-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    border-radius: 4px;
    transition: background 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-placeholder {
    padding: 50px;
    text-align: center;
    color: #999;
}
.service-card img {
    height: 6rem;
    width: 6rem;
}

/* ------------------------------------------------------------------- */
/* CSS for the Maharashtra Government Officials Section (Center Content) */
/* ------------------------------------------------------------------- */

.govt-officials-module {
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.govt-officials-module h3 {
    text-align: center;
    color: #004a99;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #004a99;
    padding-bottom: 10px;
    font-size: 1.25em;
    font-weight: 700;
}

.officials-grid {
    display: grid;
    /* Use auto-fit and minmax for fluid, responsive columns */
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    justify-content: center;
}

.official-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 5px; /* Reduced horizontal padding */
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: default;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.official-card:hover {
    background-color: #e3f2fd;
    box-shadow: 0 6px 12px rgba(0, 74, 153, 0.15);
    transform: translateY(-3px);
}

.official-photo-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    border: 4px solid #004a99;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
}

.official-card:hover .official-photo-container {
    border-color: #007bff;
}

.official-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.official-card p {
    margin: 2px 0;
}

.official-name {
    font-weight: bold;
    color: #343a40;
    font-size: 0.9em;
}

.official-designation {
    color: #6c757d;
    font-size: 0.75em;
}

.emergency-contacts-module {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3f3;
    border: 1px solid #dc3545;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.15);
}

.emergency-contacts-module h3 {
    text-align: center;
    color: #dc3545;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.15em;
    font-weight: 700;
    padding-bottom: 5px;
    border-bottom: 2px solid #f8d7da;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.contact-card {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    background-color: #ffffff;
    border-left: 5px solid var(--card-color, #dc3545);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.contact-card:hover {
    background-color: #f7f7f7;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.contact-icon-container {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}

.contact-icon {
    font-size: 1.5em;
    line-height: 1;
}

.contact-details {
    flex-grow: 1;
}

.contact-name {
    margin: 0;
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.contact-number-display {
    margin: 0;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--card-color, #dc3545);
    letter-spacing: 0.5px;
}
/* --- Public Notices Module Styles --- */

.public-notices-module {
    background-color: #f7f9fc;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.public-notices-module h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #004a99;
    font-size: 1.25rem;
    padding-bottom: 5px;
    border-bottom: 2px solid #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-marquee-container {
    height: 190px;
    overflow: hidden;
    position: relative;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #ffffff;
    padding: 10px 0;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    transform: translateY(0);
}

.notice-item {
    padding: 8px 15px;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
    transition: background-color 0.5s ease;
}

.notice-item:hover {
    background-color: #eaf3ff;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-link {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.notice-link:hover {
    color: #dc3545;
}

/* Icon and Animation */
.notice-icon {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #ffc107;
    line-height: 1;
    animation: pulse 1s infinite alternate;
}

/* Keyframes for vertical marquee */
@keyframes vertical-marquee {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Keyframes for the pulse animation on the icon */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.1); opacity: 0.7; }
}

/* Fallback for no records message */
.public-notices-module .no-record-msg {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

@keyframes pulse-shake {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.contact-card:hover .contact-number-display {
    animation: pulse-shake 0.5s ease-in-out infinite alternate;
}

/* --- RESPONSIVENESS BREAKPOINTS --- */

/* Small Laptop / Tablet (Max 1024px) */
@media (max-width: 1024px) {
    .officer-section {
        padding: 15px;
    }
    .all-officers-container {
        gap: 20px;
    }
}


/* Tablet (Max 768px) */
@media (max-width: 768px) {
    .officer-section {
        margin-bottom: 30px;
        padding: 15px 10px;
    }

    .all-officers-container {
        justify-content: space-around; /* Distribute space evenly */
        gap: 15px 10px; /* Reduced gap */
    }

    .officer-card {
        width: 45%;
        min-width: 150px; /* Prevent shrinking too much */
        padding: 5px;
    }

    .officer-photo-container {
        width: 120px;
        height: 144px;
        margin-bottom: 10px;
    }

    .officer-designation-h {
        font-size: 1.1rem;
    }

    .officer-name-h strong {
        font-size: 0.9rem;
    }
    
    /* SLIDER HEIGHT ADJUSTMENT */
    .image-slider, .slide {
        max-height: 300px;
        height: 300px;
    }

    .prev-btn, .next-btn {
        padding: 8px 12px;
        font-size: 1.2em;
    }
    
    .govt-officials-module {
        padding: 10px;
    }
    
    .official-photo-container {
        width: 80px;
        height: 80px;
    }
    .official-name {
        font-size: 0.85em;
    }
    .official-designation {
        font-size: 0.7em;
    }
}


/* Mobile (Max 500px) */
@media (max-width: 500px) {
    .main-content-container {
        padding: 10px;
    }
    
    .officer-section {
        padding: 10px;
    }

    .all-officers-container {
        gap: 15px 0;
        justify-content: center;
    }
    
    /* Force stack officers vertically on small phones */
    .officer-card {
        width: 90%; 
        max-width: 250px;
        min-width: 150px;
    }
    
    /* SLIDER HEIGHT ADJUSTMENT */
    .image-slider, .slide {
        max-height: 200px;
        height: 200px;
    }
    
    .prev-btn, .next-btn {
        padding: 5px 8px;
        font-size: 1em;
        /* Position controls slightly away from edges */
        margin: 0 5px; 
    }

    .govt-officials-module h3, .public-notices-module h3, .emergency-contacts-module h3 {
        font-size: 1.1em;
    }

    .officials-grid {
        /* Switch to 2 columns on small screens */
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
        gap: 10px;
    }
    
    .official-photo-container {
        width: 70px;
        height: 70px;
        border-width: 3px;
    }
    
    .contact-card {
        padding: 8px;
    }
    .contact-name {
        font-size: 0.8em;
    }
    .contact-number-display {
        font-size: 1em;
    }
    
    .notice-marquee-container {
        height: 160px; /* Slightly reduced marquee height */
    }
    .notice-link {
        font-size: 0.9rem;
    }
}


/* =========================================
   MAIN GRID LAYOUT RESPONSIVENESS (ADDED)
========================================= */

/* Desktop default (3 column layout) */
.main-grid-layout {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 20px;
    align-items: start;
}

/* Large screens (better spacing) */
@media (min-width: 1400px) {
    .main-grid-layout {
        grid-template-columns: 300px 1fr 300px;
        gap: 30px;
    }
}

/* Laptop / small desktop */
@media (max-width: 1200px) {
    .main-grid-layout {
        grid-template-columns: 220px 1fr 220px;
        gap: 15px;
    }
}

/* Tablet (sidebar collapse balance) */
@media (max-width: 992px) {
    .main-grid-layout {
        grid-template-columns: 1fr;
    }

    .left-sidebar-main,
    .right-sidebar-main,
    .center-content {
        width: 100%;
    }
}

/* Mobile layout */
@media (max-width: 768px) {
    .main-grid-layout {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
}

/* =========================================
   SERVICE CARDS RESPONSIVE (ADDED)
========================================= */

.service-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 768px) {
    .service-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .service-cards-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .service-cards-container {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   RIGHT SIDEBAR LINKS GRID (ADDED)
========================================= */

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 768px) {
    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   CENTER CONTENT SPACING FIX (ADDED)
========================================= */

.center-content {
    min-width: 0;
}

/* Prevent overflow issues */
.main-grid-layout > div {
    min-width: 0;
}

/* =========================================
   SMALL DEVICE TEXT ADJUSTMENTS (ADDED)
========================================= */

@media (max-width: 480px) {
    .quick-links-module h3,
    .important-links-module h3,
    .local-officials-module h3 {
        font-size: 1rem;
        text-align: center;
    }
}

/* =========================================
   TOUCH-FRIENDLY IMPROVEMENTS (ADDED)
========================================= */

@media (max-width: 768px) {
    .service-card,
    .external-link-card,
    .contact-card {
        padding: 12px;
    }
}