/* --- Municipios Page Styles --- */

/* Page Hero */
.mun-hero {
    background: linear-gradient(135deg, #005daa 0%, #003a7a 100%);
    padding: 60px 5% 80px;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mun-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5v10M30 45v10M5 30h10M45 30h10' stroke='rgba(255,255,255,0.04)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}

.mun-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.mun-hero-content h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.mun-hero-content p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
}

.mun-hero .hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;
}

.mun-hero .hero-wave svg {
    display: block;
    width: 100%;
    height: 50px;
    fill: var(--bg-light);
}

/* Container */
.mun-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 5% 80px;
}

/* Contact Info above table */
.mun-intro-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    text-align: center;
    border: 1px solid #eef2f5;
}

.mun-intro-card p {
    font-size: 15px;
    color: var(--text-dark);
    margin: 0 0 10px;
}

.mun-intro-card h2 {
    margin: 0;
}

.mun-intro-card h2 a {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mun-intro-card h2 a:hover {
    color: var(--primary-color);
}

/* Search Input */
.mun-search-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto 30px;
}

.mun-search-wrapper input[type="text"] {
    display: block;
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 1px solid #d1d9e6;
    border-radius: 30px;
    box-sizing: border-box;
    font-size: 15px;
    color: var(--text-dark);
    background-color: var(--white);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.mun-search-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(70, 47, 126, 0.1);
}

.mun-search-wrapper::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23462f7e'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-size: cover;
    pointer-events: none;
}

/* Table Styles */
.mun-table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 60px;
    border: 1px solid #eef2f5;
}

.mun-table {
    width: 100%;
    border-collapse: collapse;
}

.mun-table th,
.mun-table td {
    padding: 16px 20px;
    text-align: left;
    word-wrap: break-word;
    border-bottom: 1px solid #eef2f5;
}

.mun-table th {
    background-color: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

.mun-table td {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
}

.mun-table tbody tr {
    transition: background-color 0.2s ease;
}

.mun-table tbody tr:hover {
    background-color: #f8fafe;
}

.mun-table b {
    color: var(--accent-color);
}

/* Column widths */
.mun-table th.col-nombre, .mun-table td.col-nombre { width: 20%; }
.mun-table th.col-municipio, .mun-table td.col-municipio { width: 25%; }
.mun-table th.col-telefono, .mun-table td.col-telefono { width: 15%; }
.mun-table th.col-horario, .mun-table td.col-horario { width: 40%; }

/* Sections Divider */
.mun-section-title {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 60px 0 40px;
}

.mun-section-title::before,
.mun-section-title::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #cbd5e1;
}

.mun-section-title h2 {
    margin: 0;
    padding: 0 25px;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 25px;
    background: #fff;
}

/* Especialidades Grid */
.esp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.esp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--accent-color);
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.esp-card h3 {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-top: 0;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f5;
}

.esp-card h3.esp-subtitle {
    margin-top: 25px;
}

.esp-list {
    list-style: none;
    padding: 10px 0 0;
    margin: 0;
}

.esp-list li {
    position: relative;
    padding-left: 20px;
    font-size: 14.5px;
    color: #334155;
    margin-bottom: 8px;
    line-height: 1.4;
}

.esp-list li.center-text {
    text-align: center;
    padding-left: 0;
}

.esp-list li.center-text::before {
    display: none;
}

.esp-list li::before {
    content: '•';
    position: absolute;
    left: 5px;
    color: var(--secondary-color);
    font-size: 18px;
    line-height: 1;
    top: 0;
}

.esp-divider {
    height: 1px;
    background-color: #cbd5e1;
    margin: 20px 0;
    border: none;
}

/* Info Banners */
.mun-banners {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 50px;
}

.banner-blue {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 18px 25px;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.5;
}

.banner-purple {
    background: var(--accent-color);
    color: #fff;
    text-align: center;
    padding: 18px 25px;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 500;
}

/* Servicios Grid */
.serv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding: 0 20px;
}

.serv-col {
    text-align: center;
}

.serv-item {
    margin-bottom: 25px;
}

.serv-item h3 {
    color: var(--accent-color);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px;
}

.serv-item p {
    color: var(--text-light);
    font-size: 15px;
    margin: 0;
}

.serv-item h3.blue-title {
    color: var(--primary-color);
}

.serv-list {
    list-style: none;
    padding: 0;
    margin: 15px auto 0;
    display: inline-block;
    text-align: left;
}

.serv-list li {
    position: relative;
    padding-left: 20px;
    font-size: 15px;
    color: #334155;
    margin-bottom: 8px;
}

.serv-list li::before {
    content: '•';
    position: absolute;
    left: 5px;
    color: var(--secondary-color);
    font-size: 18px;
    line-height: 1;
    top: 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .esp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mun-hero {
        padding: 50px 5% 60px;
    }
    .mun-hero-content h1 {
        font-size: 30px;
    }
    .mun-container {
        padding: 40px 5% 60px;
    }
    
    .esp-grid {
        grid-template-columns: 1fr;
    }

    .serv-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mun-table th,
    .mun-table td {
        padding: 12px 15px;
    }

    /* Responsive Table to Cards */
    .mun-table, 
    .mun-table tbody, 
    .mun-table th, 
    .mun-table td, 
    .mun-table tr {
        display: block;
        width: 100%;
    }

    .mun-table thead {
        display: none;
    }

    .mun-table tbody tr {
        margin-bottom: 20px;
        border: 1px solid #eef2f5;
        border-radius: 12px;
        padding: 15px;
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    }

    .mun-table td {
        padding: 10px 5px;
        position: relative;
        text-align: left;
        border: none;
        border-bottom: 1px solid #f5f5f7;
    }

    .mun-table td:last-child {
        border-bottom: none;
    }

    .mun-table td::before {
        content: attr(data-label);
        font-weight: 700;
        display: block;
        margin-bottom: 6px;
        color: var(--primary-color);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mun-table th.col-nombre, .mun-table td.col-nombre,
    .mun-table th.col-municipio, .mun-table td.col-municipio,
    .mun-table th.col-telefono, .mun-table td.col-telefono,
    .mun-table th.col-horario, .mun-table td.col-horario {
        width: 100%;
    }
}
