* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Melhorias para touch devices */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .file-label,
    .layer-btn,
    .legend-toggle,
    .legend-item {
        min-height: 44px; /* Tamanho mínimo recomendado para touch */
    }
    
    .btn-small {
        min-height: 40px;
    }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo {
    flex-shrink: 0;
}

.header-logo img {
    max-height: 120px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.header-text {
    flex: 1;
    text-align: center;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .header-logo img {
        max-height: 80px;
        max-width: 80px;
    }
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    header {
        padding: 20px 15px;
    }
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
    margin: 5px 0;
}

.header-subtitle {
    font-size: 0.95em;
    opacity: 0.8;
    font-weight: 300;
}

.header-credit {
    font-size: 0.85em;
    opacity: 0.7;
    font-weight: 300;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.header-credit strong {
    font-weight: 500;
    opacity: 0.9;
}

.header-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-link:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .header-link {
        font-size: 0.85em;
        padding: 6px 12px;
        margin-top: 10px;
    }
}

/* Controles de arquivo removidos - site específico para São Ludgero/SC */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-small:hover {
    background: #667eea;
    color: white;
}

.main-content {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.sidebar {
    width: 350px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Sistema de abas */
.tabs {
    display: flex;
    background: white;
    border-bottom: 2px solid #e0e0e0;
    padding: 0;
    margin: 0;
}

.tab-btn {
    flex: 1;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    font-size: 0.9em;
    text-align: center;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fa;
    font-weight: 600;
}

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.legend-panel,
.info-panel,
.zoneamento-panel {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    flex: 1;
    overflow-y: auto;
}

.legend-panel,
.info-panel {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.legend-panel h2,
.info-panel h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

#legend-container,
#info-container {
    min-height: 100px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid;
    transition: all 0.2s ease;
    cursor: pointer;
}

.legend-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.legend-label {
    flex: 1;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-count {
    background: #667eea;
    color: white;
    font-size: 0.75em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.legend-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
    color: #666;
}

.legend-toggle:hover {
    color: #667eea;
}

.placeholder {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.map-container {
    flex: 1;
    position: relative;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

/* Botão para minimizar mapa no mobile */
.toggle-map-btn {
    display: none;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 0 0 8px 8px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.toggle-map-btn:hover {
    background: #5568d3;
}

.toggle-map-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Estado minimizado do mapa no mobile */
@media (max-width: 768px) {
    .toggle-map-btn {
        display: block;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .map-container {
        order: 1;
        transition: all 0.3s ease;
    }
    
    .sidebar {
        order: 2;
        max-height: none;
        flex: 1;
    }
    
    .map-container.minimized {
        height: 80px !important;
        min-height: 80px;
        flex-shrink: 0;
    }
    
    .map-container.minimized #map {
        opacity: 0.3;
        pointer-events: none;
    }
}

#map {
    width: 100%;
    height: 100%;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    max-width: 300px;
}

.layer-control {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.layer-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.layer-toggle-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.layer-toggle-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.layer-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.layer-selector {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.layer-btn {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 0.85em;
    text-align: left;
    transition: all 0.2s ease;
    font-weight: 500;
}

.layer-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(3px);
}

.layer-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

.map-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#show-layer-menu {
    display: inline-block;
}

.layer-control.hidden {
    display: none !important;
}

/* Scrollbar para seletor de camadas */
.layer-selector::-webkit-scrollbar {
    width: 6px;
}

.layer-selector::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.layer-selector::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.layer-selector::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.info-content {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.info-section {
    margin-bottom: 10px;
}

.info-content h3 {
    margin-top: 0;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.info-content h4 {
    color: #667eea;
    margin: 15px 0 8px 0;
    font-size: 1em;
    font-weight: 600;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #667eea;
}

.info-value {
    color: #333;
    text-align: right;
    flex: 1;
    margin-left: 10px;
}

/* Scrollbar personalizada */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Responsividade */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .map-container {
        height: 500px;
    }
    
    .map-controls {
        max-width: 250px;
    }
    
    .layer-selector {
        max-height: 150px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    header {
        padding: 20px 15px;
    }
    
    header h1 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }
    
    header p {
        font-size: 0.9em;
    }
    
    
    .main-content {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    
    .sidebar {
        width: 100%;
        max-height: 250px;
        order: 2;
    }
    
    .map-container {
        height: 400px;
        order: 1;
    }
    
    .map-controls {
        position: relative;
        top: auto;
        right: auto;
        padding: 10px;
        max-width: 100%;
        flex-direction: column;
    }
    
    .layer-control {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .layer-selector {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
    }
    
    .layer-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
        text-align: center;
        font-size: 0.8em;
        padding: 6px 10px;
    }
    
    .map-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-small {
        width: 100%;
    }
    
    .legend-panel,
    .info-panel,
    .zoneamento-panel {
        padding: 15px;
    }
    
    .legend-panel h2,
    .info-panel h2,
    .zoneamento-panel h2 {
        font-size: 1.1em;
    }
    
    .tab-btn {
        padding: 10px 5px;
        font-size: 0.85em;
    }
    
    .zoneamento-item {
        padding: 12px;
    }
    
    .zoneamento-desc {
        font-size: 0.85em;
    }
    
    .legend-item {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .legend-color {
        width: 25px;
        height: 25px;
    }
}

/* Responsividade para celulares pequenos */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    header p {
        font-size: 0.85em;
    }
    
    
    .sidebar {
        max-height: 200px;
    }
    
    .map-container {
        height: 350px;
    }
    
    .layer-btn {
        flex: 1 1 100%;
        font-size: 0.75em;
        padding: 8px 5px;
    }
    
    .legend-item {
        font-size: 0.85em;
    }
    
    .legend-label {
        font-size: 0.9em;
    }
    
    .legend-count {
        font-size: 0.7em;
        padding: 1px 6px;
    }
}

/* Estilos para elementos do mapa */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Melhorias para Leaflet em mobile */
@media (max-width: 768px) {
    .leaflet-control-zoom {
        margin-top: 10px;
        margin-right: 10px;
    }
    
    .leaflet-control-zoom a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 20px;
    }
    
    .leaflet-popup-content {
        margin: 12px;
        font-size: 13px;
    }
    
    .leaflet-popup-content-wrapper {
        max-width: 280px;
    }
    
    .leaflet-popup-tip {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .leaflet-control-zoom a {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 22px;
    }
    
    .leaflet-popup-content-wrapper {
        max-width: 250px;
    }
    
    .leaflet-popup-content {
        margin: 10px;
        font-size: 12px;
    }
}

.leaflet-popup-content {
    margin: 15px;
    font-size: 14px;
}

.leaflet-popup-content button {
    margin-top: 10px;
    padding: 12px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 0.9em;
    min-height: 44px; /* Melhor para touch */
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
}

.leaflet-popup-content button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.leaflet-popup-content button:active {
    transform: translateY(0);
}

/* Modal/Popup para informações detalhadas */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
}

@media (min-width: 769px) {
    .modal.show {
        align-items: center;
        padding: 20px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* Ajuste automático para diferentes tamanhos de tela */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 90vh;
        margin: 5vh auto;
        border-radius: 12px 12px 0 0;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

@media (max-width: 480px) {
    .modal-header {
        padding: 15px 20px;
        border-radius: 0;
    }
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 2em;
    font-weight: 300;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch; /* Scroll suave no iOS */
    min-height: 0; /* Permite que o flex funcione corretamente */
}

@media (max-width: 768px) {
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 15px;
        max-height: calc(100vh - 70px); /* Altura total menos header */
    }
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Estilos para conteúdo do modal */
.modal-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.modal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-section h3 {
    color: #667eea;
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.modal-info-label {
    font-size: 0.85em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-info-value {
    font-size: 1em;
    color: #333;
    font-weight: 500;
}

.modal-observation {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9em;
    color: #856404;
}

/* Descrição legal no modal */
.legal-description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 10px;
}

.legal-artigo {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.legal-text {
    color: #333;
    line-height: 1.6;
    margin: 0;
    text-align: justify;
}

/* Conteúdo da aba Zoneamento */
.zoneamento-intro {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.zoneamento-intro h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.zoneamento-intro p {
    margin: 8px 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.zoneamento-list {
    padding: 0 5px;
}

.zoneamento-section {
    margin-bottom: 25px;
}

.zoneamento-section h4 {
    color: #667eea;
    font-size: 1.1em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

.zoneamento-item {
    background: white;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zoneamento-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-left-color: #764ba2;
}

.zoneamento-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.zoneamento-color {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.zoneamento-item-info {
    flex: 1;
}

.zoneamento-item-info strong {
    display: block;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 3px;
}

.zoneamento-type {
    display: block;
    color: #666;
    font-size: 0.85em;
    font-style: italic;
}

.zoneamento-desc {
    color: #555;
    line-height: 1.5;
    margin: 10px 0;
    font-size: 0.9em;
    text-align: justify;
}

.zoneamento-artigo {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-top: 8px;
}

/* Estilos para aba de informações com todas as zonas */
.all-zones-info {
    padding: 10px 0;
}

.info-intro {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95em;
    line-height: 1.5;
}

.zone-info-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.zone-info-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.zone-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

.zone-info-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.zone-info-title h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.3em;
}

.zone-info-type {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.zone-info-section {
    margin-bottom: 15px;
}

.zone-info-section:last-child {
    margin-bottom: 0;
}

.zone-info-section h4 {
    color: #667eea;
    font-size: 1em;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.zone-info-artigo {
    font-weight: 600;
    color: #667eea;
    margin: 8px 0;
    font-size: 0.9em;
}

.zone-info-desc {
    color: #555;
    line-height: 1.6;
    margin: 8px 0;
    text-align: justify;
    font-size: 0.9em;
}

.zone-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.zone-info-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.zone-info-label {
    font-size: 0.85em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
}

.zone-info-value {
    font-size: 0.95em;
    color: #333;
    font-weight: 500;
}

.zone-info-observation {
    margin-top: 12px;
    padding: 10px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9em;
    color: #856404;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .zone-info-grid {
        grid-template-columns: 1fr;
    }
    
    .zone-info-card {
        padding: 12px;
    }
    
    .zone-info-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .zone-info-color {
        width: 35px;
        height: 35px;
    }
}

/* Responsividade do modal - melhorias específicas */
@media (max-width: 768px) {
    .modal-header h2 {
        font-size: 1.1em;
        line-height: 1.3;
        word-wrap: break-word;
        flex: 1;
        margin-right: 10px;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.8em;
        flex-shrink: 0;
    }
    
    .modal-section {
        margin-bottom: 18px;
        padding-bottom: 15px;
    }
    
    .modal-section h3 {
        font-size: 1.05em;
        margin-bottom: 12px;
    }
    
    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-info-item {
        padding: 10px;
    }
    
    .modal-info-label {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
    
    .modal-info-value {
        font-size: 0.95em;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 12px 15px;
        position: sticky;
        top: 0;
    }
    
    .modal-header h2 {
        font-size: 0.95em;
        line-height: 1.2;
        max-width: calc(100% - 50px);
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.6em;
    }
    
    .modal-section {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .modal-section h3 {
        font-size: 0.95em;
        margin-bottom: 10px;
    }
    
    .modal-info-item {
        padding: 8px;
    }
    
    .modal-info-label {
        font-size: 0.75em;
        margin-bottom: 3px;
    }
    
    .modal-info-value {
        font-size: 0.9em;
        line-height: 1.4;
    }
    
    .modal-observation {
        font-size: 0.85em;
        padding: 10px;
        line-height: 1.4;
    }
}

/* Ajuste para orientação landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 70px);
    }
}
