/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: #ffffff;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
header {
    background: #ffffff;
    border-bottom: 3px solid #2c3e50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: block;
    text-decoration: none;
}

.logo img {
    height: 100px;
    width: auto;
}

/* Navegación */
nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
}

nav a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.2s;
}

nav a:hover {
    color: #27ae60;
}

nav a.active {
    color: #27ae60;
    border-bottom: 2px solid #27ae60;
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
}

/* Botón volver */
.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-volver:hover {
    background: #e0e0e0;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 50px 20px;
    text-align: center;
    color: white;
}

.hero-home {
    padding: 45px 20px;
}

.hero h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero p {
    font-size: 15px;
    opacity: 0.85;
}

/* ===== GRID DE TRÁMITES ===== */
.tramites-container {
    max-width: 1000px;
    margin: -30px auto 40px;
    padding: 0 20px;
}

.tramites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tramite-card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.tramite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-color: #27ae60;
}

.tramite-icon {
    width: 70px;
    height: 70px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 30px;
}

.tramite-card h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.tramite-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ===== SECCIÓN COMUNIDAD ===== */
.comunidad-section {
    margin-top: 50px;
    text-align: center;
}

.comunidad-section h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.comunidad-section > p {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

.comunidad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.comunidad-card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.comunidad-card.trabajo:hover {
    border-color: #3498db;
    transform: translateY(-5px);
}

.comunidad-card.emprendimiento:hover {
    border-color: #9b59b6;
    transform: translateY(-5px);
}

.comunidad-card .comunidad-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 30px;
}

.comunidad-card.trabajo .comunidad-icon {
    background: #3498db;
}

.comunidad-card.emprendimiento .comunidad-icon {
    background: #9b59b6;
}

.comunidad-card h3 {
    font-size: 17px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.comunidad-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ===== CONTENEDOR PRINCIPAL BÚSQUEDA ===== */
.main-container {
    max-width: 550px;
    margin: -40px auto 60px;
    padding: 0 20px;
    flex: 1;
}

.search-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px 35px;
}

.search-box h2 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

/* ===== FORMULARIO ===== */
.input-container {
    margin-bottom: 20px;
}

.input-container label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.input-container input,
.input-container textarea,
.input-container select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-container textarea {
    min-height: 120px;
    resize: vertical;
}

.input-container input:focus,
.input-container textarea:focus,
.input-container select:focus {
    outline: none;
    border-color: #27ae60;
}

.input-container input::placeholder,
.input-container textarea::placeholder {
    color: #aaa;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.submit-btn:hover {
    background: #219a52;
}

.submit-btn.blue {
    background: #3498db;
}

.submit-btn.blue:hover {
    background: #2980b9;
}

.submit-btn.purple {
    background: #9b59b6;
}

.submit-btn.purple:hover {
    background: #8e44ad;
}

/* ===== RESULTADOS ===== */
.resultados-lista {
    margin-top: 30px;
}

.resultados-lista > h3 {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.resultado {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeSlide 0.4s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.resultado-exito {
    border: 2px solid #27ae60;
}

.resultado-vacio {
    border: 2px solid #95a5a6;
}

.resultado-top {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.resultado-exito .resultado-top {
    background: #27ae60;
    color: white;
}

.resultado-vacio .resultado-top {
    background: #95a5a6;
    color: white;
}

.resultado-top span {
    width: 26px;
    height: 26px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.resultado-top h4 {
    font-size: 14px;
    font-weight: 600;
}

.resultado-content {
    padding: 20px;
    background: #fafafa;
}

.dato {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 8px;
}

.dato:last-child {
    border-bottom: none;
}

.dato-label {
    font-size: 13px;
    color: #7f8c8d;
}

.dato-valor {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.estado-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-aprobado {
    background: #27ae60;
    color: white;
}

.estado-pendiente {
    background: #f39c12;
    color: white;
}

.estado-proceso {
    background: #3498db;
    color: white;
}

.resultado-vacio .resultado-content p {
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
    line-height: 1.7;
}

/* ===== LISTADO DE ANUNCIOS ===== */
.listado-container {
    max-width: 900px;
    margin: -30px auto 60px;
    padding: 0 20px;
}

.listado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.listado-header h2 {
    font-size: 20px;
    color: #2c3e50;
}

.btn-publicar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-publicar:hover {
    background: #219a52;
}

.anuncio-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    overflow: hidden;
    transition: all 0.3s;
}

.anuncio-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.anuncio-card-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.anuncio-card.emprendimiento .anuncio-card-header {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.anuncio-titulo {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.anuncio-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.anuncio-fecha {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 12px;
}

.anuncio-expira {
    font-size: 11px;
    color: white;
    background: rgba(255,255,255,0.25);
    padding: 4px 10px;
    border-radius: 12px;
}

.anuncio-expira.pronto {
    background: #e74c3c;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.anuncio-card-body {
    padding: 20px 25px;
}

.anuncio-descripcion {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 18px;
}

.anuncio-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.anuncio-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #f0f4f8;
    border-radius: 20px;
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
}

.anuncio-tag.tipo {
    background: #e8f5e9;
    color: #27ae60;
}

.anuncio-tag.ubicacion {
    background: #e3f2fd;
    color: #1976d2;
}

.anuncio-tag.horario {
    background: #fff3e0;
    color: #e65100;
}

.anuncio-contacto {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.anuncio-contacto strong {
    color: #2c3e50;
}

.anuncio-contacto-icon {
    width: 32px;
    height: 32px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Sin anuncios */
.sin-anuncios {
    text-align: center;
    padding: 60px 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.sin-anuncios-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.sin-anuncios h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.sin-anuncios p {
    font-size: 14px;
    color: #7f8c8d;
}

/* ===== SECCIÓN FEATURES ===== */
.features {
    background: #f9f9f9;
    padding: 60px 30px;
}

.features-inner {
    max-width: 900px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 25px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 26px;
}

.feature-item h3 {
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.6;
}

/* ===== CONTACTO ===== */
.contacto-section {
    background: #2c3e50;
    padding: 50px 20px;
    text-align: center;
}

.contacto-inner {
    max-width: 600px;
    margin: 0 auto;
}

.contacto-section h2 {
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
}

.contacto-section p {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    margin-bottom: 20px;
}

.contacto-email {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}

.contacto-email:hover {
    background: #219a52;
}

/* ===== FOOTER ===== */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: auto;
}

footer p {
    font-size: 13px;
    opacity: 0.7;
}

/* ===== ALERTAS ===== */
.alerta {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

.alerta-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-inner {
        padding: 12px 15px;
    }

    .logo img {
        height: 50px;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #eee;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .btn-volver {
        display: none;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .tramites-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .comunidad-grid {
        grid-template-columns: 1fr;
    }

    .main-container {
        margin-top: -30px;
    }

    .search-box {
        padding: 30px 20px;
    }

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

    .listado-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 45px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .tramites-grid {
        grid-template-columns: 1fr;
    }

    .tramite-card {
        padding: 25px 15px;
    }

    .dato {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== CONTACTO ===== */
.contacto-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 60px 20px;
    text-align: center;
}

.contacto-inner {
    max-width: 600px;
    margin: 0 auto;
}

.contacto-section h2 {
    color: white;
    font-size: 26px;
    margin-bottom: 15px;
    font-weight: 700;
}

.contacto-section p {
    color: rgba(255,255,255,0.85);
    font-size: 16px;
    margin-bottom: 25px;
}

.contacto-email {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 16px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.contacto-email:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5);
}
