:root {
    --ink: #102746;
    --teal: #f8fcfc;
    --gold: #c3933d;
    --cream: #f8f6f0;
    --paper: #fffefa;
    --line: #dce2dc;
    --muted: #5f6f76;
    --shadow: 0 12px 30px rgba(16, 39, 70, .1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "DM Sans", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 72px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 254, 250, .96);
    border-bottom: 1px solid rgba(16, 39, 70, .09);
    backdrop-filter: blur(12px);
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    font-family: "Libre Baskerville", serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .01em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 13px;
    font-weight: 700;
}

.main-nav a {
    position: relative;
    padding: 29px 0;
    color: #26394f;
}

.main-nav a:not(.nav-cta):after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform .2s ease;
}

.main-nav a:hover:after,
.main-nav a.active:after {
    transform: scaleX(1);
}

.nav-cta,
.button-primary {
    color: #fff !important;
    background: var(--ink);
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(16, 39, 70, .16);
}

.nav-cta {
    padding: 11px 18px !important;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    padding: 8px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px;
    background: var(--ink);
}

.hero {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    /*background-color: #dfeaf0;*/
    background-image: none;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-image {
    position: absolute;
    inset: 0;
    background-color: #dfeaf0;
    background-image: url("../images/banner-gran-valparaiso.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-image:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 254, 250, .10), rgba(255, 254, 250, .10));
}

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    color: #82939a;
    background: #fff;
    font-size: 11px;
    letter-spacing: .04em;
    text-align: center;
}

.hero-image .image-placeholder {
    color: #71848d;
    font-size: 14px;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 64px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 13px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px;
    font-weight: 700;
}

h1,
h2 {
    margin: 0;
    font-family: "Libre Baskerville", serif;
    line-height: 1.14;
}

h1 {
    font-size: clamp(28px, 4.3vw, 52px);
    letter-spacing: -.03em;
}

h2 {
    font-size: clamp(25px, 3vw, 34px);
}

.hero-subtitle {
    margin: 16px 0 38px;
    color: var(--teal);
    font-family: "Libre Baskerville", serif;
    font-size: 21px;
}

.search-box {
    width: min(920px, 100%);
    margin: 0 auto;
    padding: 24px 26px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 18px;
    align-items: end;
    border: 1px solid rgba(16, 39, 70, .1);
    border-radius: 16px;
    background: rgba(255, 254, 250, .96);
    box-shadow: var(--shadow);
    text-align: left;
}

.search-box label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.search-box input {
    width: 100%;
    min-height: 49px;
    padding: 0 16px;
    border: 1px solid #d8dedb;
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    background: #fff;
}

.search-box input:focus {
    outline: 2px solid rgba(39, 125, 120, .35);
    border-color: var(--teal);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(16, 39, 70, .15);
}

.categories,
.businesses {
    padding-top: 72px;
}

.section-heading {
    margin-bottom: 25px;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}

.result-count {
    color: var(--muted);
    font-size: 13px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.category-card {
    min-height: 126px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: var(--paper);
    box-shadow: 0 4px 12px rgba(16, 39, 70, .04);
    font: inherit;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease;
}

.category-card:hover,
.category-card.is-selected {
    transform: translateY(-3px);
    border-color: var(--gold);
}

.category-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--teal);
    background: #f7f0e4;
    font-family: serif;
    font-size: 30px;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-card strong {
    font-size: 13px;
}

.businesses {
    padding-bottom: 5px;
}

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

.business-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
    box-shadow: 0 4px 12px rgba(16, 39, 70, .05);
}

.business-image {
    flex: 0 0 185px;
    height: 185px;
    min-height: 0;
    border-bottom: 1px solid var(--line);
}

.business-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-body {
    display: block;
    flex: 0 0 auto;
    padding: 17px 16px 16px;
}

.business-body h3 {
    margin: 0 0 7px;
    font-family: "Libre Baskerville", serif;
    font-size: 18px;
}

.business-body p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.location {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 13px;
    padding: 7px 10px;
    border: 0;
    border-radius: 14px;
    color: #37716e;
    background: #e5f2ef;
    font: inherit;
    font-size: 12px;
    text-align: left;
}

.business-actions {
    display: flex;
    gap: 8px;
}

.whatsapp-link,
.info-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    border: 0;
    border-radius: 5px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.whatsapp-link {
    color: #4d4b4b;
    background-color: #20f043;
}

.info-link {
    color: var(--ink);
    background-color: #e5f2ef;
}

/* Consulta General (DataTable Bootstrap) */
.general-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.general-card table.dataTable {
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
}

.general-card table.dataTable thead th {
    color: var(--ink);
    border-bottom: 2px solid var(--line) !important;
}

.plan-estrellas {
    color: #ffc107;
    letter-spacing: 1px;
}

.business-actions-table {
    gap: 6px;
    flex-wrap: wrap;
}

.business-actions-table .whatsapp-link,
.business-actions-table .info-link {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.destacados-paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.paginacion-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
}

.paginacion-btn:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold);
}

.paginacion-btn:disabled {
    color: var(--line);
    cursor: not-allowed;
}

#destacados-paginacion-info {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.info-modal-foto {
    display: block;
    width: 100%;
    height: 180px;
    margin-bottom: 16px;
    border-radius: 10px;
    object-fit: cover;
}

