:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cae;
    --accent-color: #ffd166;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Header y Navegación */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
}

.menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.menu a:hover {
    opacity: 0.8;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Contenido Principal */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    min-height: calc(100vh - 300px);
}

/* Footer */
footer {
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #666;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--accent-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #e5b800;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.counter {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Grid de Iglesias */
.iglesias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.iglesia-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.iglesia-card:hover {
    transform: translateY(-5px);
}

.iglesia-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.iglesia-card-content {
    padding: 1.5rem;
}

.iglesia-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.iglesia-card p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* Filtros */
.filtros-sidebar {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filtros-sidebar h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.filtros-sidebar select,
.filtros-sidebar input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

/* Mapa */
.mapa-container {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

/* Página de Detalle */
.iglesia-detalle {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.iglesia-info h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.iglesia-metadata {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
}

.metadata-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 25px;
}

.horarios-lista {
    list-style: none;
    padding: 0;
}

.horarios-lista li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.galeria img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

.galeria img:hover {
    transform: scale(1.05);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-aprobada {
    background: var(--success-color);
    color: white;
}

.status-pendiente {
    background: var(--warning-color);
    color: var(--text-color);
}

.status-desaprobada {
    background: var(--danger-color);
    color: white;
}

/* Formularios */
.formulario-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-grupo {
    margin-bottom: 1.5rem;
}

.form-grupo label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-grupo input,
.form-grupo select,
.form-grupo textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-grupo textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Panel Admin */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.admin-sidebar {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
}

.admin-sidebar li {
    margin-bottom: 0.5rem;
}

.admin-sidebar a {
    display: block;
    padding: 0.8rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--primary-color);
    color: white;
}

.admin-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

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

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
}

.admin-table tr:hover {
    background: var(--light-bg);
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Responsive */
@media (max-width: 768px) {
    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 1rem;
    }

    .menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .iglesia-detalle {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }
    /* Estilo para el micrófono cuando está escuchando */
.mic-icon.listening {
    color: #ea4335 !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Indicador visual en el input mientras escucha */
.search-wrapper input.listening-mode {
    border-bottom-color: #ea4335;
}
/* Estilos para búsqueda por voz */
.mic-icon.listening {
    color: #ea4335 !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.search-wrapper input.listening-mode {
    border-bottom-color: #ea4335;
}

/* Deshabilitado para navegadores no compatibles */
.mic-icon.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
}