:root {
    --green: #3f9a48;
    --green-dark: #3b8a3f;
    --muted: #6b7280;
    --bg: #f5f6f7;
    --card-bg: #fff;
    --shadow: 0 6px 18px rgba(19, 24, 28, 0.08);
    --rounded: 18px;
    --max: 1200px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
    color: #1f2937;
    background: linear-gradient(#ffffff, #ffffff);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
    background: #fff;
    border-bottom: 1px solid #eef0f2;
    position: sticky;
    top: 0;
    z-index: 40;
}

.nav {
    max-width: var(--max);
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    font-size: 22px;
    color: #111827;
}

nav a {
    margin: 0 10px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-publish {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(63, 154, 72, 0.18);
    cursor: pointer;
    font-weight: 600;
}

/* HERO */
.hero {
    background: #e9eaed;
    padding: 56px 20px 72px;
    text-align: center;
}

.hero-inner {
    max-width: var(--max);
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    margin: 0 0 8px;
    line-height: 1.02;
    font-weight: 800;
    color: #1f2937;
}

.hero p.lead {
    color: #58606b;
    margin: 0 0 28px;
    font-size: 18px;
}

/* search panel */
.search-panel {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.search-card {
    background: var(--card-bg);
    width: min(920px, 100%);
    padding: 14px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.search-left {
    display: flex;
    gap: 10px;
    flex: 1;
    align-items: center
}

.select,
.input {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef0f2;
    padding: 12px 14px;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.03) inset;
}

.input {
    flex: 1
}

.search-btn {
    background: var(--green);
    color: #fff;
    padding: 12px 22px;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    min-width: 110px;
}

.more-filters {
    margin-top: 12px;
    color: var(--green-dark);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    display: inline-block;
}

/* main content */
main {
    max-width: var(--max);
    margin: 34px auto;
    padding: 0 20px 80px;
}

.section-title {
    font-size: 28px;
    margin: 20px 0 16px;
    font-weight: 700;
}

/* cards grid */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card {
    background: var(--card-bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: 320px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.card .media {
    flex: 1 0 180px;
    background: linear-gradient(180deg, #dfe4ea, #d6dbe0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 600;
    font-size: 18px;
}

.card .content {
    padding: 18px;
    background: #fff;
}

.card .title {
    font-weight: 700;
    margin: 0 0 8px;
    font-size: 16px;
}

.card .meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.card .cta-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pill {
    background: var(--green);
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

/* CTA section */
.cta {
    margin-top: 36px;
    background: linear-gradient(180deg, #f1fbf3, #ecf9ee);
    padding: 44px 20px;
    border-radius: 6px;
    text-align: center;
}

.cta h2 {
    font-size: 32px;
    margin: 0 0 10px;
    font-weight: 800;
}

.cta p {
    color: #4b5563;
    margin: 0 0 20px
}

.cta .cta-btn {
    background: var(--green);
    color: #fff;
    padding: 14px 26px;
    border-radius: 26px;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(63, 154, 72, 0.18);
}

/* services */
.services {
    display: flex;
    gap: 18px;
    margin: 36px 0 20px;
    justify-content: space-between;
}

.service {
    background: var(--card-bg);
    flex: 1;
    padding: 22px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
    font-weight: 500;
}

/* footer */
footer {
    background: #222831;
    color: #fff;
    padding: 22px 20px;
    margin-top: 30px;
}

footer .container {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    justify-content: center
}

/* Ajustes del header */
.menu-toggle {
    display: none;
    /* Desktop: oculto */
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #111;
}

/* Contenedor del menú (desktop) */
.nav-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* --- Contenedor de filtros extra --- */
.extra-filters {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* GRID DE 3 COLUMNAS */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    background: white;
    padding: 20px;
    border-radius: 12px;
}

/* BOTÓN “Más filtros” */
.more-filters-toggle {
    margin-top: 15px;
}

#toggle-filters-btn {
    background: none;
    border: none;
    color: #0a7c3e;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

/* Asegurar que el contenedor de Select2 sea full width */
.select2-container { width: 100% !important; }

/* Si quieres que se vea parecido a tus inputs */
.select2-selection--single {
  height: 46px; /* ajustar al tamaño de tus inputs */
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e6e9ee;
}


/* Responsive */
@media (max-width:1000px) {
    .hero h1 {
        font-size: 44px
    }

    .grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:700px) {
    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: block;
    }

    /* Ocultar menú inicialmente */
    .nav-group {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        padding: 14px 0;
        border-top: 1px solid #e5e7eb;
    }

    /* Cuando el menú está activo */
    .nav-group.active {
        display: flex;
    }

    /* Links en menú móvil */
    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 10px;
        margin-bottom: 12px;
    }

    /* Botón publicar ocupa todo el ancho */
    .nav-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .btn-publish {
        width: 90%;
        padding: 12px;
    }

    /*.nav {
        padding: 12px 14px
    }*/
    /* Cambiar layout del nav general */
    .nav {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .brand {
        font-size: 20px
    }

    .hero {
        padding: 40px 14px
    }

    .hero h1 {
        font-size: 34px
    }

    /*.search-card {
        flex-direction: column;
        align-items: stretch;
        padding: 12px
    }*/

    /*.select,
    .input {
        min-width: unset;
        width: 100%
    }*/

    /*.search-btn {
        width: 100%
    }*/

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

    .services {
        flex-direction: column
    }

    .card {
        min-height: 260px
    }

    .hero p.lead {
        font-size: 15px
    }
}

/* --- Vista móvil --- */
@media (max-width: 768px) {
    .search-card {
        flex-direction: column;
        gap: 12px;
        padding: 18px;
    }

    .search-left {
        flex-direction: column !important;
        width: 100%;
        gap: 12px;
    }

    .select,
    .input {
        width: 100%;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    /* Selects ocupan 100% y recuperan su estilo nativo */
    .select select {
        appearance: auto !important;
        -webkit-appearance: auto !important;
        -moz-appearance: auto !important;

        background: white !important;
        border: 1px solid #ccc !important;
        padding: 12px !important;
        border-radius: 10px !important;

        width: 100% !important;
        font-size: 16px !important;
        font-weight: 500 !important;
    }

    /* Asegura que TODOS los selects tengan fondo blanco */
    #operation-select select {
        background: white !important;
    }

    .filters-grid {
        grid-template-columns: 1fr; /* 1 por fila */
    }

    #toggle-filters-btn {
        font-size: 18px;
    }
}

.filters-grid .form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.filters-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* small neat details */
.muted-small {
    color: var(--muted);
    font-size: 14px
}