.info-modal-body {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.info-modal-row {
    display: flex;
    gap: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.info-modal-row strong {
    flex: 0 0 auto;
    color: var(--ink);
}

.info-modal-desc {
    color: #354b5a;
    font-size: 14px;
    line-height: 1.7;
}

.info-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--ink);
    border-radius: 8px;
    justify-content: center;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.info-copy-button.is-copied {
    border-color: #1f9254;
    color: #1f9254;
}

.modal-open {
    overflow: hidden;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(8, 24, 44, .64);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.contact-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.contact-modal-panel {
    position: relative;
    width: min(520px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    overflow-y: auto;
    padding: 42px 46px 38px;
    border: 3px solid var(--ink);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 24px 60px rgba(8, 24, 44, .3);
    transform: translateY(12px);
    transition: transform .2s ease;
}

.contact-modal.is-open .contact-modal-panel {
    transform: translateY(0);
}

.contact-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.contact-modal-panel h2 {
    margin: 0 0 12px;
    font-size: clamp(25px, 4vw, 34px);
}

.contact-modal-intro {
    margin: 0 0 24px;
    color: #354b5a;
    font-size: 14px;
    line-height: 1.7;
}

.contact-form {
    display: grid;
    gap: 8px;
}

.contact-form label {
    margin-top: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.contact-form label span {
    color: #b04b40;
}

.contact-form label small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.contact-form input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5d0;
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

.contact-form input:focus {
    outline: 2px solid #7da9a3;
    outline-offset: 1px;
}

.contact-form-status {
    min-height: 22px;
    margin: 12px 0 2px;
    font-size: 13px;
    line-height: 1.5;
}

.contact-form-status.is-success {
    color: #226768;
}

.contact-form-status.is-error {
    color: #a33f35;
}

.contact-form-submit:disabled {
    cursor: wait;
    opacity: .65;
}

.empty-state {
    padding: 32px;
    text-align: center;
    color: var(--muted);
}

.appear-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 8px;
    padding: 28px 34px;
    border-radius: 12px;
    color: #fff;
    background: var(--ink);
}

.appear-banner .eyebrow {
    color: #e1b45d;
}

.appear-banner h2 {
    font-size: 28px;
}

.banner-mark {
    max-width: 68px;
    max-height: 68px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
}

.banner-mark img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.appear-banner .button {
    margin-left: auto;
    white-space: nowrap;
}

.button-gold {
    color: var(--ink);
    background: #d7ad5b;
    border-radius: 5px;
}

.radio-pill {
    width: max-content;
    max-width: calc(100% - 72px);
    margin-top: 22px;
    margin-bottom: 58px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #d9ded9;
    border-radius: 28px;
    background: var(--paper);
    font-size: 14px;
}

.radio-icon {
    color: var(--gold);
    font-size: 22px;
}

.site-footer {
    padding: 24px 0;
    color: #fff;
    background: var(--ink);
    font-size: 12px;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-footer strong {
    font-family: "Libre Baskerville", serif;
}

.site-footer small {
    color: #b8c4ce;
}

@media (max-width: 800px) {
    .container {
    	width: min(100% - 40px, 600px);
    }

    .menu-toggle {
    	display: block;
    }

    .main-nav {
    	position: absolute;
    	top: 76px;
    	left: 0;
    	right: 0;
    	display: none;
    	padding: 10px 20px 20px;
    	align-items: stretch;
    	flex-direction: column;
    	gap: 0;
    	background: var(--paper);
    	box-shadow: 0 12px 20px rgba(16, 39, 70, .1);
    }

    .main-nav.is-open {
    	display: flex;
    }

    .main-nav a {
    	padding: 14px 0;
    }

    .main-nav a:not(.nav-cta):after {
    	bottom: 7px;
    	right: auto;
    	width: 35px;
    }

    .nav-cta {
    	text-align: center;
    	margin-top: 8px;
    }

    .hero {
    	min-height: 590px;
    }

    .hero-content {
    	padding-top: 52px;
    }

    .search-box {
    	grid-template-columns: 1fr;
    	padding: 19px;
    }

    .search-box .button {
    	width: 100%;
    }

    .category-grid {
    	grid-template-columns: repeat(4, 1fr);
    }

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

    .appear-banner {
    	align-items: flex-start;
    	flex-wrap: wrap;
    	padding: 25px;
    }

    .appear-banner .button {
    	margin-left: 0;
    }

    .site-footer .container {
    	align-items: flex-start;
    	flex-direction: column;
    }

    /* La Consulta General usa el ancho completo del dispositivo (en vez del
       tope de 600px del .container general) para que la tabla tenga más
       espacio y se necesite menos scroll horizontal. */
    #consulta-general.container {
    	width: calc(100% - 24px);
    }

    #consulta-general .general-card {
    	padding: 14px 12px;
    }
}

@media (max-width: 430px) {
    h1 {
    	font-size: 28px;
    }

    .hero-subtitle {
    	font-size: 17px;
    }

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

    .category-card {
    	min-height: 110px;
    }

    .section-heading-row {
    	align-items: flex-start;
    	flex-direction: column;
    	gap: 8px;
    }

    .appear-banner h2 {
    	font-size: 24px;
    }

    .radio-pill {
    	width: 100%;
    	max-width: none;
    	justify-content: center;
    	flex-wrap: wrap;
    	margin-bottom: 40px;
    	font-size: 12px;
    }
}