/* Basic styling for nucleo-comunicacao-grid */
.nucleo-comunicacao-grid {
    display: grid;
    /* 2 colunas quando houver espaço, 1 coluna quando não houver */
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px 7px;
    padding: 5px 0;
    margin-left: -5px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .nucleo-comunicacao-grid {
        grid-template-columns: 1fr;
    }
}

.wrapper{
    margin: 0px;
}

.wrapper.container {
        padding: 0 !important;
        margin:0px;
    }

/* Styling for individual nucleo items */
.nucleo-item {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 16px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-height: 205px;
    max-height: 205px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Fallback: se os cards forem renderizados sem o wrapper grid,
   eles ainda ficam em 2 colunas no desktop. */
@media (min-width: 768px) {
    .nucleo-item {
        display: inline-block;
        vertical-align: top;
        width: calc(50% - 10px);
        margin: 0 7px 24px 0;
    }
}

@media (max-width: 767px) {
    .nucleo-item {
        display: block;
        width: 100%;
        margin: 0 0 24px 0;
    }
}

/* Quando o wrapper grid existe, deixe o grid controlar os itens */
.nucleo-comunicacao-grid .nucleo-item {
    display: block;
    width: 100%;
    margin: 0;
}

.nucleo-orgao-header {
    height: 50px;
    margin-bottom: 20px;
}

.nucleo-pessoa-info {
    height: 51px;
    margin-bottom: 10px;
}

.nucleo-item a.nucleo-contact-info {
    width: 100%;
    max-width: none;
    height: 40px;
    gap: 16px; /* This gap will only apply if it's a flex/grid container */
    border-radius: 16px;
    background: #E9F6EB;
    display: flex; /* Make it a flex container to use gap and center text */
    align-items: center; /* Vertically center text */
    justify-content: center; /* Horizontally center text */
    font-family: Kanit;
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #1B7727;
    text-decoration: none; /* Remove underline for link */
    margin-top: 16px;
}

@media (max-width: 390px) {
    .nucleo-item a.nucleo-contact-info {
        max-width: 358px;
    }
}

/* Modal Styles */
.nucleo-modal-overlay {
    display: none; /* Reverted */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.nucleo-modal {
    display: none; /* Reverted */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    width: 550px;
    height: 379px;
    /* Reverted display: flex, flex-direction, gap */
}

.nucleo-modal-body {
    /* Reverted display: flex, flex-direction, gap, flex-grow */
}

.modal-section {
    /* Base styles for sections if needed */
}

.modal-contato-info {
    /* Reverted display: flex, flex-direction, gap */
}

.contato-item {
    flex: 1;
    margin-bottom: 15px;
}

.contato-item h4 {
    font-family: Kanit;
    font-weight: 300;
    font-size: 16px;
    line-height: 132%;
    letter-spacing: 0%;
    color: #929292;
    margin: 0 0 0px 0; /* Keep existing margin */
}

#nucleo-modal-email,
#nucleo-modal-tel {
    font-family: Kanit;
    font-weight: 400;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0%;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-offset: 0%;
    text-decoration-thickness: 0%;
    color: #239832;
    margin: 1px;;
}

.nucleo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.nucleo-modal-header h3 {
    margin: 0;
    font-size: 1.5em;
}

#nucleo-modal-title {
    font-family: Kanit;
    font-weight: 500;
    font-size: 24px;
    line-height: 140%;
    letter-spacing: 0%;
    color: #3C4650;
    margin: 0; /* Override default h3 margin */
}

.nucleo-modal-orgao-desc {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

#nucleo-modal-orgao-desc {
    font-family: Kanit;
    font-weight: 300;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #3C4650;
    margin-bottom: 10px;
}

.nucleo-modal-close-x {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
}

.nucleo-modal-body p {
    margin: 10px 0;
}


/* Responsive Modal */
@media (max-width: 640px) {
    .nucleo-modal {
        width: calc(100% - 32px);
        padding: 16px;
    }
    .nucleo-modal-header h3 {
        font-size: 1.2em;
    }
}

.nucleo-item h3 {
    font-family: Kanit;
    font-weight: 500;
    font-size: 24px;
    line-height: 140%;
    letter-spacing: 0%;
    color: #3C4650;
    margin-top: 0; 
    margin:0px;
}

.nucleo-item h4 {
    font-family: Kanit;
    font-weight: 300;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #3C4650;
    margin-bottom: 10px; /* Keep existing margin-bottom */
}

.nucleo-item p {
    margin: 2px 0px;
    font-size: 16px;
    color: #555;
}

.nucleo-pessoa-info p:nth-of-type(1) { /* Styling for cargo */
    font-family: Kanit;
    font-weight: 300;
    font-size: 16px;
    line-height: 132%;
    letter-spacing: 0%;
    color: #929292;
    margin-bottom: 0;
}

#nucleo-modal-cargo {
    font-family: Kanit;
    font-weight: 300;
    font-size: 16px;
    line-height: 132%;
    letter-spacing: 0%;
    color: #929292;
    margin-bottom: 0;
}

.nucleo-pessoa-info p:nth-of-type(2) strong { /* Styling for nome */
    font-family: Kanit;
    font-weight: 400;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #3C4650;
    margin-top: 0;
}

#nucleo-modal-nome {
    font-family: Kanit;
    font-weight: 400;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #3C4650;
    margin-top: 1;
}

.nucleo-item a {
    color: #0073aa; /* WordPress primary blue */
    text-decoration: none;
}@media (max-width: 567px) {
    .nucleo-comunicacao-grid {
        gap: 24px;
        padding: 0px 10px;
    }
}

.nucleo-item a:hover {

}

.comunicacao-wrapper {
    display: flex;
    background: #F8F8F8;
    border-radius: 10px;
    gap: 45px;
    max-width: 100%;
    margin-top: 20px;
    margin-bottom: 40px;
    margin-left: 0px;
}

@media (max-width: 767px) {
    .comunicacao-wrapper {
        margin-left: 12px;
    }
}

.comunicacao-coluna {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.comunicacao-divisoria {
    width: 0px;
    border-left: 1px solid #C5C5C5;
    opacity: 1;
}
.comunicacao-setor {
    font-family: Kanit, sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 16px;
    line-height: 132%;
    color: #929292;
    margin-top: 12px !important;
    white-space: nowrap;
}
.comunicacao-nome {
    font-family: Kanit, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 20px;
    line-height: 100%;
    color: #465564;
    margin-bottom: 2px;
}

@media (max-width: 800px) {
    .comunicacao-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    .comunicacao-divisoria {
        display: none;
    }
}