/* ====================================================
   Territorios / Regiones — Estilos
   SiembraApp | siembraapp-web
   ==================================================== */

/* ── Intro ── */
.regiones-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.7;
}

/* ── Grid de tarjetas ── */
.regiones-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 60px;
}

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

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

/* ── Tarjeta de región ── */
.region-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(44, 158, 69, 0.08);
}

.region-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(44, 158, 69, 0.14);
}

/* Franja de color superior */
.region-card-banner {
    height: 8px;
    background: linear-gradient(90deg, #2c9e45, #00838f);
}

.region-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Cabecera de la tarjeta */
.region-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.region-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.region-icon .material-icons {
    font-size: 24px;
    color: #2c9e45;
}

.region-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #1a1a2e;
    letter-spacing: -0.3px;
}

.region-header .region-country {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

/* Stats */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 22px;
}

.stat-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-item.full-width {
    grid-column: span 2;
}

.stat-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #2c9e45;
}

/* Acciones */
.region-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.btn-region-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2c9e45, #1a7a2e);
    color: white;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: opacity 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.btn-region-primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
    color: white;
}

.btn-region-primary .material-icons {
    font-size: 18px;
}

.btn-region-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    background: transparent;
    color: #2c9e45;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #2c9e45;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.2px;
}

.btn-region-secondary:hover {
    background: #e8f5e9;
    color: #146215;
    border-color: #146215;
}

.btn-region-secondary .material-icons {
    font-size: 17px;
}

/* ── Sección del mapa ── */
.map-section {
    margin-bottom: 60px;
}

.map-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-section-title .material-icons {
    color: #2c9e45;
    font-size: 22px;
}

.map-container {
    height: 420px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

#map {
    height: 100%;
    width: 100%;
    background: #f0f4f1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
}

/* ── Modal personalizado ── */
.region-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.region-modal-overlay.open {
    display: flex;
}

.region-modal {
    background: #fff;
    border-radius: 24px;
    padding: 32px 28px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modalIn 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

.region-modal h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.region-modal p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
}

.region-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-modal-cancel {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-modal-cancel:hover { background: #e2e8f0; }

.btn-modal-go {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: #2c9e45;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-modal-go:hover { background: #146215; color: white; }
