/* RESET */
:root {
    --primary-dark: #004d40;
    --primary-light: #e0f2f1;
    --bg-app: #f5f7f6;
    --bg-card: #ffffff;
    --text-main: #1a1a1a;
    --text-sec: #4a5568;
    --accent: #e3f2fd;
    --border-radius-card: 24px;
    --border-radius-pill: 999px;
    --shadow-soft: 0 10px 30px rgba(0, 77, 64, 0.04);
    --shadow-hover: 0 16px 40px rgba(0, 77, 64, 0.08);
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-app);
    background-image: linear-gradient(rgba(245, 247, 246, 0.55), rgba(245, 247, 246, 0.55)), url('../assets/img/costa-rica-bg.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-main);
    padding-bottom: 90px;
}

/* MAIN CONTENT */
main {
    max-width: 1440px;
    margin: auto;
    padding: 24px 24px 100px 24px;
    padding-top: 100px; /* Space for top-nav */
}

/* HERO MAP EXPLORER */
.map-explorer-layout {
    width: 100%;
    margin-bottom: 48px;
}

@media (min-width: 1024px) {
    .map-explorer-layout {
        display: block;
    }
}

.hero-map {
    position: relative;

    background-image: url('../assets/img/Map-bg.png');
    background-size: cover;
    background-position: center;

    border-radius: var(--border-radius-card);
    border: 1px solid #edf7ee;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
    min-height: 580px;
    transition: all 0.3s ease;
}

/* EXPLORER SIDE PANEL */
.explorer-panel {
    background: white;
    border-radius: var(--border-radius-card);
    border: 1px solid #edf2f7;
    box-shadow: var(--shadow-soft);
    padding: 32px;
    min-height: 580px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.province-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f4f8;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.province-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
}

.province-meta {
    font-size: 0.85rem;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.destination-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.dest-tab {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dest-tab:hover {
    background: #edf2f7;
    color: var(--primary-dark);
}

.dest-tab.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.explorer-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-grow: 1;
}

.explorer-info h4 {
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.explorer-info p {
    color: var(--text-sec);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.explorer-activities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-tag {
    background: #f0f4f8;
    border: 1px solid #edf2f7;
    padding: 6px 12px;
    border-radius: var(--border-radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-sec);
}

/* Welcome state */
.welcome-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    color: #718096;
    padding: 40px 20px;
    flex-grow: 1;
}

.welcome-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    animation: bounce-slow 3s infinite;
}

.welcome-title {
    font-size: 1.4rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 10px;
}

.welcome-desc {
    max-width: 300px;
    line-height: 1.6;
    font-size: 0.9rem;
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.fade-in-slide {
    animation: fadeInSlide 0.35s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

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

/* SEARCH BAR OVERLAY */
.search-container {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    z-index: 20;
}

.search-bar {
    background: white;
    padding: 8px 8px 8px 24px;
    border-radius: var(--border-radius-pill);
    display: flex;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    align-items: center;
}

.search-bar input {
    flex: 1;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: var(--text-sec);
}

.search-bar button {
    background: var(--primary-dark);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #00332a;
}

/* SECTION TITLES */
.section-title {
    margin-bottom: 24px;
}
.section-title h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.section-title p {
    color: var(--text-sec);
    max-width: 600px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.view-all {
    color: var(--primary-dark);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* GRID */
.destinos-grid {
    display: grid;
    gap: 24px;
}

@media (min-width: 768px) {
    .destinos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .destinos-grid { grid-template-columns: repeat(3, 1fr); }
}

/* BOTTOM NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 80px;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--border-radius-pill);
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.nav-item.active {
    color: var(--primary-dark);
    background: var(--primary-light);
}

.nav-item:hover:not(.active) {
    color: var(--primary-dark);
}

/* UTILS */
.fade-in {
    animation: fadeUp 0.5s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* REGIONES GRID & CARDS */
.regiones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px;
}
.region-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 240px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.region-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
.region-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.region-card:hover img {
    transform: scale(1.05);
}
.region-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,77,64,0.9) 0%, rgba(0,0,0,0) 60%);
    display: flex;
    align-items: flex-end;
    padding: 24px;
}
.region-overlay h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* REGIONAL BACKGROUND WATERMARKS */
body.bg-caribe {
    background-image: linear-gradient(rgba(245, 247, 246, 0.55), rgba(245, 247, 246, 0.55)), url('../assets/img/region-caribe-bg.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
body.bg-pacifico-norte {
    background-image: linear-gradient(rgba(245, 247, 246, 0.55), rgba(245, 247, 246, 0.55)), url('../assets/img/region-pacifico-norte-bg.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
body.bg-central {
    background-image: linear-gradient(rgba(245, 247, 246, 0.55), rgba(245, 247, 246, 0.55)), url('../assets/img/region-central-bg.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
body.bg-pacifico-sur {
    background-image: linear-gradient(rgba(245, 247, 246, 0.55), rgba(245, 247, 246, 0.55)), url('../assets/img/region-pacifico-sur-bg.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* CUSTOM ANIMATIONS */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

.fade-in-slide {
    animation: fadeInSlide 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
